Ignore:
Timestamp:
10/13/09 18:42:00 (10 years ago)
Author:
eliedebrauwer
Message:

Ticket #73: Patch by eliedebrauwer, removed obj_hashes from world, and from the maps, added logic to restore PC and NPC behaviour based on the layer ID, added logic to trigger the map load using within the pump(). Load still not functional. comment[s:trac, t:73]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/objects/actors.py

    r320 r323  
    115115         
    116116        self.state = _AGENT_STATE_NONE 
    117         self.behaviour = PCBehaviour(self, agent_layer) 
     117        self.layer_id = agent_layer.getId() 
     118        self.createBehaviour(agent_layer) 
     119     
     120    def createBehaviour(self, layer): 
     121        """ Creates the behaviour for this actor. 
     122            @return None """ 
     123        self.behaviour = PCBehaviour(self, layer) 
    118124     
    119125    def setup(self): 
     
    240246        self.is_NPC = True 
    241247        self.inventory = None 
    242          
    243         self.behaviour = NPCBehaviour(self, agent_layer) 
     248        self.layer_id = agent_layer.getId() 
     249        self.createBehaviour(agent_layer)         
    244250        self.dialogue = kwargs.get('dialogue') 
     251 
     252    def createBehaviour(self, layer): 
     253        """ Creates the behaviour for this actor. 
     254            @return None """ 
     255        self.behaviour = NPCBehaviour(self, layer) 
    245256 
    246257    def getLocation(self): 
Note: See TracChangeset for help on using the changeset viewer.