X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qc;h=7e63442ca2bea6fb7bfeffb4b02f32107c9139b4;hp=5d4beb1acf1a7615391d14f5f035a264ca7875ca;hb=d44927502027bfa3ccd6ccc98d9b7d6285c182c3;hpb=e875ef0ccd65ad36b9c1e87a2f759378d501b205 diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 5d4beb1ac..7e63442ca 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -4,8 +4,11 @@ #ifdef SVQC +#include #include +#include #include "../mapobjects/trigger/viewloc.qh" +#include // client side physics bool Physics_Valid(string thecvar) @@ -40,7 +43,7 @@ void Physics_UpdateStats(entity this) STAT(MOVEVARS_HIGHSPEED, this) = autocvar_g_movement_highspeed; MUTATOR_CALLHOOK(PlayerPhysics_UpdateStats, this); - float maxspd_mod = PHYS_HIGHSPEED(this) * ((this.swampslug.active) ? this.swampslug.swamp_slowdown : 1); + float maxspd_mod = PHYS_HIGHSPEED(this) * ((this.swampslug.active == ACTIVE_ACTIVE) ? this.swampslug.swamp_slowdown : 1); STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking if (autocvar_g_movement_highspeed_q3_compat) { STAT(MOVEVARS_AIRACCEL_QW, this) = Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw); @@ -421,9 +424,6 @@ bool PlayerJump(entity this) SET_JUMP_HELD(this); #ifdef SVQC - - this.oldvelocity_z = this.velocity_z; - animdecide_setaction(this, ANIMACTION_JUMP, true); if (autocvar_g_jump_grunt) @@ -628,7 +628,7 @@ void PM_check_hitground(entity this) if (!this.wasFlying) return; this.wasFlying = false; if (this.waterlevel >= WATERLEVEL_SWIMMING) return; - if (time < this.ladder_time) return; + if (this.ladder_entity) return; for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot];