#include "sv_new_toys.qh"
#include "../random_items/sv_random_items.qh"
+#include <server/weapons/spawning.qh>
/*
-> This will spawn as Rifle in this mutator ONLY, and as Vortex otherwise.
{
-"classname" "weapon_vortext"
+"classname" "weapon_vortex"
"new_toys" "vortex rifle"
}
-> This will spawn as either Vortex or Rifle in this mutator ONLY, and as Vortex otherwise.
*/
-string autocvar_g_new_toys;
+//string autocvar_g_new_toys;
bool nt_IsNewToy(int w);
-REGISTER_MUTATOR(nt, expr_evaluate(autocvar_g_new_toys) && !cvar("g_instagib") && !cvar("g_overkill"))
+REGISTER_MUTATOR(nt, expr_evaluate(cvar_string("g_new_toys")) && !MUTATOR_IS_ENABLED(mutator_instagib) && !MUTATOR_IS_ENABLED(ok))
{
MUTATOR_ONADD
{
.string new_toys;
float autocvar_g_new_toys_autoreplace;
-bool autocvar_g_new_toys_use_pickupsound = true;
+bool autocvar_g_new_toys_use_pickupsound = false;
const float NT_AUTOREPLACE_NEVER = 0;
const float NT_AUTOREPLACE_ALWAYS = 1;
const float NT_AUTOREPLACE_RANDOM = 2;
MUTATOR_HOOKFUNCTION(nt, SetWeaponreplace)
{
- if (autocvar_g_random_items)
+ if (MUTATOR_IS_ENABLED(random_items))
{
// Do not replace weapons when random items are enabled.
return;