# HG changeset patch # User KarstenBock@gmx.net # Date 1316695140 -7200 # Node ID c9818290bbe7fcb0c1e94ebf89f8c10a18846d0d # Parent 5c751b9a3d8bc0271a3f61d8dabdcf46bef2b060 Objects that are not on an actual map are now stored under the value None in the gamestates object dictionary. diff -r 5c751b9a3d8b -r c9818290bbe7 gamestate.py --- a/gamestate.py Thu Sep 22 14:29:28 2011 +0200 +++ b/gamestate.py Thu Sep 22 14:39:00 2011 +0200 @@ -40,8 +40,7 @@ @type object: GameObject """ if not self.object_ids.has_key(object_id): - if map_id: - self.objects[map_id][object_id] = game_object + self.objects[map_id][object_id] = game_object self.object_ids[object_id] = map_id def deleteObject(self, object_id): @@ -54,7 +53,7 @@ if map_id: inst = self.maps[map_id].agent_layer.getInstance(object_id) self.maps[map_id].agent_layer.deleteInstance(inst) - del self.objects[map_id][object_id] + del self.objects[map_id][object_id] del self.object_ids[object_id]