mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
blocks can't intersect heros or enemies
This commit is contained in:
parent
afed1542fe
commit
b5da20d748
|
@ -465,6 +465,9 @@ fn resolve_move(mover: &Entity, into: &Entity) -> MoveAttemptResolution {
|
|||
}
|
||||
(_, EntityType::Door) => MoveAttemptResolution::StayPut,
|
||||
(_, EntityType::MovableBlock) => MoveAttemptResolution::AttemptPush,
|
||||
(EntityType::MovableBlock, EntityType::Hero(_) | EntityType::Enemy(_)) => {
|
||||
MoveAttemptResolution::StayPut
|
||||
}
|
||||
(_, _) => MoveAttemptResolution::CoExist,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue