CaravelGames / drod

The official public repository of Deadly Rooms of Death and DROD RPG
http://caravelgames.com
56 stars 17 forks source link

Fix interaction when pushing character off of falling tile #563

Closed Hypexion closed 9 months ago

Hypexion commented 10 months ago

If a falling tile such as a trapdoor drops by having an monster pushed off of it, it is possible for the pushing entity to end up on an otherwise impassable pit or water tile. This is inconsistent with other situations where a tile is altered to pit or water beneath an entity, which can lead to them dropping or drowning.

To fix, monsters now set a flag bPushedOtherMonster when they body push a monster. If this flag is set after their movement is processed, monsters that can push other monsters will call CDbRoom::CheckForFallingAt at their new position. This will cause them to drop if their destination tile is unsuitable. CCurrentGame::ProcessPlayer has had a similar change made to allow the same for player movement.