+#include "../_all.qh"
+
+#include "mutator.qh"
+
/*
-CORE laser nex lg rl cry gl elec hagar fireb hook
- minsta porto
+CORE laser vortex lg rl cry gl elec hagar fireb hook
+ vaporizer porto
tuba
NEW rifle hlac minel seeker
Entity:
{
-"classname" "weapon_nex"
+"classname" "weapon_vortex"
"new_toys" "rifle"
}
--> This will spawn as Rifle in this mutator ONLY, and as Nex otherwise.
+-> This will spawn as Rifle in this mutator ONLY, and as Vortex otherwise.
{
-"classname" "weapon_nex"
-"new_toys" "nex rifle"
+"classname" "weapon_vortext"
+"new_toys" "vortex rifle"
}
--> This will spawn as either Nex or Rifle in this mutator ONLY, and as Nex otherwise.
+-> This will spawn as either Vortex or Rifle in this mutator ONLY, and as Vortex otherwise.
{
-"classname" "weapon_nex"
-"new_toys" "nex"
+"classname" "weapon_vortex"
+"new_toys" "vortex"
}
--> This is always a Nex.
+-> This is always a Vortex.
If the map specifies no "new_toys" argument
There will be two default replacements selectable: "replace all" and "replace random".
-In "replace all" mode, e.g. Nex will have the default replacement "rifle".
-In "replace random" mode, Nex will have the default replacement "nex rifle".
+In "replace all" mode, e.g. Vortex will have the default replacement "rifle".
+In "replace random" mode, Vortex will have the default replacement "vortex rifle".
This mutator's replacements run BEFORE regular weaponreplace!
.string new_toys;
float autocvar_g_new_toys_autoreplace;
-#define NT_AUTOREPLACE_NEVER 0
-#define NT_AUTOREPLACE_ALWAYS 1
-#define NT_AUTOREPLACE_RANDOM 2
+const float NT_AUTOREPLACE_NEVER = 0;
+const float NT_AUTOREPLACE_ALWAYS = 1;
+const float NT_AUTOREPLACE_RANDOM = 2;
MUTATOR_HOOKFUNCTION(nt_SetModname)
{
{
switch(w)
{
- case WEP_SEEKER:
- case WEP_MINE_LAYER:
- case WEP_HLAC:
- case WEP_RIFLE:
- return TRUE;
+ case WEP_SEEKER.m_id:
+ case WEP_MINE_LAYER.m_id:
+ case WEP_HLAC.m_id:
+ case WEP_RIFLE.m_id:
+ case WEP_SHOCKWAVE.m_id:
+ return true;
default:
- return FALSE;
+ return false;
}
}
switch(w)
{
case "hagar": return "seeker";
- case "rocketlauncher": return "minelayer";
- case "uzi": return "hlac";
- case "nex": return "rifle";
+ case "devastator": return "minelayer";
+ case "machinegun": return "hlac";
+ case "vortex": return "rifle";
+ case "shotgun": return "shockwave";
default: return string_null;
}
}
MUTATOR_HOOKFUNCTION(nt_FilterItem)
{
if(nt_IsNewToy(self.weapon))
- self.item_pickupsound = "weapons/weaponpickup_new_toys.wav";
+ self.item_pickupsound = W_Sound("weaponpickup_new_toys");
return 0;
}
if(time > 1) // game loads at time 1
error("This cannot be added at runtime\n");
- precache_sound("weapons/weaponpickup_new_toys.wav");
+ precache_sound(W_Sound("weaponpickup_new_toys"));
// mark the guns as ok to use by e.g. impulse 99
float i;
MUTATOR_ONREMOVE
{
- print("This cannot be removed at runtime\n");
+ LOG_INFO("This cannot be removed at runtime\n");
return -1;
}