From: Mario Date: Thu, 4 Jul 2013 20:08:38 +0000 (+1000) Subject: Move jump grunt out of the mutator system (causes some issues with cl_movement_track_... X-Git-Tag: xonotic-v0.8.0~366^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=65124abcc210757dd9e6cd7e4cf4c7c9eb734dc6;p=xonotic%2Fxonotic-data.pk3dir.git Move jump grunt out of the mutator system (causes some issues with cl_movement_track_canjump) --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index e72cc4c02..63e31030e 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1255,3 +1255,4 @@ float autocvar_g_nades_nade_newton_style; float autocvar_g_campcheck_damage; float autocvar_g_campcheck_distance; float autocvar_g_campcheck_interval; +float autocvar_g_jump_grunt; diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 3dd91dfb4..329e7b56f 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -110,6 +110,9 @@ void PlayerJump (void) self.flags &~= FL_JUMPRELEASED; animdecide_setaction(self, ANIMACTION_JUMP, TRUE); + + if(autocvar_g_jump_grunt) + PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND); self.restart_jump = -1; // restart jump anim next time // value -1 is used to not use the teleport bit (workaround for tiny hitch when re-jumping) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 0e34fcc0b..593292c0a 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -921,7 +921,6 @@ void readlevelcvars(void) CHECK_MUTATOR_ADD("g_random_gravity", mutator_random_gravity, 1); CHECK_MUTATOR_ADD("g_norecoil", mutator_norecoil, 1); CHECK_MUTATOR_ADD("g_multijump", mutator_multijump, 1); - CHECK_MUTATOR_ADD("g_jump_grunt", mutator_jump_grunt, 1); CHECK_MUTATOR_ADD("g_footsteps", mutator_footsteps, 1); CHECK_MUTATOR_ADD("g_melee_only", mutator_melee_only, !cvar("g_minstagib")); CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1); diff --git a/qcsrc/server/mutators/mutator_jump_grunt.qc b/qcsrc/server/mutators/mutator_jump_grunt.qc deleted file mode 100644 index e5cc74fc5..000000000 --- a/qcsrc/server/mutators/mutator_jump_grunt.qc +++ /dev/null @@ -1,21 +0,0 @@ -MUTATOR_HOOKFUNCTION(grunt_PlayerJump) -{ - if(self.flags & FL_ONGROUND) - PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND); - - return FALSE; -} - -MUTATOR_HOOKFUNCTION(grunt_BuildMutatorsString) -{ - ret_string = strcat(ret_string, ":JumpGrunt"); - return FALSE; -} - -MUTATOR_DEFINITION(mutator_jump_grunt) -{ - MUTATOR_HOOK(PlayerJump, grunt_PlayerJump, CBC_ORDER_ANY); - MUTATOR_HOOK(BuildMutatorsString, grunt_BuildMutatorsString, CBC_ORDER_ANY); - - return FALSE; -} diff --git a/qcsrc/server/mutators/mutators.qh b/qcsrc/server/mutators/mutators.qh index 3d5ca7295..84dad48ca 100644 --- a/qcsrc/server/mutators/mutators.qh +++ b/qcsrc/server/mutators/mutators.qh @@ -27,7 +27,6 @@ MUTATOR_DECLARATION(mutator_bloodloss); MUTATOR_DECLARATION(mutator_random_gravity); MUTATOR_DECLARATION(mutator_norecoil); MUTATOR_DECLARATION(mutator_multijump); -MUTATOR_DECLARATION(mutator_jump_grunt); MUTATOR_DECLARATION(mutator_footsteps); MUTATOR_DECLARATION(mutator_melee_only); MUTATOR_DECLARATION(mutator_nades); diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index 78feb8f9f..6ee5e68ca 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -256,7 +256,6 @@ mutators/mutator_bloodloss.qc mutators/mutator_random_gravity.qc mutators/mutator_norecoil.qc mutators/mutator_multijump.qc -mutators/mutator_jump_grunt.qc mutators/mutator_footsteps.qc mutators/mutator_melee_only.qc mutators/mutator_nades.qc