X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator_new_toys.qc;h=bca6595c141218658f422c814f1b13145ce02519;hb=6f37a8f8076a572097afb13de2c367a72717c927;hp=f384a0aad3380e128365af9cfdff18727c6c3fae;hpb=57f409333cc09406298b66421d5e99357a7f586d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator_new_toys.qc b/qcsrc/server/mutators/mutator_new_toys.qc index f384a0aad..bca6595c1 100644 --- a/qcsrc/server/mutators/mutator_new_toys.qc +++ b/qcsrc/server/mutators/mutator_new_toys.qc @@ -1,10 +1,14 @@ +#include "../_.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 +NEW rifle hlac minel seeker IDEAS OPEN flak OPEN FUN FUN FUN FUN @@ -18,28 +22,28 @@ weaponreplace lists. 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! @@ -69,9 +73,9 @@ roflsound "New toys, new toys!" sound. .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) { @@ -87,9 +91,10 @@ float nt_IsNewToy(float w) case WEP_MINE_LAYER: case WEP_HLAC: case WEP_RIFLE: - return TRUE; + case WEP_SHOCKWAVE: + return true; default: - return FALSE; + return false; } } @@ -98,9 +103,10 @@ string nt_GetFullReplacement(string w) 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; } } @@ -127,7 +133,7 @@ MUTATOR_HOOKFUNCTION(nt_SetStartItems) WepSet newdefault; WepSet warmup_newdefault; - + newdefault = '0 0 0'; warmup_newdefault = '0 0 0';