From: Mario Date: Fri, 22 Jul 2016 20:50:25 +0000 (+1000) Subject: Don't constantly unset onground status on casings (makes them a bit jumpy, but fixes... X-Git-Tag: xonotic-v0.8.2~700^2~39^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=366896e7245f72562521ca1d957505198b1bb275;p=xonotic%2Fxonotic-data.pk3dir.git Don't constantly unset onground status on casings (makes them a bit jumpy, but fixes odd behaviour) --- 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); }