home · contact · privacy
Server: Fix critical bug that stems from omission of a single semicolon.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 13 Nov 2014 15:05:37 +0000 (16:05 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 13 Nov 2014 15:05:37 +0000 (16:05 +0100)
TODO
confserver/world
src/server/run.c

diff --git a/TODO b/TODO
index 2cc0adffa6874faf9540a6e43a1400364bdb75e0..a5eb09432b8f8b604ace9f715fc6f9a1e9196343 100644 (file)
--- 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 
index c967a1955ff041ab0329269982df7d41634f644d..68177b596a4119d2b506b9108ac21e796da54592 100644 (file)
@@ -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'
index 808be55398a3a03e7f1d69d67c104d3850ebaffd..708bd961ba89dd62847aa35f0f5711c5ef010319 100644 (file)
@@ -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)