X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qc;h=351725bc14698fe92da40c5aa533947e5a7e0381;hp=ac4c97618bd3fc38bd5446e956b1fd34c992a7c2;hb=f41f81f37e3ecf5a2d14f7bc7ffd7bbf09fff32e;hpb=175b123de833e7964cd69cf8110e4e785c65bd88 diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index ac4c97618..351725bc1 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -15,13 +15,13 @@ bool Physics_Valid(string thecvar) float Physics_ClientOption(entity this, string option, float defaultval) { - if(IS_REAL_CLIENT(this) && Physics_Valid(this.cvar_cl_physics)) + if(IS_REAL_CLIENT(this) && Physics_Valid(CS(this).cvar_cl_physics)) { - string s = strcat("g_physics_", this.cvar_cl_physics, "_", option); + string s = strcat("g_physics_", CS(this).cvar_cl_physics, "_", option); if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS) return cvar(s); } - if(autocvar_g_physics_clientselect && autocvar_g_physics_clientselect_default) + if(autocvar_g_physics_clientselect && autocvar_g_physics_clientselect_default && autocvar_g_physics_clientselect_default != "") { string s = strcat("g_physics_", autocvar_g_physics_clientselect_default, "_", option); if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS) @@ -75,6 +75,7 @@ void Physics_UpdateStats(entity this) STAT(MOVEVARS_AIRACCELERATE, this) = Physics_ClientOption(this, "airaccelerate", autocvar_sv_airaccelerate); STAT(MOVEVARS_AIRSTOPACCELERATE, this) = Physics_ClientOption(this, "airstopaccelerate", autocvar_sv_airstopaccelerate); STAT(MOVEVARS_JUMPVELOCITY, this) = Physics_ClientOption(this, "jumpvelocity", autocvar_sv_jumpvelocity); + STAT(MOVEVARS_JUMPVELOCITY_CROUCH, this) = Physics_ClientOption(this, "jumpvelocity_crouch", autocvar_sv_jumpvelocity_crouch); STAT(MOVEVARS_TRACK_CANJUMP, this) = Physics_ClientOption(this, "track_canjump", autocvar_sv_track_canjump); } #endif @@ -112,8 +113,8 @@ void PM_ClientMovement_UpdateStatus(entity this) break; // don't bother checking the others } } - if(this.waterlevel >= WATERLEVEL_SWIMMING) - do_crouch = false; + //if(this.waterlevel >= WATERLEVEL_SWIMMING) + //do_crouch = false; if(hud != HUD_NORMAL) do_crouch = false; if(STAT(FROZEN, this)) @@ -303,7 +304,7 @@ bool PlayerJump(entity this) #endif bool doublejump = false; - float mjumpheight = PHYS_JUMPVELOCITY(this); + float mjumpheight = ((PHYS_JUMPVELOCITY_CROUCH(this) && IS_DUCKED(this)) ? PHYS_JUMPVELOCITY_CROUCH(this) : PHYS_JUMPVELOCITY(this)); bool track_jump = PHYS_CL_TRACK_CANJUMP(this); if (MUTATOR_CALLHOOK(PlayerJump, this, mjumpheight, doublejump)) @@ -433,7 +434,7 @@ void CheckWaterJump(entity this) #ifdef SVQC - #define JETPACK_JUMP(s) s.cvar_cl_jetpack_jump + #define JETPACK_JUMP(s) CS(s).cvar_cl_jetpack_jump #elif defined(CSQC) float autocvar_cl_jetpack_jump; #define JETPACK_JUMP(s) autocvar_cl_jetpack_jump @@ -491,7 +492,7 @@ void SpecialCommand(entity this) if(autocvar_sv_cheats || this.maycheat) { if (!CheatImpulse(this, CHIMPULSE_GIVE_ALL.impulse)) - LOG_INFO("A hollow voice says \"Plugh\".\n"); + LOG_INFO("A hollow voice says \"Plugh\"."); } else STAT(MOVEVARS_SPECIALCOMMAND, this) = true;