From: Mario Date: Wed, 19 Oct 2016 20:37:37 +0000 (+1000) Subject: Don't check trace_fraction on all cases X-Git-Tag: xonotic-v0.8.2~497 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e2dc7a8835d96461967a9aa9381584a826b04631;p=xonotic%2Fxonotic-data.pk3dir.git Don't check trace_fraction on all cases --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 0b43ab787..44ce0245b 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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 /*