comparison src/parpg/behaviours/npc.py @ 168:704145b96171

Fix to decrease the wander rate of the npcs.
author KarstenBock@gmx.net
date Sun, 09 Oct 2011 14:29:02 +0200
parents ecac92680bef
children a22e92090018
comparison
equal deleted inserted replaced
167:097782ae9c77 168:704145b96171
34 self.distRange = (2, 4) 34 self.distRange = (2, 4)
35 # these are parameters to lower the rate of wandering 35 # these are parameters to lower the rate of wandering
36 # wander rate is the number of "IDLEs" before a wander step 36 # wander rate is the number of "IDLEs" before a wander step
37 # this could be set for individual NPCs at load time 37 # this could be set for individual NPCs at load time
38 # or thrown out altogether. 38 # or thrown out altogether.
39 # HACK: 09.Oct.2011 Beliar
40 # I increased the wander rate to 900 since the idle method
41 # gets called way more often now.
39 self.wanderCounter = 0 42 self.wanderCounter = 0
40 self.wanderRate = 9 43 self.wanderRate = 900
41 44
42 def getTargetLocation(self): 45 def getTargetLocation(self):
43 """@rtype: fife.Location 46 """@rtype: fife.Location
44 @return: NPC's position""" 47 @return: NPC's position"""
45 x = self.getX() 48 x = self.getX()