#include "constants.qh"
#include "g_hook.qh"
#include "ipban.qh"
-#include "mutators/mutators_include.qh"
+#include "mutators/all.qh"
#include "t_items.qh"
#include "weapons/accuracy.qh"
#include "weapons/csqcprojectile.qh"
{
int i = weaponinfo.weapon;
int d = 0;
+ bool allow_mutatorblocked = false;
- if (!i)
+ if(!i)
return 0;
- if (g_lms || g_ca || allguns)
+ bool mutator_returnvalue = MUTATOR_CALLHOOK(WantWeapon, weaponinfo, d, allguns, allow_mutatorblocked);
+ d = ret_float;
+ allguns = want_allguns;
+ allow_mutatorblocked = false;
+
+ if(allguns)
{
if(weaponinfo.spawnflags & WEP_FLAG_NORMAL)
d = true;
else
d = false;
}
- else if (g_cts)
- d = (i == WEP_SHOTGUN.m_id);
- else if (g_nexball)
- d = 0; // weapon is set a few lines later
- else
+ else if(!mutator_returnvalue)
d = !(!weaponinfo.weaponstart);
- if(!g_cts && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns
+ if(!allow_mutatorblocked && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns
d = 0;
float t = weaponinfo.weaponstartoverride;
g_weaponarena_weapons = '0 0 0';
s = cvar_string("g_weaponarena");
- if (s == "0" || s == "")
- {
- if(g_ca || g_freezetag)
- s = "most";
- }
+
+ MUTATOR_CALLHOOK(SetWeaponArena, s);
+ s = ret_string;
if (s == "0" || s == "")
{