From 366896e7245f72562521ca1d957505198b1bb275 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 23 Jul 2016 06:50:25 +1000 Subject: [PATCH] Don't constantly unset onground status on casings (makes them a bit jumpy, but fixes odd behaviour) --- qcsrc/common/effects/qc/casings.qc | 2 +- qcsrc/common/physics/movetypes/movetypes.qc | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/effects/qc/casings.qc b/qcsrc/common/effects/qc/casings.qc index 4ef7b51bc..30543adee 100644 --- a/qcsrc/common/effects/qc/casings.qc +++ b/qcsrc/common/effects/qc/casings.qc @@ -53,7 +53,7 @@ void Casing_Draw(entity this) { this.angles_x = 0; this.angles_z = 0; - UNSET_ONGROUND(this); + //UNSET_ONGROUND(this); } Movetype_Physics_MatchTicrate(this, autocvar_cl_casings_ticrate, autocvar_cl_casings_sloppy); diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index c48b4717c..285bc164a 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -653,7 +653,6 @@ void Movetype_Physics_MatchServer(entity this, bool sloppy) .vector tic_saved_angles; void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy) // SV_Physics_Entity { - // this will also detect new updates #define X(s) \ if(this.(s) != this.tic_saved_##s) \ this.tic_##s = this.(s) @@ -678,6 +677,12 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy) // SV_Ph this.tic_avelocity = this.avelocity; this.tic_angles = this.angles; this.tic_flags = this.flags; + + this.tic_saved_flags = this.flags; + this.tic_saved_velocity = this.velocity; + this.tic_saved_origin = this.origin; + this.tic_saved_avelocity = this.avelocity; + this.tic_saved_angles = this.angles; return; } @@ -694,7 +699,7 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy) // SV_Ph { this.flags = this.tic_flags; this.velocity = this.tic_velocity; - this.origin = this.tic_origin; + setorigin(this, this.tic_origin); this.avelocity = this.tic_avelocity; this.angles = this.tic_angles; _Movetype_Physics_Frame(this, tr); @@ -730,7 +735,10 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy) // SV_Ph } else { + vector oldorg = this.origin; + this.origin = this.tic_origin; _Movetype_PushEntityTrace(this, dt * this.velocity); + this.origin = oldorg; if(!trace_startsolid) setorigin(this, trace_endpos); } -- 2.39.2