return s;
}
-bool autocvar_sv_qcphysics = false; // TODO this is for testing - remove when qcphysics work
+bool autocvar_sv_qcphysics = true; // TODO this is for testing - remove when qcphysics work
/**
=============
=============
*/
.float last_vehiclecheck;
+void Player_Physics(entity this);
void PlayerPreThink (entity this)
{
STAT(GUNALIGN, this) = CS(this).cvar_cl_gunalign; // TODO
if(this.(weaponentity).m_weapon == WEP_Null)
this.(weaponentity).clip_load = this.(weaponentity).clip_size = 0;
}
+
+ Player_Physics(this);
}
void DrownPlayer(entity this)
.bool move_qcphysics;
+.vector morigin, mvelocity;
+
void Player_Physics(entity this)
{
- this.movetype = (this.move_qcphysics) ? MOVETYPE_QCPLAYER : this.move_movetype;
+ this.movetype = (this.move_qcphysics) ? MOVETYPE_WALK : this.move_movetype;
if(!this.move_qcphysics)
return;
if(!frametime && !CS(this).pm_frametime)
return;
+ vector old_origin = this.origin;
+ vector old_angles = this.angles;
+ vector old_vangle = this.v_angle;
+ vector old_velocity = this.velocity;
+ vector old_avelocity = this.avelocity;
+ int old_flags = this.flags;
Movetype_Physics_NoMatchTicrate(this, CS(this).pm_frametime, true);
CS(this).pm_frametime = 0;
+
+ //if(this.velocity)
+ //LOG_INFO("QC physics origin: ", vtos(this.origin), ", velocity: ", vtos(this.velocity));
+ this.morigin = this.origin;
+ this.mvelocity = this.velocity;
+ setorigin(this, old_origin);
+ this.angles = old_angles;
+ this.v_angle = old_vangle;
+ this.velocity = old_velocity;
+ this.avelocity = old_avelocity;
+ this.flags = old_flags;
}
/*
*/
void PlayerPostThink (entity this)
{
- Player_Physics(this);
+ //if(this.velocity)
+ //LOG_INFO("Engine physics origin: ", vtos(this.origin), ", velocity: ", vtos(this.velocity));
+ if(this.morigin != this.origin || this.velocity != this.mvelocity)
+ LOG_INFOF("DIFFERS: QC %v %v, Engine %v %v", this.morigin, this.mvelocity, this.origin, this.velocity);
if (sv_maxidle > 0)
if (frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).