From c2d8eb11fb8cbdf0925868e674d2a4fa2215c872 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 9 Aug 2013 05:45:43 +1000 Subject: [PATCH] Remove rifle arena --- mutators.cfg | 11 -- qcsrc/server/miscfunctions.qc | 1 - qcsrc/server/mutators/mutator_riflearena.qc | 110 -------------------- qcsrc/server/mutators/mutators.qh | 1 - qcsrc/server/progs.src | 1 - 5 files changed, 124 deletions(-) delete mode 100644 qcsrc/server/mutators/mutator_riflearena.qc diff --git a/mutators.cfg b/mutators.cfg index 44739e06d..e88fbc0af 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -149,17 +149,6 @@ set g_nades_nade_force 650 set g_nades_nade_newton_style 0 -// ============= -// rifle arena -// ============= -set g_riflearena 0 -set g_riflearena_rifle_secondary_spread 0 -set g_riflearena_rifle_secondary_shots 1 -set g_riflearena_rifle_secondary_animtime 0.15 -set g_riflearena_rifle_secondary_refire 0.15 -set g_riflearena_rifle_secondary_damage 40 - - // ============ // camp check // ============ diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 018e4a3cb..ef05b5a5b 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -923,7 +923,6 @@ void readlevelcvars(void) CHECK_MUTATOR_ADD("g_melee_only", mutator_melee_only, !cvar("g_minstagib")); CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1); CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1); - CHECK_MUTATOR_ADD("g_riflearena", mutator_riflearena, !cvar("g_minstagib")); CHECK_MUTATOR_ADD("g_campcheck", mutator_campcheck, 1); #undef CHECK_MUTATOR_ADD diff --git a/qcsrc/server/mutators/mutator_riflearena.qc b/qcsrc/server/mutators/mutator_riflearena.qc deleted file mode 100644 index 64194335c..000000000 --- a/qcsrc/server/mutators/mutator_riflearena.qc +++ /dev/null @@ -1,110 +0,0 @@ -void ra_SetCvars() -{ - cvar_settemp("g_balance_rifle_secondary_spread", ftos(cvar("g_riflearena_rifle_secondary_spread"))); - cvar_settemp("g_balance_rifle_secondary_shots", ftos(cvar("g_riflearena_rifle_secondary_shots"))); - cvar_settemp("g_balance_rifle_secondary_animtime", ftos(cvar("g_riflearena_rifle_secondary_animtime"))); - cvar_settemp("g_balance_rifle_secondary_refire", ftos(cvar("g_riflearena_rifle_secondary_refire"))); - cvar_settemp("g_balance_rifle_secondary_damage", ftos(cvar("g_riflearena_rifle_secondary_damage"))); -} - -MUTATOR_HOOKFUNCTION(ra_PlayerDamage) -{ - if(IS_PLAYER(frag_attacker)) - if(IS_PLAYER(frag_target)) - { - if (DEATH_ISWEAPON(frag_deathtype, WEP_LASER)) - { - if(frag_attacker == frag_target) - frag_damage = 5; - else - frag_damage = 0; - if (frag_target != frag_attacker) - { - if (frag_target.health >= 1 && IS_PLAYER(frag_target)) - centerprint(frag_attacker, "Laser inflicts no damage!"); - frag_force = '0 0 0'; - } - } - } - - return FALSE; -} - -MUTATOR_HOOKFUNCTION(ra_PlayerSpawn) -{ - WEPSET_CLEAR_E(self); - WEPSET_OR_EW(self, WEP_RIFLE); - WEPSET_OR_EW(self, WEP_LASER); - - return FALSE; -} - -MUTATOR_HOOKFUNCTION(ra_FilterItem) -{ - switch (self.items) - { - case IT_5HP: - case IT_ARMOR_SHARD: - return FALSE; - } - - return TRUE; -} - -MUTATOR_HOOKFUNCTION(ra_StartItems) -{ - start_items |= IT_UNLIMITED_AMMO; - start_ammo_nails = 100; - - return FALSE; -} - -MUTATOR_HOOKFUNCTION(ra_ForbidThrowCurrentWeapon) -{ - nades_CheckThrow(); - return TRUE; -} - -MUTATOR_HOOKFUNCTION(ra_BuildMutatorsString) -{ - ret_string = strcat(ret_string, ":RA"); - return FALSE; -} - -MUTATOR_HOOKFUNCTION(ra_BuildMutatorsPrettyString) -{ - ret_string = strcat(ret_string, ", Rifle Arena"); - return FALSE; -} - -MUTATOR_HOOKFUNCTION(ra_SetModname) -{ - modname = "Rifle Arena"; - return TRUE; -} - -MUTATOR_DEFINITION(mutator_riflearena) -{ - MUTATOR_HOOK(PlayerDamage_Calculate, ra_PlayerDamage, CBC_ORDER_ANY); - MUTATOR_HOOK(PlayerSpawn, ra_PlayerSpawn, CBC_ORDER_ANY); - MUTATOR_HOOK(FilterItem, ra_FilterItem, CBC_ORDER_ANY); - MUTATOR_HOOK(SetStartItems, ra_StartItems, CBC_ORDER_ANY); - MUTATOR_HOOK(ForbidThrowCurrentWeapon, ra_ForbidThrowCurrentWeapon, CBC_ORDER_ANY); - MUTATOR_HOOK(BuildMutatorsString, ra_BuildMutatorsString, CBC_ORDER_ANY); - MUTATOR_HOOK(BuildMutatorsPrettyString, ra_BuildMutatorsPrettyString, CBC_ORDER_ANY); - - MUTATOR_ONADD - { - ra_SetCvars(); - - weapon_action(WEP_LASER, WR_PRECACHE); - weapon_action(WEP_RIFLE, WR_PRECACHE); - } - MUTATOR_ONREMOVE - { - print("This cannot be removed at runtime\n"); - return -1; - } - - return FALSE; -} diff --git a/qcsrc/server/mutators/mutators.qh b/qcsrc/server/mutators/mutators.qh index 6af356658..e7a95de7e 100644 --- a/qcsrc/server/mutators/mutators.qh +++ b/qcsrc/server/mutators/mutators.qh @@ -28,7 +28,6 @@ MUTATOR_DECLARATION(mutator_random_gravity); MUTATOR_DECLARATION(mutator_multijump); MUTATOR_DECLARATION(mutator_melee_only); MUTATOR_DECLARATION(mutator_nades); -MUTATOR_DECLARATION(mutator_riflearena); MUTATOR_DECLARATION(mutator_campcheck); MUTATOR_DECLARATION(sandbox); diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index 839d1dd68..e9e9a4b8c 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -257,7 +257,6 @@ mutators/mutator_random_gravity.qc mutators/mutator_multijump.qc mutators/mutator_melee_only.qc mutators/mutator_nades.qc -mutators/mutator_riflearena.qc mutators/mutator_campcheck.qc ../warpzonelib/anglestransform.qc -- 2.39.2