Fixes simplemobs wandering when grabbed.

The mobs that are not supposed to wander when pulled now also stop wandering when pulled with a grab.
This commit is contained in:
Verkister
2019-10-31 12:03:29 +02:00
committed by GitHub
parent c773e0bfab
commit 2ab1d9cfb8

View File

@@ -142,7 +142,7 @@
if(isturf(holder.loc) && can_act())
wander_delay--
if(wander_delay <= 0)
if(!wander_when_pulled && holder.pulledby)
if(!wander_when_pulled && (holder.pulledby | holder.grabbed_by.len))
ai_log("handle_wander_movement() : Being pulled and cannot wander. Exiting.", AI_LOG_DEBUG)
return