From: TimePath Date: Thu, 18 Dec 2014 02:48:15 +0000 (+1100) Subject: Add a cvar to disable jetpack jump X-Git-Tag: xonotic-v0.8.0~52^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=21ec82cbc72e9cab1b0ba43c1a68496bce0b284c;p=xonotic%2Fxonotic-data.pk3dir.git Add a cvar to disable jetpack jump --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index bcfa17980..9e10fc194 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1026,6 +1026,8 @@ seta cl_clippedspectating 1 "movement collision for spectators so that you can't seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway." +seta cl_jetpack_jump 1 "Activate jetpack by pressing jump in the air. 0 = Disable, 1 = Enable" + // must be at the bottom of this file: set g_bugrigs 0 diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index bca53e50d..91c91476d 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -163,6 +163,7 @@ void CheckPlayerJump() { if (self.BUTTON_JUMP && (!PlayerJump() || self.multijump_count > 0) || self.BUTTON_JETPACK) { + if (self.cvar_cl_jetpack_jump || self.BUTTON_JETPACK) if (!self.jetpack_stopped && (!autocvar_g_jetpack_fuel || self.ammo_fuel > 0 || self.items & IT_UNLIMITED_WEAPON_AMMO) && !self.frozen) { self.items |= IT_USING_JETPACK; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index a4f315406..11153d518 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -261,6 +261,7 @@ float default_weapon_alpha; .float cvar_cl_handicap; .float cvar_cl_clippedspectating; .float cvar_cl_autoscreenshot; +.float cvar_cl_jetpack_jump; .float cvar_cl_movement_track_canjump; .float cvar_cl_newusekeysupported; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 7eec95d03..1a2f25d1f 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -489,6 +489,7 @@ void GetCvars(float f) GetCvars_handleFloat(s, f, autoswitch, "cl_autoswitch"); GetCvars_handleFloat(s, f, cvar_cl_autoscreenshot, "cl_autoscreenshot"); + GetCvars_handleFloat(s, f, cvar_cl_jetpack_jump, "cl_jetpack_jump"); GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion"); GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap"); GetCvars_handleFloat(s, f, cvar_cl_clippedspectating, "cl_clippedspectating");