From: Christian Heller Date: Tue, 10 Mar 2015 04:51:04 +0000 (+0100) Subject: Fix client-server communication bug that made read_queue() impotent. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=99905d4c5205f8ed62e8136fa5d1eb89110d9249;p=plomrogue Fix client-server communication bug that made read_queue() impotent. --- diff --git a/roguelike-server b/roguelike-server index ee1fefc..94eef27 100755 --- a/roguelike-server +++ b/roguelike-server @@ -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" + \ diff --git a/src/client/io.c b/src/client/io.c index 247a681..bdebef2 100644 --- a/src/client/io.c +++ b/src/client/io.c @@ -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,