/** weapon info entity */ i(entity, MUTATOR_ARGV_0_entity) \
/** do want? */ i(float, MUTATOR_ARGV_1_float) \
/**/ o(float, MUTATOR_ARGV_1_float) \
- /** want all guns */ i(bool, MUTATOR_ARGV_2_bool) \
- /**/ o(bool, MUTATOR_ARGV_2_bool) \
+ /** want all guns */ i(int, MUTATOR_ARGV_2_int) \
+ /**/ o(int, MUTATOR_ARGV_2_int) \
/** want mutator blocked */ i(bool, MUTATOR_ARGV_3_bool) \
/**/ o(bool, MUTATOR_ARGV_3_bool) \
/**/
}
}
-float want_weapon(entity weaponinfo, float allguns)
+int want_weapon(entity weaponinfo, int allguns)
{
int d = 0;
bool allow_mutatorblocked = false;
bool mutator_returnvalue = MUTATOR_CALLHOOK(WantWeapon, weaponinfo, d, allguns, allow_mutatorblocked);
d = M_ARGV(1, float);
- allguns = M_ARGV(2, bool);
+ allguns = M_ARGV(2, int);
allow_mutatorblocked = M_ARGV(3, bool);
- if(allguns)
+ if(allguns == 1)
+ d = boolean(!(weaponinfo.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK)));
+ else if(allguns == 2)
d = boolean((weaponinfo.spawnflags & WEP_FLAG_NORMAL) && !(weaponinfo.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK)));
else if(!mutator_returnvalue)
d = !(!weaponinfo.weaponstart);
bool autocvar_g_use_ammunition;
bool autocvar_g_jetpack;
int autocvar_g_warmup;
-bool autocvar_g_warmup_allguns;
+int autocvar_g_warmup_allguns;
bool autocvar_g_warmup_allow_timeout;
#define autocvar_g_weaponarena cvar_string("g_weaponarena")
string autocvar_quit_and_redirect;
float warmup_start_armorvalue;
float g_weapon_stay;
-float want_weapon(entity weaponinfo, float allguns); // WEAPONTODO: what still needs done?
+int want_weapon(entity weaponinfo, int allguns); // WEAPONTODO: what still needs done?
float g_grappling_hook;
int warmup_stage;