/* mins */ ATTRIB(EWheel, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(EWheel, maxs, vector, '32 32 48');
/* modelname */ ATTRIB(EWheel, mdl, string, "ewheel-base2.md3");
-/* model */ ATTRIB(EWheel, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(EWheel, head_model, string, strzone(strcat("models/turrets/", "ewheel-gun1.md3")));
+/* model */ ATTRIB_STRZONE(EWheel, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(EWheel, head_model, string, strcat("models/turrets/", "ewheel-gun1.md3"));
/* netname */ ATTRIB(EWheel, netname, string, "ewheel");
/* fullname */ ATTRIB(EWheel, turret_name, string, _("eWheel Turret"));
ATTRIB(EWheel, m_weapon, Weapon, WEP_EWHEEL);
/* mins */ ATTRIB(Flac, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(Flac, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(Flac, mdl, string, "base.md3");
-/* model */ ATTRIB(Flac, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(Flac, head_model, string, strzone(strcat("models/turrets/", "flac.md3")));
+/* model */ ATTRIB_STRZONE(Flac, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(Flac, head_model, string, strcat("models/turrets/", "flac.md3"));
/* netname */ ATTRIB(Flac, netname, string, "flac");
/* fullname */ ATTRIB(Flac, turret_name, string, _("FLAC Cannon"));
ATTRIB(Flac, m_weapon, Weapon, WEP_FLAC);
/* mins */ ATTRIB(FusionReactor, mins, vector, '-34 -34 0');
/* maxs */ ATTRIB(FusionReactor, maxs, vector, '34 34 90');
/* modelname */ ATTRIB(FusionReactor, mdl, string, "base.md3");
-/* model */ ATTRIB(FusionReactor, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(FusionReactor, head_model, string, strzone(strcat("models/turrets/", "reactor.md3")));
+/* model */ ATTRIB_STRZONE(FusionReactor, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(FusionReactor, head_model, string, strcat("models/turrets/", "reactor.md3"));
/* netname */ ATTRIB(FusionReactor, netname, string, "fusionreactor");
/* fullname */ ATTRIB(FusionReactor, turret_name, string, _("Fusion Reactor"));
ENDCLASS(FusionReactor)
/* mins */ ATTRIB(Hellion, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(Hellion, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(Hellion, mdl, string, "base.md3");
-/* model */ ATTRIB(Hellion, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(Hellion, head_model, string, strzone(strcat("models/turrets/", "hellion.md3")));
+/* model */ ATTRIB_STRZONE(Hellion, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(Hellion, head_model, string, strcat("models/turrets/", "hellion.md3"));
/* netname */ ATTRIB(Hellion, netname, string, "hellion");
/* fullname */ ATTRIB(Hellion, turret_name, string, _("Hellion Missile Turret"));
ATTRIB(Hellion, m_weapon, Weapon, WEP_HELLION);
/* mins */ ATTRIB(HunterKiller, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(HunterKiller, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(HunterKiller, mdl, string, "base.md3");
-/* model */ ATTRIB(HunterKiller, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(HunterKiller, head_model, string, strzone(strcat("models/turrets/", "hk.md3")));
+/* model */ ATTRIB_STRZONE(HunterKiller, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(HunterKiller, head_model, string, strcat("models/turrets/", "hk.md3"));
/* netname */ ATTRIB(HunterKiller, netname, string, "hk");
/* fullname */ ATTRIB(HunterKiller, turret_name, string, _("Hunter-Killer Turret"));
ATTRIB(HunterKiller, m_weapon, Weapon, WEP_HK);
/* mins */ ATTRIB(MachineGunTurret, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(MachineGunTurret, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(MachineGunTurret, mdl, string, "base.md3");
-/* model */ ATTRIB(MachineGunTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(MachineGunTurret, head_model, string, strzone(strcat("models/turrets/", "machinegun.md3")));
+/* model */ ATTRIB_STRZONE(MachineGunTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(MachineGunTurret, head_model, string, strcat("models/turrets/", "machinegun.md3"));
/* netname */ ATTRIB(MachineGunTurret, netname, string, "machinegun");
/* fullname */ ATTRIB(MachineGunTurret, turret_name, string, _("Machinegun Turret"));
ATTRIB(MachineGunTurret, m_weapon, Weapon, WEP_TUR_MACHINEGUN);
/* mins */ ATTRIB(MLRSTurret, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(MLRSTurret, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(MLRSTurret, mdl, string, "base.md3");
-/* model */ ATTRIB(MLRSTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(MLRSTurret, head_model, string, strzone(strcat("models/turrets/", "mlrs.md3")));
+/* model */ ATTRIB_STRZONE(MLRSTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(MLRSTurret, head_model, string, strcat("models/turrets/", "mlrs.md3"));
/* netname */ ATTRIB(MLRSTurret, netname, string, "mlrs");
/* fullname */ ATTRIB(MLRSTurret, turret_name, string, _("MLRS Turret"));
ATTRIB(MLRSTurret, m_weapon, Weapon, WEP_TUR_MLRS);
/* mins */ ATTRIB(PhaserTurret, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(PhaserTurret, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(PhaserTurret, mdl, string, "base.md3");
-/* model */ ATTRIB(PhaserTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(PhaserTurret, head_model, string, strzone(strcat("models/turrets/", "phaser.md3")));
+/* model */ ATTRIB_STRZONE(PhaserTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(PhaserTurret, head_model, string, strcat("models/turrets/", "phaser.md3"));
/* netname */ ATTRIB(PhaserTurret, netname, string, "phaser");
/* fullname */ ATTRIB(PhaserTurret, turret_name, string, _("Phaser Cannon"));
ATTRIB(PhaserTurret, m_weapon, Weapon, WEP_PHASER);
/* mins */ ATTRIB(PlasmaTurret, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(PlasmaTurret, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(PlasmaTurret, mdl, string, "base.md3");
-/* model */ ATTRIB(PlasmaTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(PlasmaTurret, head_model, string, strzone(strcat("models/turrets/", "plasma.md3")));
+/* model */ ATTRIB_STRZONE(PlasmaTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(PlasmaTurret, head_model, string, strcat("models/turrets/", "plasma.md3"));
/* netname */ ATTRIB(PlasmaTurret, netname, string, "plasma");
/* fullname */ ATTRIB(PlasmaTurret, turret_name, string, _("Plasma Cannon"));
ATTRIB(PlasmaTurret, m_weapon, Weapon, WEP_PLASMA);
/* mins */ ATTRIB(DualPlasmaTurret, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(DualPlasmaTurret, maxs, vector, '32 32 64');
/* modelname */ ATTRIB(DualPlasmaTurret, mdl, string, "base.md3");
-/* model */ ATTRIB(DualPlasmaTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(DualPlasmaTurret, head_model, string, strzone(strcat("models/turrets/", "plasmad.md3")));
+/* model */ ATTRIB_STRZONE(DualPlasmaTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(DualPlasmaTurret, head_model, string, strcat("models/turrets/", "plasmad.md3"));
/* netname */ ATTRIB(DualPlasmaTurret, netname, string, "plasma_dual");
/* fullname */ ATTRIB(DualPlasmaTurret, turret_name, string, _("Dual Plasma Cannon"));
ATTRIB(DualPlasmaTurret, m_weapon, Weapon, WEP_PLASMA_DUAL);
/* mins */ ATTRIB(TeslaCoil, mins, vector, '-60 -60 0');
/* maxs */ ATTRIB(TeslaCoil, maxs, vector, '60 60 128');
/* modelname */ ATTRIB(TeslaCoil, mdl, string, "tesla_base.md3");
-/* model */ ATTRIB(TeslaCoil, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(TeslaCoil, head_model, string, strzone(strcat("models/turrets/", "tesla_head.md3")));
+/* model */ ATTRIB_STRZONE(TeslaCoil, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(TeslaCoil, head_model, string, strcat("models/turrets/", "tesla_head.md3"));
/* netname */ ATTRIB(TeslaCoil, netname, string, "tesla");
/* fullname */ ATTRIB(TeslaCoil, turret_name, string, _("Tesla Coil"));
ATTRIB(TeslaCoil, m_weapon, Weapon, WEP_TESLA);
/* mins */ ATTRIB(WalkerTurret, mins, vector, '-70 -70 0');
/* maxs */ ATTRIB(WalkerTurret, maxs, vector, '70 70 95');
/* modelname */ ATTRIB(WalkerTurret, mdl, string, "walker_body.md3");
-/* model */ ATTRIB(WalkerTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(WalkerTurret, head_model, string, strzone(strcat("models/turrets/", "walker_head_minigun.md3")));
+/* model */ ATTRIB_STRZONE(WalkerTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(WalkerTurret, head_model, string, strcat("models/turrets/", "walker_head_minigun.md3"));
/* netname */ ATTRIB(WalkerTurret, netname, string, "walker");
/* fullname */ ATTRIB(WalkerTurret, turret_name, string, _("Walker Turret"));
ATTRIB(WalkerTurret, m_weapon, Weapon, WEP_WALKER);
class(cname).type name; \
INIT(cname) \
{ \
+ noref bool strzone; /* Error on strzone() calls. */ \
this.name = val; \
}
+#define ATTRIB_STRZONE(cname, name, type, val) \
+ class(cname).type name; \
+ INIT(cname) \
+ { \
+ if (this.name) \
+ strunzone(this.name); \
+ this.name = strzone(val); \
+ }
+
#define ATTRIBARRAY(cname, name, type, cnt) \
class(cname).type name[cnt];