comparison pytouhou/vm/eclrunner.py @ 251:4b549894ef6b

Change position/speed interpoletor handling to match the original game more closely.
author Thibaut Girka <thib@sitedethib.com>
date Sun, 22 Jan 2012 14:24:38 +0100
parents cd4800154c9b
children 507dfd6efe0c
comparison
equal deleted inserted replaced
250:cd4800154c9b 251:4b549894ef6b
468 self._enemy.set_pos(self._getval(x), self._getval(y), self._getval(z)) 468 self._enemy.set_pos(self._getval(x), self._getval(y), self._getval(z))
469 469
470 470
471 @instruction(45) 471 @instruction(45)
472 def set_angle_speed(self, angle, speed): 472 def set_angle_speed(self, angle, speed):
473 self._enemy.update_mode = 0
473 self._enemy.angle, self._enemy.speed = angle, speed 474 self._enemy.angle, self._enemy.speed = angle, speed
474 475
475 476
476 @instruction(46) 477 @instruction(46)
477 def set_rotation_speed(self, speed): 478 def set_rotation_speed(self, speed):
479 self._enemy.update_mode = 0
478 self._enemy.rotation_speed = speed 480 self._enemy.rotation_speed = speed
479 481
480 482
481 @instruction(47) 483 @instruction(47)
482 def set_speed(self, speed): 484 def set_speed(self, speed):
485 self._enemy.update_mode = 0
483 self._enemy.speed = speed 486 self._enemy.speed = speed
484 487
485 488
486 @instruction(48) 489 @instruction(48)
487 def set_acceleration(self, acceleration): 490 def set_acceleration(self, acceleration):
491 self._enemy.update_mode = 0
488 self._enemy.acceleration = acceleration 492 self._enemy.acceleration = acceleration
489 493
490 494
491 @instruction(49) 495 @instruction(49)
492 def set_random_angle(self, min_angle, max_angle): 496 def set_random_angle(self, min_angle, max_angle):
517 521
518 522
519 @instruction(51) 523 @instruction(51)
520 def target_player(self, unknown, speed): 524 def target_player(self, unknown, speed):
521 #TODO: unknown 525 #TODO: unknown
526 self._enemy.update_mode = 0
522 self._enemy.speed = speed 527 self._enemy.speed = speed
523 self._enemy.angle = self._enemy.get_player_angle() 528 self._enemy.angle = self._enemy.get_player_angle()
524 529
525 530
526 @instruction(52) 531 @instruction(52)