set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
set g_dodging 0 "set to 1 to enable dodging in games"
+set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
// first load all the mutators
if(cvar("g_nix"))
MUTATOR_ADD(mutator_nix);
+ if(cvar("g_dodging"))
+ MUTATOR_ADD(mutator_dodging);
+ if(cvar("g_rocket_flying"))
+ MUTATOR_ADD(mutator_rocketflying);
g_bugrigs = cvar("g_bugrigs");
g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement");
return 0;
}
-MUTATOR_DEFINITION(dodging)
+MUTATOR_DEFINITION(mutator_dodging)
{
// we need to be called before GetPressedKey does its thing so we can
// detect state changes and therefore dodging actions..
--- /dev/null
+MUTATOR_HOOKFUNCTION(rocketflying_EditProjectile)
+{
+ if(other.classname == "rocket")
+ {
+ // kill detonate delay of rockets
+ other.spawnshieldtime = time;
+ }
+}
+
+MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":RocketFlying");
+ return 0;
+}
+
+MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Rocket Flying");
+ return 0;
+}
+
+MUTATOR_DEFINITION(mutator_rocketflying)
+{
+ entity e;
+
+ MUTATOR_HOOK(EditProjectile, rocketflying_EditProjectile, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, rocketflying_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, rocketflying_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return 0;
+}
MUTATOR_DECLARATION(gamemode_keyhunt);
MUTATOR_DECLARATION(mutator_nix);
-
-MUTATOR_DECLARATION(dodging);
+MUTATOR_DECLARATION(mutator_dodging);
+MUTATOR_DECLARATION(mutator_rocketflying);
mutators/gamemode_keyhunt.qc
mutators/mutator_nix.qc
mutators/mutator_dodging.qc
+mutators/mutator_rocketflying.qc
../warpzonelib/anglestransform.qc
../warpzonelib/mathlib.qc
fraglimit_override = cvar("fraglimit_override");
leadlimit_override = cvar("leadlimit_override");
- if(cvar("g_dodging"))
- MUTATOR_ADD(dodging);
-
if(g_dm)
{
game = GAME_DEATHMATCH;