comparison behaviours/npc.py @ 138:90ad38b00f13

Fix to decrease the wander rate of the npcs.
author KarstenBock@gmx.net
date Sun, 09 Oct 2011 14:29:02 +0200
parents 57f1cff9a75d
children 04854cf6e1ac
comparison
equal deleted inserted replaced
137:53faff63037f 138:90ad38b00f13
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()