comparison skaapsteker/sprites/player.py @ 440:ae0c67788f96

Stop flying by hitting down when on the ground.
author Simon Cross <hodgestar@gmail.com>
date Sat, 09 Apr 2011 19:30:52 +0200
parents 400d68993977
children f3ccb00df6a4
comparison
equal deleted inserted replaced
439:400d68993977 440:ae0c67788f96
333 self.deltav((0.0, -self.terminal_velocity[1])) 333 self.deltav((0.0, -self.terminal_velocity[1]))
334 self.on_solid = False 334 self.on_solid = False
335 335
336 def action_down(self): 336 def action_down(self):
337 if self.flying: 337 if self.flying:
338 if self.on_solid:
339 self.flying = 0
338 return 340 return
339 elif self._touching_actionables: 341 elif self._touching_actionables:
340 self.invisible = 0 342 self.invisible = 0
341 self._touching_actionables[0].player_action(self) 343 self._touching_actionables[0].player_action(self)
342 elif self._me.item is not None and self.on_solid: 344 elif self._me.item is not None and self.on_solid: