mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
fix block pushing on ice
This commit is contained in:
parent
7f10cdb869
commit
45a9dbfeac
|
@ -734,8 +734,13 @@ impl Entity {
|
||||||
fn push_depth(&self) -> Option<i32> {
|
fn push_depth(&self) -> Option<i32> {
|
||||||
if matches!(self.holding(), Some(&EntityType::Item(Item::Glove))) {
|
if matches!(self.holding(), Some(&EntityType::Item(Item::Glove))) {
|
||||||
Some(i32::MAX)
|
Some(i32::MAX)
|
||||||
} else {
|
} else if matches!(
|
||||||
|
self.entity,
|
||||||
|
EntityType::Hero(_) | EntityType::Enemy(Enemy::Squid(_))
|
||||||
|
) {
|
||||||
Some(1)
|
Some(1)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue