]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
remove an useless trace
authorRudolf Polzer <divverent@xonotic.org>
Thu, 29 Dec 2011 14:38:33 +0000 (15:38 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 29 Dec 2011 14:38:33 +0000 (15:38 +0100)
qcsrc/server/t_plats.qc

index ab121045b005392bdac38cfe20aacf5f953b5dd2..608912054f7ccb342ef51e19e1f6035ceea1b671 100644 (file)
@@ -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);
                }
        }