if (!isPushable(targ))
return false;
+ vector org = targ.origin;
+#ifdef SVQC
+ if(autocvar_sv_vq3compat)
+#elif defined(CSQC)
+ if(STAT(VQ3COMPAT))
+#endif
+ {
+ org.z += targ.mins_z;
+ org.z += 1; // off by 1!
+ }
+
if(this.enemy)
{
- targ.velocity = trigger_push_calculatevelocity(targ.origin, this.enemy, this.height, targ);
+ targ.velocity = trigger_push_calculatevelocity(org, this.enemy, this.height, targ);
}
else if(this.target && this.target != "")
{
else
RandomSelection_AddEnt(e, 1, 1);
}
- targ.velocity = trigger_push_calculatevelocity(targ.origin, RandomSelection_chosen_ent, this.height, targ);
+ targ.velocity = trigger_push_calculatevelocity(org, RandomSelection_chosen_ent, this.height, targ);
}
else
{
if(GAMEPLAYFIX_EASIERWATERJUMP(this) && (this.flags & FL_WATERJUMP) && !(blocked & 8))
this.velocity = primal_velocity;
+ if(PHYS_WALLCLIP(this) && this.pm_time && !(this.flags & FL_WATERJUMP) && !(blocked & 8))
+ this.velocity = primal_velocity;
+
if(applygravity)
{
if(!GAMEPLAYFIX_NOGRAVITYONGROUND || !IS_ONGROUND(this))
#define PHYS_JUMPSTEP(s) STAT(MOVEVARS_JUMPSTEP)
#define PHYS_WALLFRICTION(s) STAT(MOVEVARS_WALLFRICTION)
+#define PHYS_WALLCLIP(s) STAT(MOVEVARS_WALLCLIP)
+
#ifdef CSQC
.float bouncestop;
.float bouncefactor;
void set_movetype(entity this, int mt);
+.float pm_time;
+
.float move_movetype;
.float move_time;
//.vector move_origin;
vector start_origin = this.origin;
vector start_velocity = this.velocity;
+ if(PHYS_WALLCLIP(this) && this.pm_time)
+ {
+ if(dt >= this.pm_time || (this.flags & FL_WATERJUMP))
+ this.pm_time = 0;
+ else
+ this.pm_time -= dt;
+ }
+
int clip = _Movetype_FlyMove(this, dt, applygravity, stepnormal, GAMEPLAYFIX_STEPMULTIPLETIMES(this) ? PHYS_STEPHEIGHT(this) : 0);
if (GAMEPLAYFIX_DOWNTRACEONGROUND(this) && !(clip & 1))
// if the move did not hit the ground at any point, we're not on ground
if (!(clip & 1))
UNSET_ONGROUND(this);
+ else if(PHYS_WALLCLIP(this) && !this.groundentity && start_velocity.z < -200) // don't do landing time if we were just going down a slope
+ this.pm_time = 0.25;
_Movetype_CheckVelocity(this);
_Movetype_LinkEdict(this, true);
#endif
REGISTER_STAT(SLICK_APPLYGRAVITY, bool, autocvar_sv_slick_applygravity)
+#ifdef SVQC
+bool autocvar_sv_vq3compat;
+#endif
+REGISTER_STAT(VQ3COMPAT, bool, autocvar_sv_vq3compat)
+
#ifdef SVQC
#include "physics/movetypes/movetypes.qh"
float warmup_limit;
REGISTER_STAT(MOVEVARS_AIRACCEL_QW, float)
REGISTER_STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, float)
REGISTER_STAT(MOVEVARS_SPECIALCOMMAND, bool)
+#ifdef SVQC
+bool autocvar_sv_wallclip;
+#endif
+REGISTER_STAT(MOVEVARS_WALLCLIP, bool, autocvar_sv_wallclip)
#ifdef CSQC
bool autocvar_sv_precacheplayermodels;
//float autocvar_sv_precacheweapons; // WEAPONTODO?
bool autocvar_sv_q3acompat_machineshotgunswap;
-bool autocvar_sv_vq3compat;
bool autocvar_sv_servermodelsonly;
int autocvar_sv_spectate;
float autocvar_sv_spectator_speed_multiplier;