From: TimePath Date: Sun, 21 Aug 2016 05:27:53 +0000 (+1000) Subject: Monsters, turrets, vehicles: move definitions to headers X-Git-Tag: xonotic-v0.8.2~688^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6278d072f01179fe6cbfcc1493e8f2c281887663;p=xonotic%2Fxonotic-data.pk3dir.git Monsters, turrets, vehicles: move definitions to headers --- diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 08d1b7b5b..650999de1 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -1,39 +1,4 @@ -#ifndef MAGE_H -#define MAGE_H - -#ifdef GAMEQC -MODEL(MON_MAGE, M_Model("mage.dpm")); -#endif - -CLASS(Mage, Monster) - ATTRIB(Mage, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED); - ATTRIB(Mage, mins, vector, '-36 -36 -24'); - ATTRIB(Mage, maxs, vector, '36 36 50'); -#ifdef GAMEQC - ATTRIB(Mage, m_model, Model, MDL_MON_MAGE); -#endif - ATTRIB(Mage, netname, string, "mage"); - ATTRIB(Mage, monster_name, string, _("Mage")); -ENDCLASS(Mage) - -REGISTER_MONSTER(MAGE, NEW(Mage)) { -#ifdef GAMEQC - this.mr_precache(this); -#endif -} - -#include -#include - -CLASS(MageSpike, PortoLaunch) -/* flags */ ATTRIB(MageSpike, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); -/* impulse */ ATTRIB(MageSpike, impulse, int, 9); -/* refname */ ATTRIB(MageSpike, netname, string, "magespike"); -/* wepname */ ATTRIB(MageSpike, m_name, string, _("Mage spike")); -ENDCLASS(MageSpike) -REGISTER_WEAPON(MAGE_SPIKE, NEW(MageSpike)); - -#endif +#include "mage.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/monsters/monster/mage.qh b/qcsrc/common/monsters/monster/mage.qh index 6f70f09be..04826b39b 100644 --- a/qcsrc/common/monsters/monster/mage.qh +++ b/qcsrc/common/monsters/monster/mage.qh @@ -1 +1,33 @@ #pragma once + +#ifdef GAMEQC +MODEL(MON_MAGE, M_Model("mage.dpm")); +#endif + +CLASS(Mage, Monster) + ATTRIB(Mage, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED); + ATTRIB(Mage, mins, vector, '-36 -36 -24'); + ATTRIB(Mage, maxs, vector, '36 36 50'); +#ifdef GAMEQC + ATTRIB(Mage, m_model, Model, MDL_MON_MAGE); +#endif + ATTRIB(Mage, netname, string, "mage"); + ATTRIB(Mage, monster_name, string, _("Mage")); +ENDCLASS(Mage) + +REGISTER_MONSTER(MAGE, NEW(Mage)) { +#ifdef GAMEQC + this.mr_precache(this); +#endif +} + +#include +#include + +CLASS(MageSpike, PortoLaunch) +/* flags */ ATTRIB(MageSpike, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); +/* impulse */ ATTRIB(MageSpike, impulse, int, 9); +/* refname */ ATTRIB(MageSpike, netname, string, "magespike"); +/* wepname */ ATTRIB(MageSpike, m_name, string, _("Mage spike")); +ENDCLASS(MageSpike) +REGISTER_WEAPON(MAGE_SPIKE, NEW(MageSpike)); diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index 8b2b2f39f..3ba01fe21 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -1,28 +1,4 @@ -#ifndef SHAMBLER_H -#define SHAMBLER_H - -#ifdef GAMEQC -MODEL(MON_SHAMBLER, M_Model("shambler.mdl")); -#endif - -CLASS(Shambler, Monster) - ATTRIB(Shambler, spawnflags, int, MONSTER_SIZE_BROKEN | MON_FLAG_SUPERMONSTER | MON_FLAG_MELEE | MON_FLAG_RANGED); - ATTRIB(Shambler, mins, vector, '-41 -41 -31'); - ATTRIB(Shambler, maxs, vector, '41 41 65'); -#ifdef GAMEQC - ATTRIB(Shambler, m_model, Model, MDL_MON_SHAMBLER); -#endif - ATTRIB(Shambler, netname, string, "shambler"); - ATTRIB(Shambler, monster_name, string, _("Shambler")); -ENDCLASS(Shambler) - -REGISTER_MONSTER(SHAMBLER, NEW(Shambler)) { -#ifdef GAMEQC - this.mr_precache(this); -#endif -} - -#endif +#include "shambler.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/monsters/monster/shambler.qh b/qcsrc/common/monsters/monster/shambler.qh index 6f70f09be..0824b5587 100644 --- a/qcsrc/common/monsters/monster/shambler.qh +++ b/qcsrc/common/monsters/monster/shambler.qh @@ -1 +1,22 @@ #pragma once + +#ifdef GAMEQC +MODEL(MON_SHAMBLER, M_Model("shambler.mdl")); +#endif + +CLASS(Shambler, Monster) + ATTRIB(Shambler, spawnflags, int, MONSTER_SIZE_BROKEN | MON_FLAG_SUPERMONSTER | MON_FLAG_MELEE | MON_FLAG_RANGED); + ATTRIB(Shambler, mins, vector, '-41 -41 -31'); + ATTRIB(Shambler, maxs, vector, '41 41 65'); +#ifdef GAMEQC + ATTRIB(Shambler, m_model, Model, MDL_MON_SHAMBLER); +#endif + ATTRIB(Shambler, netname, string, "shambler"); + ATTRIB(Shambler, monster_name, string, _("Shambler")); +ENDCLASS(Shambler) + +REGISTER_MONSTER(SHAMBLER, NEW(Shambler)) { +#ifdef GAMEQC + this.mr_precache(this); +#endif +} diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index 475914ebd..43a07e650 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -1,38 +1,4 @@ -#ifndef SPIDER_H -#define SPIDER_H - -#ifdef GAMEQC -MODEL(MON_SPIDER, M_Model("spider.dpm")); -#endif - -CLASS(Spider, Monster) - ATTRIB(Spider, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED | MON_FLAG_RIDE); - ATTRIB(Spider, mins, vector, '-18 -18 -25'); - ATTRIB(Spider, maxs, vector, '18 18 30'); -#ifdef GAMEQC - ATTRIB(Spider, m_model, Model, MDL_MON_SPIDER); -#endif - ATTRIB(Spider, netname, string, "spider"); - ATTRIB(Spider, monster_name, string, _("Spider")); -ENDCLASS(Spider) - -REGISTER_MONSTER(SPIDER, NEW(Spider)) { -#ifdef GAMEQC - this.mr_precache(this); -#endif -} - -#include - -CLASS(SpiderAttack, PortoLaunch) -/* flags */ ATTRIB(SpiderAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); -/* impulse */ ATTRIB(SpiderAttack, impulse, int, 9); -/* refname */ ATTRIB(SpiderAttack, netname, string, "spider"); -/* wepname */ ATTRIB(SpiderAttack, m_name, string, _("Spider attack")); -ENDCLASS(SpiderAttack) -REGISTER_WEAPON(SPIDER_ATTACK, NEW(SpiderAttack)); - -#endif +#include "spider.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/monsters/monster/spider.qh b/qcsrc/common/monsters/monster/spider.qh index 6f70f09be..1da750d4c 100644 --- a/qcsrc/common/monsters/monster/spider.qh +++ b/qcsrc/common/monsters/monster/spider.qh @@ -1 +1,32 @@ #pragma once + +#ifdef GAMEQC +MODEL(MON_SPIDER, M_Model("spider.dpm")); +#endif + +CLASS(Spider, Monster) + ATTRIB(Spider, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED | MON_FLAG_RIDE); + ATTRIB(Spider, mins, vector, '-18 -18 -25'); + ATTRIB(Spider, maxs, vector, '18 18 30'); +#ifdef GAMEQC + ATTRIB(Spider, m_model, Model, MDL_MON_SPIDER); +#endif + ATTRIB(Spider, netname, string, "spider"); + ATTRIB(Spider, monster_name, string, _("Spider")); +ENDCLASS(Spider) + +REGISTER_MONSTER(SPIDER, NEW(Spider)) { +#ifdef GAMEQC + this.mr_precache(this); +#endif +} + +#include + +CLASS(SpiderAttack, PortoLaunch) +/* flags */ ATTRIB(SpiderAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); +/* impulse */ ATTRIB(SpiderAttack, impulse, int, 9); +/* refname */ ATTRIB(SpiderAttack, netname, string, "spider"); +/* wepname */ ATTRIB(SpiderAttack, m_name, string, _("Spider attack")); +ENDCLASS(SpiderAttack) +REGISTER_WEAPON(SPIDER_ATTACK, NEW(SpiderAttack)); diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 8b2e8768f..48e7ad61d 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -1,38 +1,4 @@ -#ifndef WYVERN_H -#define WYVERN_H - -#ifdef GAMEQC -MODEL(MON_WYVERN, M_Model("wizard.mdl")); -#endif - -CLASS(Wyvern, Monster) - ATTRIB(Wyvern, spawnflags, int, MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED | MON_FLAG_RIDE); - ATTRIB(Wyvern, mins, vector, '-20 -20 -58'); - ATTRIB(Wyvern, maxs, vector, '20 20 20'); -#ifdef GAMEQC - ATTRIB(Wyvern, m_model, Model, MDL_MON_WYVERN); -#endif - ATTRIB(Wyvern, netname, string, "wyvern"); - ATTRIB(Wyvern, monster_name, string, _("Wyvern")); -ENDCLASS(Wyvern) - -REGISTER_MONSTER(WYVERN, NEW(Wyvern)) { -#ifdef GAMEQC - this.mr_precache(this); -#endif -} - -#include - -CLASS(WyvernAttack, PortoLaunch) -/* flags */ ATTRIB(WyvernAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); -/* impulse */ ATTRIB(WyvernAttack, impulse, int, 9); -/* refname */ ATTRIB(WyvernAttack, netname, string, "wyvern"); -/* wepname */ ATTRIB(WyvernAttack, m_name, string, _("Wyvern attack")); -ENDCLASS(WyvernAttack) -REGISTER_WEAPON(WYVERN_ATTACK, NEW(WyvernAttack)); - -#endif +#include "wyvern.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/monsters/monster/wyvern.qh b/qcsrc/common/monsters/monster/wyvern.qh index 6f70f09be..0982eb176 100644 --- a/qcsrc/common/monsters/monster/wyvern.qh +++ b/qcsrc/common/monsters/monster/wyvern.qh @@ -1 +1,32 @@ #pragma once + +#ifdef GAMEQC +MODEL(MON_WYVERN, M_Model("wizard.mdl")); +#endif + +CLASS(Wyvern, Monster) + ATTRIB(Wyvern, spawnflags, int, MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED | MON_FLAG_RIDE); + ATTRIB(Wyvern, mins, vector, '-20 -20 -58'); + ATTRIB(Wyvern, maxs, vector, '20 20 20'); +#ifdef GAMEQC + ATTRIB(Wyvern, m_model, Model, MDL_MON_WYVERN); +#endif + ATTRIB(Wyvern, netname, string, "wyvern"); + ATTRIB(Wyvern, monster_name, string, _("Wyvern")); +ENDCLASS(Wyvern) + +REGISTER_MONSTER(WYVERN, NEW(Wyvern)) { +#ifdef GAMEQC + this.mr_precache(this); +#endif +} + +#include + +CLASS(WyvernAttack, PortoLaunch) +/* flags */ ATTRIB(WyvernAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); +/* impulse */ ATTRIB(WyvernAttack, impulse, int, 9); +/* refname */ ATTRIB(WyvernAttack, netname, string, "wyvern"); +/* wepname */ ATTRIB(WyvernAttack, m_name, string, _("Wyvern attack")); +ENDCLASS(WyvernAttack) +REGISTER_WEAPON(WYVERN_ATTACK, NEW(WyvernAttack)); diff --git a/qcsrc/common/monsters/monster/zombie.qc b/qcsrc/common/monsters/monster/zombie.qc index 79b83b63e..3f43ea0f0 100644 --- a/qcsrc/common/monsters/monster/zombie.qc +++ b/qcsrc/common/monsters/monster/zombie.qc @@ -1,28 +1,4 @@ -#ifndef ZOMBIE_H -#define ZOMBIE_H - -#ifdef GAMEQC -MODEL(MON_ZOMBIE, M_Model("zombie.dpm")); -#endif - -CLASS(Zombie, Monster) - ATTRIB(Zombie, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RIDE); - ATTRIB(Zombie, mins, vector, '-18 -18 -25'); - ATTRIB(Zombie, maxs, vector, '18 18 47'); -#ifdef GAMEQC - ATTRIB(Zombie, m_model, Model, MDL_MON_ZOMBIE); -#endif - ATTRIB(Zombie, netname, string, "zombie"); - ATTRIB(Zombie, monster_name, string, _("Zombie")); -ENDCLASS(Zombie) - -REGISTER_MONSTER(ZOMBIE, NEW(Zombie)) { -#ifdef GAMEQC - this.mr_precache(this); -#endif -} - -#endif +#include "zombie.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/monsters/monster/zombie.qh b/qcsrc/common/monsters/monster/zombie.qh index 6f70f09be..c5e243c75 100644 --- a/qcsrc/common/monsters/monster/zombie.qh +++ b/qcsrc/common/monsters/monster/zombie.qh @@ -1 +1,22 @@ #pragma once + +#ifdef GAMEQC +MODEL(MON_ZOMBIE, M_Model("zombie.dpm")); +#endif + +CLASS(Zombie, Monster) + ATTRIB(Zombie, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RIDE); + ATTRIB(Zombie, mins, vector, '-18 -18 -25'); + ATTRIB(Zombie, maxs, vector, '18 18 47'); +#ifdef GAMEQC + ATTRIB(Zombie, m_model, Model, MDL_MON_ZOMBIE); +#endif + ATTRIB(Zombie, netname, string, "zombie"); + ATTRIB(Zombie, monster_name, string, _("Zombie")); +ENDCLASS(Zombie) + +REGISTER_MONSTER(ZOMBIE, NEW(Zombie)) { +#ifdef GAMEQC + this.mr_precache(this); +#endif +} diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index a86acdb27..b5716f7a9 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -1,24 +1,4 @@ -#ifndef TURRET_EWHEEL_H -#define TURRET_EWHEEL_H - -//#define EWHEEL_FANCYPATH - -#include "ewheel_weapon.qh" - -CLASS(EWheel, Turret) -/* spawnflags */ ATTRIB(EWheel, spawnflags, int, TUR_FLAG_PLAYER | TUR_FLAG_MOVE | TUR_FLAG_ROAM); -/* 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_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); -ENDCLASS(EWheel) -REGISTER_TURRET(EWHEEL, NEW(EWheel)); - -#endif +#include "ewheel.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/ewheel.qh b/qcsrc/common/turrets/turret/ewheel.qh index 6f70f09be..b34adb2fe 100644 --- a/qcsrc/common/turrets/turret/ewheel.qh +++ b/qcsrc/common/turrets/turret/ewheel.qh @@ -1 +1,18 @@ #pragma once + +//#define EWHEEL_FANCYPATH + +#include "ewheel_weapon.qh" + +CLASS(EWheel, Turret) +/* spawnflags */ ATTRIB(EWheel, spawnflags, int, TUR_FLAG_PLAYER | TUR_FLAG_MOVE | TUR_FLAG_ROAM); +/* 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_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); +ENDCLASS(EWheel) +REGISTER_TURRET(EWHEEL, NEW(EWheel)); diff --git a/qcsrc/common/turrets/turret/flac.qc b/qcsrc/common/turrets/turret/flac.qc index 20eeb7759..ab6e5f5cb 100644 --- a/qcsrc/common/turrets/turret/flac.qc +++ b/qcsrc/common/turrets/turret/flac.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_FLAC_H -#define TURRET_FLAC_H - -#include "flac_weapon.qh" - -CLASS(Flac, Turret) -/* spawnflags */ ATTRIB(Flac, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_MISSILE); -/* 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_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); -ENDCLASS(Flac) -REGISTER_TURRET(FLAC, NEW(Flac)); - -#endif +#include "flac.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/flac.qh b/qcsrc/common/turrets/turret/flac.qh index 6f70f09be..d53422c60 100644 --- a/qcsrc/common/turrets/turret/flac.qh +++ b/qcsrc/common/turrets/turret/flac.qh @@ -1 +1,16 @@ #pragma once + +#include "flac_weapon.qh" + +CLASS(Flac, Turret) +/* spawnflags */ ATTRIB(Flac, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_MISSILE); +/* 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_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); +ENDCLASS(Flac) +REGISTER_TURRET(FLAC, NEW(Flac)); diff --git a/qcsrc/common/turrets/turret/fusionreactor.qc b/qcsrc/common/turrets/turret/fusionreactor.qc index cd7dbec72..163bffb9d 100644 --- a/qcsrc/common/turrets/turret/fusionreactor.qc +++ b/qcsrc/common/turrets/turret/fusionreactor.qc @@ -1,19 +1,4 @@ -#ifndef TURRET_FUSIONREACTOR_H -#define TURRET_FUSIONREACTOR_H - -CLASS(FusionReactor, Turret) -/* spawnflags */ ATTRIB(FusionReactor, spawnflags, int, TUR_FLAG_SUPPORT | TUR_FLAG_AMMOSOURCE); -/* 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_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) -REGISTER_TURRET(FUSIONREACTOR, NEW(FusionReactor)); - -#endif +#include "fusionreactor.qh" #ifdef IMPLEMENTATION #ifdef SVQC diff --git a/qcsrc/common/turrets/turret/fusionreactor.qh b/qcsrc/common/turrets/turret/fusionreactor.qh index 6f70f09be..5d3313e55 100644 --- a/qcsrc/common/turrets/turret/fusionreactor.qh +++ b/qcsrc/common/turrets/turret/fusionreactor.qh @@ -1 +1,13 @@ #pragma once + +CLASS(FusionReactor, Turret) +/* spawnflags */ ATTRIB(FusionReactor, spawnflags, int, TUR_FLAG_SUPPORT | TUR_FLAG_AMMOSOURCE); +/* 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_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) +REGISTER_TURRET(FUSIONREACTOR, NEW(FusionReactor)); diff --git a/qcsrc/common/turrets/turret/hellion.qc b/qcsrc/common/turrets/turret/hellion.qc index 61203ddf7..88a0170ea 100644 --- a/qcsrc/common/turrets/turret/hellion.qc +++ b/qcsrc/common/turrets/turret/hellion.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_HELLION_H -#define TURRET_HELLION_H - -#include "hellion_weapon.qh" - -CLASS(Hellion, Turret) -/* spawnflags */ ATTRIB(Hellion, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE); -/* 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_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); -ENDCLASS(Hellion) -REGISTER_TURRET(HELLION, NEW(Hellion)); - -#endif +#include "hellion.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/hellion.qh b/qcsrc/common/turrets/turret/hellion.qh index 6f70f09be..642645b85 100644 --- a/qcsrc/common/turrets/turret/hellion.qh +++ b/qcsrc/common/turrets/turret/hellion.qh @@ -1 +1,16 @@ #pragma once + +#include "hellion_weapon.qh" + +CLASS(Hellion, Turret) +/* spawnflags */ ATTRIB(Hellion, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE); +/* 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_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); +ENDCLASS(Hellion) +REGISTER_TURRET(HELLION, NEW(Hellion)); diff --git a/qcsrc/common/turrets/turret/hk.qc b/qcsrc/common/turrets/turret/hk.qc index 9cb60df4c..255821e1c 100644 --- a/qcsrc/common/turrets/turret/hk.qc +++ b/qcsrc/common/turrets/turret/hk.qc @@ -1,24 +1,4 @@ -#ifndef TURRET_HK_H -#define TURRET_HK_H - -//#define TURRET_DEBUG_HK - -#include "hk_weapon.qh" - -CLASS(HunterKiller, Turret) -/* spawnflags */ ATTRIB(HunterKiller, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER | TUR_FLAG_RECIEVETARGETS); -/* 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_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); -ENDCLASS(HunterKiller) -REGISTER_TURRET(HK, NEW(HunterKiller)); - -#endif +#include "hk.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/hk.qh b/qcsrc/common/turrets/turret/hk.qh index 6f70f09be..d7c9cfbbe 100644 --- a/qcsrc/common/turrets/turret/hk.qh +++ b/qcsrc/common/turrets/turret/hk.qh @@ -1 +1,18 @@ #pragma once + +//#define TURRET_DEBUG_HK + +#include "hk_weapon.qh" + +CLASS(HunterKiller, Turret) +/* spawnflags */ ATTRIB(HunterKiller, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER | TUR_FLAG_RECIEVETARGETS); +/* 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_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); +ENDCLASS(HunterKiller) +REGISTER_TURRET(HK, NEW(HunterKiller)); diff --git a/qcsrc/common/turrets/turret/machinegun.qc b/qcsrc/common/turrets/turret/machinegun.qc index 8addd9542..db3cb47bf 100644 --- a/qcsrc/common/turrets/turret/machinegun.qc +++ b/qcsrc/common/turrets/turret/machinegun.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_MACHINEGUN_H -#define TURRET_MACHINEGUN_H - -#include "machinegun_weapon.qh" - -CLASS(MachineGunTurret, Turret) -/* spawnflags */ ATTRIB(MachineGunTurret, spawnflags, int, TUR_FLAG_PLAYER); -/* 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_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); -ENDCLASS(MachineGunTurret) -REGISTER_TURRET(MACHINEGUN, NEW(MachineGunTurret)); - -#endif +#include "machinegun.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/machinegun.qh b/qcsrc/common/turrets/turret/machinegun.qh index 6f70f09be..92a8fbaa4 100644 --- a/qcsrc/common/turrets/turret/machinegun.qh +++ b/qcsrc/common/turrets/turret/machinegun.qh @@ -1 +1,16 @@ #pragma once + +#include "machinegun_weapon.qh" + +CLASS(MachineGunTurret, Turret) +/* spawnflags */ ATTRIB(MachineGunTurret, spawnflags, int, TUR_FLAG_PLAYER); +/* 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_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); +ENDCLASS(MachineGunTurret) +REGISTER_TURRET(MACHINEGUN, NEW(MachineGunTurret)); diff --git a/qcsrc/common/turrets/turret/mlrs.qc b/qcsrc/common/turrets/turret/mlrs.qc index 316d3b9a0..472a0cb09 100644 --- a/qcsrc/common/turrets/turret/mlrs.qc +++ b/qcsrc/common/turrets/turret/mlrs.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_MLRS_H -#define TURRET_MLRS_H - -#include "mlrs_weapon.qh" - -CLASS(MLRSTurret, Turret) -/* spawnflags */ ATTRIB(MLRSTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); -/* 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_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); -ENDCLASS(MLRSTurret) -REGISTER_TURRET(MLRS, NEW(MLRSTurret)); - -#endif +#include "mlrs.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/mlrs.qh b/qcsrc/common/turrets/turret/mlrs.qh index 6f70f09be..b2a6a5c43 100644 --- a/qcsrc/common/turrets/turret/mlrs.qh +++ b/qcsrc/common/turrets/turret/mlrs.qh @@ -1 +1,16 @@ #pragma once + +#include "mlrs_weapon.qh" + +CLASS(MLRSTurret, Turret) +/* spawnflags */ ATTRIB(MLRSTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); +/* 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_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); +ENDCLASS(MLRSTurret) +REGISTER_TURRET(MLRS, NEW(MLRSTurret)); diff --git a/qcsrc/common/turrets/turret/phaser.qc b/qcsrc/common/turrets/turret/phaser.qc index 7c5d33621..31ece9cb2 100644 --- a/qcsrc/common/turrets/turret/phaser.qc +++ b/qcsrc/common/turrets/turret/phaser.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_PHASER_H -#define TURRET_PHASER_H - -#include "phaser_weapon.qh" - -CLASS(PhaserTurret, Turret) -/* spawnflags */ ATTRIB(PhaserTurret, spawnflags, int, TUR_FLAG_SNIPER | TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER); -/* 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_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); -ENDCLASS(PhaserTurret) -REGISTER_TURRET(PHASER, NEW(PhaserTurret)); - -#endif +#include "phaser.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/phaser.qh b/qcsrc/common/turrets/turret/phaser.qh index 6f70f09be..fedbe66cb 100644 --- a/qcsrc/common/turrets/turret/phaser.qh +++ b/qcsrc/common/turrets/turret/phaser.qh @@ -1 +1,16 @@ #pragma once + +#include "phaser_weapon.qh" + +CLASS(PhaserTurret, Turret) +/* spawnflags */ ATTRIB(PhaserTurret, spawnflags, int, TUR_FLAG_SNIPER | TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER); +/* 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_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); +ENDCLASS(PhaserTurret) +REGISTER_TURRET(PHASER, NEW(PhaserTurret)); diff --git a/qcsrc/common/turrets/turret/plasma.qc b/qcsrc/common/turrets/turret/plasma.qc index 82aa1abe6..d161436ab 100644 --- a/qcsrc/common/turrets/turret/plasma.qc +++ b/qcsrc/common/turrets/turret/plasma.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_PLASMA_H -#define TURRET_PLASMA_H - -#include "plasma_weapon.qh" - -CLASS(PlasmaTurret, Turret) -/* spawnflags */ ATTRIB(PlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); -/* 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_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); -ENDCLASS(PlasmaTurret) -REGISTER_TURRET(PLASMA, NEW(PlasmaTurret)); - -#endif +#include "plasma.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/plasma.qh b/qcsrc/common/turrets/turret/plasma.qh index 6f70f09be..fc2a96de7 100644 --- a/qcsrc/common/turrets/turret/plasma.qh +++ b/qcsrc/common/turrets/turret/plasma.qh @@ -1 +1,16 @@ #pragma once + +#include "plasma_weapon.qh" + +CLASS(PlasmaTurret, Turret) +/* spawnflags */ ATTRIB(PlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); +/* 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_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); +ENDCLASS(PlasmaTurret) +REGISTER_TURRET(PLASMA, NEW(PlasmaTurret)); diff --git a/qcsrc/common/turrets/turret/plasma_dual.qc b/qcsrc/common/turrets/turret/plasma_dual.qc index 9430bc692..9e6d80b2f 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qc +++ b/qcsrc/common/turrets/turret/plasma_dual.qc @@ -1,28 +1,4 @@ -#ifndef TURRET_PLASMA_DUAL_H -#define TURRET_PLASMA_DUAL_H - -#include "plasma_weapon.qh" - -CLASS(PlasmaDualAttack, PlasmaAttack) -/* refname */ ATTRIB(PlasmaDualAttack, netname, string, "turret_plasma_dual"); -/* wepname */ ATTRIB(PlasmaDualAttack, m_name, string, _("Dual plasma")); -ENDCLASS(PlasmaDualAttack) -REGISTER_WEAPON(PLASMA_DUAL, NEW(PlasmaDualAttack)); - -CLASS(DualPlasmaTurret, PlasmaTurret) -/* spawnflags */ ATTRIB(DualPlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); -/* 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_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); -ENDCLASS(DualPlasmaTurret) -REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret)); - -#endif +#include "plasma_dual.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/plasma_dual.qh b/qcsrc/common/turrets/turret/plasma_dual.qh index 6f70f09be..e4c7b0e7d 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qh +++ b/qcsrc/common/turrets/turret/plasma_dual.qh @@ -1 +1,22 @@ #pragma once + +#include "plasma_weapon.qh" + +CLASS(PlasmaDualAttack, PlasmaAttack) +/* refname */ ATTRIB(PlasmaDualAttack, netname, string, "turret_plasma_dual"); +/* wepname */ ATTRIB(PlasmaDualAttack, m_name, string, _("Dual plasma")); +ENDCLASS(PlasmaDualAttack) +REGISTER_WEAPON(PLASMA_DUAL, NEW(PlasmaDualAttack)); + +CLASS(DualPlasmaTurret, PlasmaTurret) +/* spawnflags */ ATTRIB(DualPlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); +/* 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_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); +ENDCLASS(DualPlasmaTurret) +REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret)); diff --git a/qcsrc/common/turrets/turret/tesla.qc b/qcsrc/common/turrets/turret/tesla.qc index b0755f32b..249fe18eb 100644 --- a/qcsrc/common/turrets/turret/tesla.qc +++ b/qcsrc/common/turrets/turret/tesla.qc @@ -1,22 +1,4 @@ -#ifndef TURRET_TESLA_H -#define TURRET_TESLA_H - -#include "tesla_weapon.qh" - -CLASS(TeslaCoil, Turret) -/* spawnflags */ ATTRIB(TeslaCoil, spawnflags, int, TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE); -/* 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_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); -ENDCLASS(TeslaCoil) -REGISTER_TURRET(TESLA, NEW(TeslaCoil)); - -#endif +#include "tesla.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/tesla.qh b/qcsrc/common/turrets/turret/tesla.qh index 6f70f09be..c5f67b1b9 100644 --- a/qcsrc/common/turrets/turret/tesla.qh +++ b/qcsrc/common/turrets/turret/tesla.qh @@ -1 +1,16 @@ #pragma once + +#include "tesla_weapon.qh" + +CLASS(TeslaCoil, Turret) +/* spawnflags */ ATTRIB(TeslaCoil, spawnflags, int, TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE); +/* 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_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); +ENDCLASS(TeslaCoil) +REGISTER_TURRET(TESLA, NEW(TeslaCoil)); diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 727da27f9..94ecdd332 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -1,24 +1,4 @@ -#ifndef TURRET_WALKER_H -#define TURRET_WALKER_H - -//#define WALKER_FANCYPATHING - -#include "walker_weapon.qh" - -CLASS(WalkerTurret, Turret) -/* spawnflags */ ATTRIB(WalkerTurret, spawnflags, int, TUR_FLAG_PLAYER | TUR_FLAG_MOVE); -/* 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_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); -ENDCLASS(WalkerTurret) -REGISTER_TURRET(WALKER, NEW(WalkerTurret)); - -#endif +#include "walker.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/turrets/turret/walker.qh b/qcsrc/common/turrets/turret/walker.qh index 6f70f09be..54a908bd1 100644 --- a/qcsrc/common/turrets/turret/walker.qh +++ b/qcsrc/common/turrets/turret/walker.qh @@ -1 +1,18 @@ #pragma once + +//#define WALKER_FANCYPATHING + +#include "walker_weapon.qh" + +CLASS(WalkerTurret, Turret) +/* spawnflags */ ATTRIB(WalkerTurret, spawnflags, int, TUR_FLAG_PLAYER | TUR_FLAG_MOVE); +/* 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_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); +ENDCLASS(WalkerTurret) +REGISTER_TURRET(WALKER, NEW(WalkerTurret)); diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index 98d853d2b..403c9de9d 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -1,34 +1,5 @@ -#ifndef VEHICLE_BUMBLEBEE -#define VEHICLE_BUMBLEBEE #include "bumblebee.qh" -#include "bumblebee_weapons.qh" - -CLASS(Bumblebee, Vehicle) -/* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE); -/* mins */ ATTRIB(Bumblebee, mins, vector, '-245 -130 -130'); -/* maxs */ ATTRIB(Bumblebee, maxs, vector, '230 130 130'); -/* view offset*/ ATTRIB(Bumblebee, view_ofs, vector, '0 0 300'); -/* view dist */ ATTRIB(Bumblebee, height, float, 450); -/* model */ ATTRIB(Bumblebee, mdl, string, "models/vehicles/bumblebee_body.dpm"); -/* model */ ATTRIB(Bumblebee, model, string, "models/vehicles/bumblebee_body.dpm"); -/* head_model */ ATTRIB(Bumblebee, head_model, string, ""); -/* hud_model */ ATTRIB(Bumblebee, hud_model, string, "models/vehicles/spiderbot_cockpit.dpm"); -/* tags */ ATTRIB(Bumblebee, tag_head, string, ""); -/* tags */ ATTRIB(Bumblebee, tag_hud, string, ""); -/* tags */ ATTRIB(Bumblebee, tag_view, string, "tag_viewport"); -/* netname */ ATTRIB(Bumblebee, netname, string, "bumblebee"); -/* fullname */ ATTRIB(Bumblebee, vehicle_name, string, _("Bumblebee")); -/* icon */ ATTRIB(Bumblebee, m_icon, string, "vehicle_bumble"); -ENDCLASS(Bumblebee) -REGISTER_VEHICLE(BUMBLEBEE, NEW(Bumblebee)); - -#ifdef GAMEQC - MODEL(VEH_BUMBLEBEE_GUNCOCKPIT, "models/vehicles/wakizashi_cockpit.dpm"); -#endif - -#endif - #ifdef IMPLEMENTATION const float BRG_SETUP = 2; diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qh b/qcsrc/common/vehicles/vehicle/bumblebee.qh index b675185d4..2c90b7c40 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qh +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qh @@ -1,6 +1,30 @@ #pragma once -#ifdef CSQC +#include "bumblebee_weapons.qh" + +CLASS(Bumblebee, Vehicle) +/* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE); +/* mins */ ATTRIB(Bumblebee, mins, vector, '-245 -130 -130'); +/* maxs */ ATTRIB(Bumblebee, maxs, vector, '230 130 130'); +/* view offset*/ ATTRIB(Bumblebee, view_ofs, vector, '0 0 300'); +/* view dist */ ATTRIB(Bumblebee, height, float, 450); +/* model */ ATTRIB(Bumblebee, mdl, string, "models/vehicles/bumblebee_body.dpm"); +/* model */ ATTRIB(Bumblebee, model, string, "models/vehicles/bumblebee_body.dpm"); +/* head_model */ ATTRIB(Bumblebee, head_model, string, ""); +/* hud_model */ ATTRIB(Bumblebee, hud_model, string, "models/vehicles/spiderbot_cockpit.dpm"); +/* tags */ ATTRIB(Bumblebee, tag_head, string, ""); +/* tags */ ATTRIB(Bumblebee, tag_hud, string, ""); +/* tags */ ATTRIB(Bumblebee, tag_view, string, "tag_viewport"); +/* netname */ ATTRIB(Bumblebee, netname, string, "bumblebee"); +/* fullname */ ATTRIB(Bumblebee, vehicle_name, string, _("Bumblebee")); +/* icon */ ATTRIB(Bumblebee, m_icon, string, "vehicle_bumble"); +ENDCLASS(Bumblebee) +REGISTER_VEHICLE(BUMBLEBEE, NEW(Bumblebee)); +#ifdef GAMEQC + MODEL(VEH_BUMBLEBEE_GUNCOCKPIT, "models/vehicles/wakizashi_cockpit.dpm"); +#endif + +#ifdef CSQC void CSQC_BUMBLE_GUN_HUD(); #endif diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 2bccec21a..c8f8cf84e 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -1,28 +1,4 @@ -#ifndef VEHICLE_RACER -#define VEHICLE_RACER - -#include "racer_weapon.qh" - -CLASS(Racer, Vehicle) -/* spawnflags */ ATTRIB(Racer, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); -/* mins */ ATTRIB(Racer, mins, vector, '-120 -120 -40' * 0.5); -/* maxs */ ATTRIB(Racer, maxs, vector, '120 120 40' * 0.5); -/* view offset*/ ATTRIB(Racer, view_ofs, vector, '0 0 50'); -/* view dist */ ATTRIB(Racer, height, float, 200); -/* model */ ATTRIB(Racer, mdl, string, "models/vehicles/wakizashi.dpm"); -/* model */ ATTRIB(Racer, model, string, "models/vehicles/wakizashi.dpm"); -/* head_model */ ATTRIB(Racer, head_model, string, "null"); -/* hud_model */ ATTRIB(Racer, hud_model, string, "models/vehicles/wakizashi_cockpit.dpm"); -/* tags */ ATTRIB(Racer, tag_head, string, ""); -/* tags */ ATTRIB(Racer, tag_hud, string, ""); -/* tags */ ATTRIB(Racer, tag_view, string, "tag_viewport"); -/* netname */ ATTRIB(Racer, netname, string, "racer"); -/* fullname */ ATTRIB(Racer, vehicle_name, string, _("Racer")); -/* icon */ ATTRIB(Racer, m_icon, string, "vehicle_racer"); -ENDCLASS(Racer) -REGISTER_VEHICLE(RACER, NEW(Racer)); - -#endif +#include "racer.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/vehicles/vehicle/racer.qh b/qcsrc/common/vehicles/vehicle/racer.qh index 6f70f09be..dd1414413 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qh +++ b/qcsrc/common/vehicles/vehicle/racer.qh @@ -1 +1,22 @@ #pragma once + +#include "racer_weapon.qh" + +CLASS(Racer, Vehicle) +/* spawnflags */ ATTRIB(Racer, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); +/* mins */ ATTRIB(Racer, mins, vector, '-120 -120 -40' * 0.5); +/* maxs */ ATTRIB(Racer, maxs, vector, '120 120 40' * 0.5); +/* view offset*/ ATTRIB(Racer, view_ofs, vector, '0 0 50'); +/* view dist */ ATTRIB(Racer, height, float, 200); +/* model */ ATTRIB(Racer, mdl, string, "models/vehicles/wakizashi.dpm"); +/* model */ ATTRIB(Racer, model, string, "models/vehicles/wakizashi.dpm"); +/* head_model */ ATTRIB(Racer, head_model, string, "null"); +/* hud_model */ ATTRIB(Racer, hud_model, string, "models/vehicles/wakizashi_cockpit.dpm"); +/* tags */ ATTRIB(Racer, tag_head, string, ""); +/* tags */ ATTRIB(Racer, tag_hud, string, ""); +/* tags */ ATTRIB(Racer, tag_view, string, "tag_viewport"); +/* netname */ ATTRIB(Racer, netname, string, "racer"); +/* fullname */ ATTRIB(Racer, vehicle_name, string, _("Racer")); +/* icon */ ATTRIB(Racer, m_icon, string, "vehicle_racer"); +ENDCLASS(Racer) +REGISTER_VEHICLE(RACER, NEW(Racer)); diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index 510f63ba1..a03c936bd 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -1,30 +1,5 @@ -#ifndef VEHICLE_RAPTOR -#define VEHICLE_RAPTOR #include "raptor.qh" -#include "raptor_weapons.qh" - -CLASS(Raptor, Vehicle) -/* spawnflags */ ATTRIB(Raptor, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); -/* mins */ ATTRIB(Raptor, mins, vector, '-80 -80 0'); -/* maxs */ ATTRIB(Raptor, maxs, vector, '80 80 70'); -/* view offset*/ ATTRIB(Raptor, view_ofs, vector, '0 0 160'); -/* view dist */ ATTRIB(Raptor, height, float, 200); -/* model */ ATTRIB(Raptor, mdl, string, "models/vehicles/raptor.dpm"); -/* model */ ATTRIB(Raptor, model, string, "models/vehicles/raptor.dpm"); -/* head_model */ ATTRIB(Raptor, head_model, string, ""); -/* hud_model */ ATTRIB(Raptor, hud_model, string, "models/vehicles/raptor_cockpit.dpm"); -/* tags */ ATTRIB(Raptor, tag_head, string, ""); -/* tags */ ATTRIB(Raptor, tag_hud, string, "tag_hud"); -/* tags */ ATTRIB(Raptor, tag_view, string, "tag_camera"); -/* netname */ ATTRIB(Raptor, netname, string, "raptor"); -/* fullname */ ATTRIB(Raptor, vehicle_name, string, _("Raptor")); -/* icon */ ATTRIB(Raptor, m_icon, string, "vehicle_raptor"); -ENDCLASS(Raptor) -REGISTER_VEHICLE(RAPTOR, NEW(Raptor)); - -#endif - #ifdef IMPLEMENTATION #ifdef SVQC diff --git a/qcsrc/common/vehicles/vehicle/raptor.qh b/qcsrc/common/vehicles/vehicle/raptor.qh index fd9a7de79..12666523c 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qh +++ b/qcsrc/common/vehicles/vehicle/raptor.qh @@ -1,5 +1,26 @@ #pragma once +#include "raptor_weapons.qh" + +CLASS(Raptor, Vehicle) +/* spawnflags */ ATTRIB(Raptor, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); +/* mins */ ATTRIB(Raptor, mins, vector, '-80 -80 0'); +/* maxs */ ATTRIB(Raptor, maxs, vector, '80 80 70'); +/* view offset*/ ATTRIB(Raptor, view_ofs, vector, '0 0 160'); +/* view dist */ ATTRIB(Raptor, height, float, 200); +/* model */ ATTRIB(Raptor, mdl, string, "models/vehicles/raptor.dpm"); +/* model */ ATTRIB(Raptor, model, string, "models/vehicles/raptor.dpm"); +/* head_model */ ATTRIB(Raptor, head_model, string, ""); +/* hud_model */ ATTRIB(Raptor, hud_model, string, "models/vehicles/raptor_cockpit.dpm"); +/* tags */ ATTRIB(Raptor, tag_head, string, ""); +/* tags */ ATTRIB(Raptor, tag_hud, string, "tag_hud"); +/* tags */ ATTRIB(Raptor, tag_view, string, "tag_camera"); +/* netname */ ATTRIB(Raptor, netname, string, "raptor"); +/* fullname */ ATTRIB(Raptor, vehicle_name, string, _("Raptor")); +/* icon */ ATTRIB(Raptor, m_icon, string, "vehicle_raptor"); +ENDCLASS(Raptor) +REGISTER_VEHICLE(RAPTOR, NEW(Raptor)); + const int RSM_FIRST = 1; const int RSM_BOMB = 1; const int RSM_FLARE = 2; diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qc b/qcsrc/common/vehicles/vehicle/spiderbot.qc index 3365266f8..fc8a4f190 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qc @@ -1,29 +1,4 @@ -#ifndef VEHICLE_SPIDERBOT -#define VEHICLE_SPIDERBOT - -#include "spiderbot_weapons.qh" - -CLASS(Spiderbot, Vehicle) -/* spawnflags */ ATTRIB(Spiderbot, spawnflags, int, VHF_DMGSHAKE); -/* mins */ ATTRIB(Spiderbot, mins, vector, '-75 -75 10'); -/* maxs */ ATTRIB(Spiderbot, maxs, vector, '75 75 125'); -/* view offset*/ ATTRIB(Spiderbot, view_ofs, vector, '0 0 70'); -/* view dist */ ATTRIB(Spiderbot, height, float, 170); -/* model */ ATTRIB(Spiderbot, mdl, string, "models/vehicles/spiderbot.dpm"); -/* model */ ATTRIB(Spiderbot, model, string, "models/vehicles/spiderbot.dpm"); -/* head_model */ ATTRIB(Spiderbot, head_model, string, "models/vehicles/spiderbot_top.dpm"); -/* hud_model */ ATTRIB(Spiderbot, hud_model, string, "models/vehicles/spiderbot_cockpit.dpm"); -/* tags */ ATTRIB(Spiderbot, tag_head, string, "tag_head"); -/* tags */ ATTRIB(Spiderbot, tag_hud, string, "tag_hud"); -/* tags */ ATTRIB(Spiderbot, tag_view, string, ""); -/* netname */ ATTRIB(Spiderbot, netname, string, "spiderbot"); -/* fullname */ ATTRIB(Spiderbot, vehicle_name, string, _("Spiderbot")); -/* icon */ ATTRIB(Spiderbot, m_icon, string, "vehicle_spider"); -ENDCLASS(Spiderbot) - -REGISTER_VEHICLE(SPIDERBOT, NEW(Spiderbot)); - -#endif +#include "spiderbot.qh" #ifdef IMPLEMENTATION diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qh b/qcsrc/common/vehicles/vehicle/spiderbot.qh index 6f70f09be..a594ace04 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qh +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qh @@ -1 +1,23 @@ #pragma once + +#include "spiderbot_weapons.qh" + +CLASS(Spiderbot, Vehicle) +/* spawnflags */ ATTRIB(Spiderbot, spawnflags, int, VHF_DMGSHAKE); +/* mins */ ATTRIB(Spiderbot, mins, vector, '-75 -75 10'); +/* maxs */ ATTRIB(Spiderbot, maxs, vector, '75 75 125'); +/* view offset*/ ATTRIB(Spiderbot, view_ofs, vector, '0 0 70'); +/* view dist */ ATTRIB(Spiderbot, height, float, 170); +/* model */ ATTRIB(Spiderbot, mdl, string, "models/vehicles/spiderbot.dpm"); +/* model */ ATTRIB(Spiderbot, model, string, "models/vehicles/spiderbot.dpm"); +/* head_model */ ATTRIB(Spiderbot, head_model, string, "models/vehicles/spiderbot_top.dpm"); +/* hud_model */ ATTRIB(Spiderbot, hud_model, string, "models/vehicles/spiderbot_cockpit.dpm"); +/* tags */ ATTRIB(Spiderbot, tag_head, string, "tag_head"); +/* tags */ ATTRIB(Spiderbot, tag_hud, string, "tag_hud"); +/* tags */ ATTRIB(Spiderbot, tag_view, string, ""); +/* netname */ ATTRIB(Spiderbot, netname, string, "spiderbot"); +/* fullname */ ATTRIB(Spiderbot, vehicle_name, string, _("Spiderbot")); +/* icon */ ATTRIB(Spiderbot, m_icon, string, "vehicle_spider"); +ENDCLASS(Spiderbot) + +REGISTER_VEHICLE(SPIDERBOT, NEW(Spiderbot));