diff gamemodel.py @ 108:81b51b9d861e

Fixed bug where the objects of a map where not correctly restored when changing between maps.
author KarstenBock@gmx.net
date Fri, 30 Sep 2011 16:05:26 +0200
parents 100a39fa64a2
children 7f7f54c4077b
line wrap: on
line diff
--- a/gamemodel.py	Fri Sep 30 15:31:53 2011 +0200
+++ b/gamemodel.py	Fri Sep 30 16:05:26 2011 +0200
@@ -540,6 +540,8 @@
         self.active_map = self.game_state.maps[map_name]
         self.active_map.makeActive()
         self.game_state.current_map_name = map_name
+        if not self.agents.has_key(map_name):
+            self.readAgentsOfMap(map_name)
 
     def createMapObject (self, layer, attributes, inst_id, world):
         """Create an object and add it to the current map.