From f2ec266eec6cff1ee1353eda952989533acf2e43 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Tue, 15 Nov 2016 11:38:03 -0600 Subject: [PATCH] Fixed: Actors with NOINTERACTION shouldn't waste time continuously applying NOBLOCKMAP if it has it already and not moving. --- src/p_mobj.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 3e2011878..2183f8cb9 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3373,11 +3373,14 @@ void AActor::Tick () } } - UnlinkFromWorld (); - flags |= MF_NOBLOCKMAP; - SetXYZ(Vec3Offset(Vel)); - CheckPortalTransition(false); - LinkToWorld (); + if (!Vel.isZero() || !(flags & MF_NOBLOCKMAP)) + { + UnlinkFromWorld(); + flags |= MF_NOBLOCKMAP; + SetXYZ(Vec3Offset(Vel)); + CheckPortalTransition(false); + LinkToWorld(); + } } else {