mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-22 07:06:41 +11:00
blocks can't intersect heros or enemies
This commit is contained in:
parent
afed1542fe
commit
b5da20d748
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue