From: Rudolf Polzer Date: Thu, 29 Dec 2011 14:38:33 +0000 (+0100) Subject: remove an useless trace X-Git-Tag: xonotic-v0.6.0~74^2~23 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a343ce0ad217507040ef083c89b7e07a2b01f917;p=xonotic%2Fxonotic-data.pk3dir.git remove an useless trace --- diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index ab121045b..608912054 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -2065,16 +2065,16 @@ void conveyor_think() other.flags &~= FL_ONGROUND; continue; } - tracebox(other.origin, other.mins, other.maxs, other.origin + self.movedir * (self.speed * sys_frametime), MOVE_NORMAL, other); - if(trace_fraction > 0) + if(other.flags & FL_CLIENT) // doing it via velocity has quite some advantages { - if(other.flags & FL_CLIENT) // doing it via velocity has quite some advantages - { - float f = 1 - frametime * autocvar_sv_friction; - if(f > 0) - other.velocity += self.movedir * self.speed * (1 / f - 1); - } - else + float f = 1 - frametime * autocvar_sv_friction; + if(f > 0) + other.velocity += self.movedir * self.speed * (1 / f - 1); + } + else + { + tracebox(other.origin, other.mins, other.maxs, other.origin + self.movedir * (self.speed * sys_frametime), MOVE_NORMAL, other); + if(trace_fraction > 0) setorigin(other, trace_endpos); } }