animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
- if(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)
}
// Globals
-float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_minstagib;
+float g_cloaked, g_footsteps, g_grappling_hook, g_minstagib;
float g_warmup_limit;
float g_warmup_allguns;
float g_warmup_allow_timeout;
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_sandbox", sandbox, 1);
#undef CHECK_MUTATOR_ADD
g_cloaked = cvar("g_cloaked");
if(g_cts)
g_cloaked = 1; // always enable cloak in CTS
- g_jump_grunt = cvar("g_jump_grunt");
g_footsteps = cvar("g_footsteps");
g_grappling_hook = cvar("g_grappling_hook");
g_jetpack = cvar("g_jetpack");
--- /dev/null
+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, norecoil_BuildMutatorsString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
MUTATOR_DECLARATION(mutator_random_gravity);
MUTATOR_DECLARATION(mutator_norecoil);
MUTATOR_DECLARATION(mutator_multijump);
+MUTATOR_DECLARATION(mutator_jump_grunt);
MUTATOR_DECLARATION(sandbox);
mutators/mutator_random_gravity.qc
mutators/mutator_norecoil.qc
mutators/mutator_multijump.qc
+mutators/mutator_jump_grunt.qc
../warpzonelib/anglestransform.qc
../warpzonelib/mathlib.qc