home · contact · privacy
Fix client-server communication bug that made read_queue() impotent.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 04:51:04 +0000 (05:51 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 04:51:04 +0000 (05:51 +0100)
roguelike-server
src/client/io.c

index ee1fefc03f09effa0d463b00824f3241763bb0cb..94eef27a5aa71d602b27334a0375f384e5bd4aab 100755 (executable)
@@ -331,9 +331,9 @@ def try_worldstate_update():
                 name = world_db["ThingTypes"][type_id]["TT_NAME"]
                 inventory = inventory + name + "\n"
         ## 7DRL additions:  GOD_MOOD, GOD_FAVOR
-        string = str(world_db["GOD_MOOD"]) + "\n" + \
+        string = str(world_db["TURN"]) + "\n" + \
+                 str(world_db["GOD_MOOD"]) + "\n" + \
                  str(world_db["GOD_FAVOR"]) + "\n" + \
-                 str(world_db["TURN"]) + "\n" + \
                  str(world_db["Things"][0]["T_LIFEPOINTS"]) + "\n" + \
                  str(world_db["Things"][0]["T_SATIATION"]) + "\n" + \
                  inventory + "%\n" + \
index 247a681c9f3a683178ef39693562b4b644824aa4..bdebef2440cbfee3c0eff685211ed16def36f916 100644 (file)
@@ -184,9 +184,9 @@ static uint8_t read_worldstate()
     }
     uint32_t linemax = textfile_width(file);
     char * read_buf = try_malloc(linemax + 1, __func__);
+    world.turn = (uint16_t) read_value_from_line(read_buf, linemax, file);
     world.godsmood = (int16_t) read_value_from_line(read_buf, linemax, file); //
     world.godsfavor = (int16_t) read_value_from_line(read_buf, linemax, file); //
-    world.turn = (uint16_t) read_value_from_line(read_buf, linemax, file);
     world.player_lifepoints = (uint16_t) read_value_from_line(read_buf, linemax,
                                                               file);
     world.player_satiation = (int16_t) read_value_from_line(read_buf, linemax,