mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
you can only turn around if this is your first movement
This commit is contained in:
parent
c142184bc0
commit
025e76b8bd
|
@ -418,6 +418,8 @@ impl EntityMap {
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let mut first_loop = true;
|
||||||
|
|
||||||
while !entities_to_try_update.is_empty() {
|
while !entities_to_try_update.is_empty() {
|
||||||
let mut entities_that_have_moved = Vec::new();
|
let mut entities_that_have_moved = Vec::new();
|
||||||
|
|
||||||
|
@ -427,7 +429,7 @@ impl EntityMap {
|
||||||
&mut animations,
|
&mut animations,
|
||||||
entity_to_update_key,
|
entity_to_update_key,
|
||||||
direction,
|
direction,
|
||||||
true,
|
first_loop,
|
||||||
self.map
|
self.map
|
||||||
.get(entity_to_update_key)
|
.get(entity_to_update_key)
|
||||||
.and_then(|e| e.push_depth())
|
.and_then(|e| e.push_depth())
|
||||||
|
@ -450,6 +452,8 @@ impl EntityMap {
|
||||||
hero_has_died |= action_result.hero_has_died;
|
hero_has_died |= action_result.hero_has_died;
|
||||||
win_has_triggered |= action_result.win_has_triggered;
|
win_has_triggered |= action_result.win_has_triggered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
first_loop = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in a new issue