comparison 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
comparison
equal deleted inserted replaced
107:100a39fa64a2 108:81b51b9d861e
538 self.active_map.cameras[self.active_map.my_cam_id].setEnabled(False) 538 self.active_map.cameras[self.active_map.my_cam_id].setEnabled(False)
539 # Make the new map active. 539 # Make the new map active.
540 self.active_map = self.game_state.maps[map_name] 540 self.active_map = self.game_state.maps[map_name]
541 self.active_map.makeActive() 541 self.active_map.makeActive()
542 self.game_state.current_map_name = map_name 542 self.game_state.current_map_name = map_name
543 if not self.agents.has_key(map_name):
544 self.readAgentsOfMap(map_name)
543 545
544 def createMapObject (self, layer, attributes, inst_id, world): 546 def createMapObject (self, layer, attributes, inst_id, world):
545 """Create an object and add it to the current map. 547 """Create an object and add it to the current map.
546 @type layer: fife.Layer 548 @type layer: fife.Layer
547 @param layer: FIFE layer object exists in 549 @param layer: FIFE layer object exists in