]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't check trace_fraction on all cases
authorMario <mario@smbclan.net>
Wed, 19 Oct 2016 20:37:37 +0000 (06:37 +1000)
committerMario <mario@smbclan.net>
Wed, 19 Oct 2016 20:37:37 +0000 (06:37 +1000)
qcsrc/common/monsters/sv_monsters.qc

index 0b43ab7870b5448432b64d07170db328ebf46521..44ce0245b430afa6f56bd5577e0d284a0cc3d8d1 100644 (file)
@@ -1138,16 +1138,13 @@ void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff)
        traceline(a, b, MOVE_NORMAL, this);
 
        if(trace_fraction != 1.0)
-       {
                reverse = true;
 
-               if(trace_ent)
-               if(IS_PLAYER(trace_ent) && !(trace_ent.items & ITEM_Strength.m_itemid))
-                       reverse = false;
+       if(trace_ent && IS_PLAYER(trace_ent) && !(trace_ent.items & ITEM_Strength.m_itemid))
+               reverse = false;
 
-               if(trace_ent && IS_MONSTER(trace_ent))
-                       reverse = true;
-       }
+       if(trace_ent && IS_MONSTER(trace_ent))
+               reverse = true;
 
        // TODO: fix this... tracing is broken if the floor is thin
        /*