Mercurial > parpg-core
changeset 138:c9fba51214ed
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 | 140e5e93f026 |
children | 7c9b7efc0f11 |
files | src/parpg/gamemodel.py src/parpg/gamescenecontroller.py |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parpg/gamemodel.py Fri Sep 30 15:31:53 2011 +0200 +++ b/src/parpg/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.
--- a/src/parpg/gamescenecontroller.py Fri Sep 30 15:31:53 2011 +0200 +++ b/src/parpg/gamescenecontroller.py Fri Sep 30 16:05:26 2011 +0200 @@ -355,7 +355,6 @@ self.model.loadMap(self.model.target_map_name) self.model.setActiveMap(self.model.target_map_name) - self.model.readAgentsOfMap(self.model.target_map_name) self.model.placeAgents(self) self.model.placePC(self)