From 9c0651eb102ec822c44646317caa80c6a55aad0f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 13 Jun 2010 19:59:39 +0200 Subject: [PATCH] the trivial movetypes do not have to match the server's ticrate as they are ticrate independent, saving some CPU cycles on csqc NOTE: this assumption is only true if MOVETYPE_FLY projectiles detonate on impact. If they continue moving, we might still be ticrate dependent. --- qcsrc/client/projectile.qc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/projectile.qc b/qcsrc/client/projectile.qc index b67cc76aa..e1f325a67 100644 --- a/qcsrc/client/projectile.qc +++ b/qcsrc/client/projectile.qc @@ -69,7 +69,15 @@ void Projectile_Draw() if(self.count & 0x80) { //self.move_flags &~= FL_ONGROUND; - Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy); + if(self.move_movetype == MOVETYPE_NONE || self.move_movetype == MOVETYPE_FLY) + Movetype_Physics_NoMatchServer(); + // the trivial movetypes do not have to match the + // server's ticrate as they are ticrate independent + // NOTE: this assumption is only true if MOVETYPE_FLY + // projectiles detonate on impact. If they continue + // moving, we might still be ticrate dependent. + else + Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy); if(!(self.move_flags & FL_ONGROUND)) self.angles = vectoangles(self.velocity); } -- 2.39.2