home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd2cb2c
)
Also make the client map window focus on the player when the world is re-seeded.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 25 Jan 2014 19:30:40 +0000
(20:30 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 25 Jan 2014 19:30:40 +0000
(20:30 +0100)
src/client/io.c
patch
|
blob
|
history
diff --git
a/src/client/io.c
b/src/client/io.c
index 4623b3d89bbe4e6aa1912c24b8acdec649637b34..c2a3b4b23b453fd1acdaa7cd079ddb364dca3d10 100644
(file)
--- a/
src/client/io.c
+++ b/
src/client/io.c
@@
-67,8
+67,8
@@
static FILE * changed_server_out_file(char * path);
* a hard-coded serialization format. Returns 1 on success and 0 if the out file
* wasn't read for supposedly not having changed since a last read_world() call.
*
* a hard-coded serialization format. Returns 1 on success and 0 if the out file
* wasn't read for supposedly not having changed since a last read_world() call.
*
- *
Note that the first successful read_world() triggers map_center(), so that on
- * s
tart the client focuses the map window on the player
.
+ *
map_center() is triggered by the first successful read_world() or on turn 1,
+ * s
o the client focuses the map window on the player on client and world start
.
*/
static uint8_t read_world();
*/
static uint8_t read_world();
@@
-201,7
+201,7
@@
static uint8_t read_world()
read_inventory(read_buf, linemax, file);
world.player_pos.y = read_value_from_line(read_buf, linemax, file);
world.player_pos.x = read_value_from_line(read_buf, linemax, file);
read_inventory(read_buf, linemax, file);
world.player_pos.y = read_value_from_line(read_buf, linemax, file);
world.player_pos.x = read_value_from_line(read_buf, linemax, file);
- if (first_read)
+ if (
1 == world.turn ||
first_read)
{
map_center();
first_read = 0;
{
map_center();
first_read = 0;