From fe62a6e8dbd769de5b4bbd3378d8e28905fd5194 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sat, 8 Jun 2024 09:52:31 -0400 Subject: [PATCH] [MIRROR] Adds a TRAIT_NO_TRANSFORM check to AI movement. [MDB IGNORE] (#2914) * Adds a TRAIT_NO_TRANSFORM check to AI movement. (#83621) ## About The Pull Request Checks for `TRAIT_NO_TRANSFORM` in `allowed_to_move`. Will stop mobs from moving when they should not. ## Why It's Good For The Game Fixes #79870 Fixes AI movement not respecting TRAIT_NO_TRANSFORM. ## Changelog :cl: Goat fix: mobs no longer move during cutscenes /:cl: * Adds a TRAIT_NO_TRANSFORM check to AI movement. --------- Co-authored-by: Goat <126099705+Goat-Real@users.noreply.github.com> Co-authored-by: NovaBot13 --- code/datums/ai/movement/_ai_movement.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/datums/ai/movement/_ai_movement.dm b/code/datums/ai/movement/_ai_movement.dm index ca8acb49040..d48166eeb23 100644 --- a/code/datums/ai/movement/_ai_movement.dm +++ b/code/datums/ai/movement/_ai_movement.dm @@ -46,6 +46,9 @@ if(!(pawn_mob.mobility_flags & MOBILITY_MOVE)) can_move = FALSE + if(HAS_TRAIT(pawn, TRAIT_NO_TRANSFORM)) + can_move = FALSE + return can_move ///Anything to do before moving; any checks if the pawn should be able to move should be placed in allowed_to_move() and called by this proc