Ignore:
Timestamp:
10/03/09 13:44:58 (10 years ago)
Author:
eliedebrauwer
Message:

Ticket #73: Patch by Elie De Brauwer, partial fix of load/save, this fixes the map load failure but does not fix the failure to load/save PC and NPC behaviour comment[s:trac, t:73]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/engine.py

    r295 r302  
    101101        f.close() 
    102102        if self.gameState.currentMap: 
    103             self.loadMap(self.gameState.currentMap)  
     103            self.loadMap(self.gameState.currentMapName, self.gameState.currentMap)  
    104104 
    105105    def createObject (self, layer, attributes, instance): 
     
    244244    def loadMap(self, map_name, map_file): 
    245245        """Load a new map. TODO: needs some error checking 
     246           @type map_name: string 
     247           @param map_name: Name of the map to load 
    246248           @type map_file: string 
    247            @param map_file: Name of map file to load 
     249           @param map_file: Filename of map file to load 
    248250           @return: None""" 
    249251        self.gameState.currentMap = map_file 
     252        self.gameState.currentMapName= map_name 
    250253        self.view.loadMap(map_name, str(map_file)) 
    251254        self.view.setActiveMap(map_name) 
     
    256259        self.view.activeMap.addPC(self.gameState.PC.behaviour.agent) 
    257260        self.gameState.PC.start() 
     261 
    258262 
    259263    def handleMouseClick(self,position): 
Note: See TracChangeset for help on using the changeset viewer.