Mercurial > touhou
comparison src/th06/ecl_vm.rs @ 684:c8bb28961d31
ecl_vm: fixes for previous instructions
author | Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com> |
---|---|
date | Fri, 16 Aug 2019 23:53:03 +0200 |
parents | 8c50a7b19425 |
children | 11d7e4d6947a |
comparison
equal
deleted
inserted
replaced
683:8c50a7b19425 | 684:c8bb28961d31 |
---|---|
610 let mut enemy = self.enemy.borrow_mut(); | 610 let mut enemy = self.enemy.borrow_mut(); |
611 enemy.current_laser_id = laser_id; | 611 enemy.current_laser_id = laser_id; |
612 } | 612 } |
613 | 613 |
614 // 88 | 614 // 88 |
615 | 615 /* |
616 SubInstruction::AlterLaserAngle(laser_id, delta) => { | 616 SubInstruction::AlterLaserAngle(laser_id, delta) => { |
617 let mut enemy = self.enemy.borrow_mut(); | 617 let mut enemy = self.enemy.borrow_mut(); |
618 if enemy.laser_by_id.contains_key(&laser_id) { | 618 if enemy.laser_by_id.contains_key(&laser_id) { |
619 let mut laser = enemy.laser_by_id.get(laser_id); | 619 let mut laser = enemy.laser_by_id.get(&laser_id); |
620 laser.angle += self.get_f32(delta); | 620 laser.angle += self.get_f32(delta); |
621 } | 621 } |
622 } | 622 } |
623 */ | |
623 | 624 |
624 // 89 | 625 // 89 |
625 /* | 626 /* |
626 SubInstruction::AlterLaserAnglePlayer(laser_id, delta) => { | 627 SubInstruction::AlterLaserAnglePlayer(laser_id, delta) => { |
627 let mut enemy = self.enemy.borrow_mut(); | 628 let mut enemy = self.enemy.borrow_mut(); |
632 } | 633 } |
633 } | 634 } |
634 */ | 635 */ |
635 | 636 |
636 // 90 | 637 // 90 |
638 /* | |
637 SubInstruction::RepositionLaser(laser_id, ox, oy, oz) => { | 639 SubInstruction::RepositionLaser(laser_id, ox, oy, oz) => { |
638 let mut enemy = self.enemy.borrow_mut(); | 640 let mut enemy = self.enemy.borrow_mut(); |
639 if enemy.laser_by_id.contains_key(&laser_id) { | 641 if enemy.laser_by_id.contains_key(&laser_id) { |
640 let mut laser = enemy.laser_by_id.get(laser_id); | 642 let mut laser = enemy.laser_by_id.get(&laser_id); |
641 laser.set_base_pos(enemy.pos.x + ox, enemy.pos.y + oy, enemy.z + oz) | 643 laser.set_base_pos(enemy.pos.x + ox, enemy.pos.y + oy, enemy.z + oz) |
642 } | 644 } |
643 } | 645 } |
646 */ | |
644 // 91 | 647 // 91 |
645 // wat | 648 // wat |
646 SubInstruction::LaserSetCompare(laser_id) => { | 649 SubInstruction::LaserSetCompare(laser_id) => { |
647 let mut enemy = self.enemy.borrow_mut(); | 650 let mut enemy = self.enemy.borrow_mut(); |
648 // in game it checks if either the laser exists OR if one of its member is set to 0 | 651 // in game it checks if either the laser exists OR if one of its member is set to 0 |