From: Christian Heller Date: Thu, 13 Nov 2014 15:05:37 +0000 (+0100) Subject: Server: Fix critical bug that stems from omission of a single semicolon. X-Git-Tag: tce~610 X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=ff1ad8d5cfa86b38cc1436c6c9cc4135fb0a0f66;p=plomrogue Server: Fix critical bug that stems from omission of a single semicolon. --- diff --git a/TODO b/TODO index 2cc0adf..a5eb094 100644 --- a/TODO +++ b/TODO @@ -4,10 +4,6 @@ IN GENERAL: - expand use of hardcoded_strings module(s) -SERVER: - -- critical bug: replay and exit game state don't match - BOTH SERVER/CLIENT: - make server and client communicate by specific world state info requests diff --git a/confserver/world b/confserver/world index c967a19..68177b5 100644 --- a/confserver/world +++ b/confserver/world @@ -29,42 +29,42 @@ TT_NAME HUMAN TT_CONSUMABLE 0 TT_ID 1 -TT_START_NUMBER 27 +TT_START_NUMBER 0 TT_LIFEPOINTS 1 TT_SYMBOL a TT_NAME ANT TT_CONSUMABLE 0 TT_ID 2 -TT_START_NUMBER 9 +TT_START_NUMBER 0 TT_LIFEPOINTS 3 TT_SYMBOL z TT_NAME ZOMBIE TT_CONSUMABLE 0 TT_ID 3 -TT_START_NUMBER 3 +TT_START_NUMBER 0 TT_LIFEPOINTS 9 TT_SYMBOL S TT_NAME SHOGGOTH TT_CONSUMABLE 0 TT_ID 4 -TT_START_NUMBER 9 +TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL # TT_NAME DIRT TT_CONSUMABLE 0 TT_ID 5 -TT_START_NUMBER 9 +TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL % TT_NAME SKELETON TT_CONSUMABLE 0 TT_ID 6 -TT_START_NUMBER 1 +TT_START_NUMBER 9 TT_LIFEPOINTS 0 TT_SYMBOL m TT_NAME 'MAGIC MEAT' diff --git a/src/server/run.c b/src/server/run.c index 808be55..708bd96 100644 --- a/src/server/run.c +++ b/src/server/run.c @@ -227,7 +227,7 @@ static int16_t * build_whitelist() for (; t; t = t->next, i_things++); int16_t * whitelist = try_malloc(i_things * sizeof(int16_t), __func__); for (i_things = 0, t = world.things; t; - whitelist[i_things] = t->id, t = t->next, i_things++) + whitelist[i_things] = t->id, t = t->next, i_things++); whitelist[i_things] = -1; return whitelist; } @@ -263,8 +263,8 @@ static void turn_over() world.turn++; thing = world.things; free(whitelist); - whitelist = build_whitelist(); - } + whitelist = build_whitelist();/* The whitelist excludes things */ + } /* that appear only during the turn.*/ if (thing_in_whitelist(thing->id, whitelist)) { if (0 < thing->lifepoints)