aboutsummaryrefslogtreecommitdiff
path: root/src/world.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-03-24 21:45:47 -0400
committerFranklin Wei <git@fwei.tk>2016-03-24 21:45:47 -0400
commiteb8b5907df2cf3c4b593197d40d10e83e6943ee3 (patch)
treee19b5d3ee90e7d29b5975ad05496b2ab1385ad15 /src/world.c
parenta91f858ebaea0f403b2c59773e619086b9198a39 (diff)
downloadnetcosm-eb8b5907df2cf3c4b593197d40d10e83e6943ee3.zip
netcosm-eb8b5907df2cf3c4b593197d40d10e83e6943ee3.tar.gz
netcosm-eb8b5907df2cf3c4b593197d40d10e83e6943ee3.tar.bz2
netcosm-eb8b5907df2cf3c4b593197d40d10e83e6943ee3.tar.xz
fix for drop bug
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c
index 1516b4c..a854e49 100644
--- a/src/world.c
+++ b/src/world.c
@@ -80,6 +80,8 @@ void world_save(const char *fname)
size_t n_objects = room_obj_count_noalias(i);
write(fd, &n_objects, sizeof(n_objects));
+ debugf("Room %d has %d objects.\n", i, n_objects);
+
room_id id = i;
void *save;
while(1)
@@ -95,7 +97,10 @@ void world_save(const char *fname)
break;
const char *name = iter->key;
if(!strcmp(name, obj->name))
- obj_write(fd, obj);
+ {
+ debugf("writing object '%s' in room %d\n", obj->name, i);
+ obj_write(fd, obj);
+ }
iter = iter->next;
}
}