changeset 711:464c1b02a996

ecl_vm: Fix SetPosition.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 08 Sep 2019 18:09:43 +0200
parents 377c241be559
children 13fd434d5d1b
files src/th06/ecl_vm.rs
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -494,8 +494,9 @@ impl EclRunner {
 
             // 43
             SubInstruction::SetPosition(x, y, z) => {
+                let (x, y, z) = (self.get_f32(x), self.get_f32(y), self.get_f32(z));
                 let mut enemy = self.enemy.borrow_mut();
-                enemy.set_pos(self.get_f32(x), self.get_f32(y), self.get_f32(z));
+                enemy.set_pos(x, y, z);
             }
             // 44
             /*