From: TimePath Date: Sun, 13 Aug 2017 09:22:53 +0000 (+1000) Subject: turrets: remove _all X-Git-Tag: xonotic-v0.8.5~2531 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a843a2ccd4ec692b0ef0a2a7b3911b777cdef333;p=xonotic%2Fxonotic-data.pk3dir.git turrets: remove _all --- diff --git a/qcsrc/common/_all.inc b/qcsrc/common/_all.inc index 56681b099..687833390 100644 --- a/qcsrc/common/_all.inc +++ b/qcsrc/common/_all.inc @@ -45,7 +45,7 @@ noref float autocvar_net_connecttimeout = 30; #include "items/_mod.inc" #include "weapons/_all.inc" #include "monsters/_mod.inc" - #include "turrets/all.qc" + #include "turrets/_mod.inc" #include "vehicles/all.qc" #include "mutators/_mod.inc" diff --git a/qcsrc/common/turrets/_all.inc b/qcsrc/common/turrets/_all.inc deleted file mode 100644 index 8bc63f720..000000000 --- a/qcsrc/common/turrets/_all.inc +++ /dev/null @@ -1,2 +0,0 @@ -#include "_all.qh" -#include "_mod.inc" diff --git a/qcsrc/common/turrets/_all.qh b/qcsrc/common/turrets/_all.qh deleted file mode 100644 index 947026dd5..000000000 --- a/qcsrc/common/turrets/_all.qh +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "_mod.qh" diff --git a/qcsrc/common/turrets/_mod.inc b/qcsrc/common/turrets/_mod.inc index 8fff9535c..f8eb32263 100644 --- a/qcsrc/common/turrets/_mod.inc +++ b/qcsrc/common/turrets/_mod.inc @@ -11,3 +11,5 @@ #include #endif #include + +#include diff --git a/qcsrc/common/turrets/_mod.qh b/qcsrc/common/turrets/_mod.qh index 06978f1d4..427ec4049 100644 --- a/qcsrc/common/turrets/_mod.qh +++ b/qcsrc/common/turrets/_mod.qh @@ -11,3 +11,5 @@ #include #endif #include + +#include diff --git a/qcsrc/common/turrets/all.qc b/qcsrc/common/turrets/all.qc index 469a64c92..54e63748c 100644 --- a/qcsrc/common/turrets/all.qc +++ b/qcsrc/common/turrets/all.qc @@ -1,23 +1,3 @@ #include "all.qh" REGISTER_NET_LINKED(ENT_CLIENT_TURRET) - -#ifdef SVQC -#include "sv_turrets.qh" -#endif - -#define IMPLEMENTATION -#include "turret/_mod.inc" -#undef IMPLEMENTATION - -#ifdef CSQC -#include "cl_turrets.qc" -#endif - -#ifdef SVQC -#include "sv_turrets.qc" -#include "config.qc" -#include "util.qc" -#include "checkpoint.qc" -#include "targettrigger.qc" -#endif diff --git a/qcsrc/common/turrets/all.qh b/qcsrc/common/turrets/all.qh index 1a77e9891..8bd0b14b7 100644 --- a/qcsrc/common/turrets/all.qh +++ b/qcsrc/common/turrets/all.qh @@ -73,4 +73,4 @@ const int TUR_FIRST = 1; REGISTER_TURRET(Null, NEW(Turret)); -#include "turret/_mod.inc" +#include "turret/_mod.qh" diff --git a/qcsrc/common/turrets/checkpoint.qc b/qcsrc/common/turrets/checkpoint.qc index d9a20dc97..f5ba71477 100644 --- a/qcsrc/common/turrets/checkpoint.qc +++ b/qcsrc/common/turrets/checkpoint.qc @@ -1,4 +1,7 @@ #include "checkpoint.qh" + +#ifdef SVQC + /** turret_checkpoint **/ @@ -75,3 +78,5 @@ spawnfunc(walker_checkpoint) this.classname = "turret_checkpoint"; spawnfunc_turret_checkpoint(this); } + +#endif diff --git a/qcsrc/common/turrets/config.qc b/qcsrc/common/turrets/config.qc index 7d1a81d49..a5a23f937 100644 --- a/qcsrc/common/turrets/config.qc +++ b/qcsrc/common/turrets/config.qc @@ -3,6 +3,8 @@ // Turret Config Generator // ========================== +#ifdef SVQC + void T_Config_Queue_Swap(float root, float child, entity pass) { string oldroot = config_queue[root]; @@ -60,3 +62,5 @@ void Dump_Turret_Settings() // extra information LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (Turrets_COUNT - 1), totalsettings)); } + +#endif diff --git a/qcsrc/common/turrets/targettrigger.qc b/qcsrc/common/turrets/targettrigger.qc index 152a7d6a2..d64616f50 100644 --- a/qcsrc/common/turrets/targettrigger.qc +++ b/qcsrc/common/turrets/targettrigger.qc @@ -1,4 +1,7 @@ #include "targettrigger.qh" + +#ifdef SVQC + spawnfunc(turret_targettrigger); void turret_targettrigger_touch(entity this, entity toucher); @@ -24,3 +27,5 @@ spawnfunc(turret_targettrigger) settouch(this, turret_targettrigger_touch); } + +#endif diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index 403a0ddf6..5625d23fc 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -1,7 +1,5 @@ #include "ewheel.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC float autocvar_g_turrets_unit_ewheel_speed_fast; @@ -245,4 +243,3 @@ void ewheel_draw(entity this) } #endif // CSQC -#endif diff --git a/qcsrc/common/turrets/turret/ewheel_weapon.qc b/qcsrc/common/turrets/turret/ewheel_weapon.qc index e77b53402..fc22c3086 100644 --- a/qcsrc/common/turrets/turret/ewheel_weapon.qc +++ b/qcsrc/common/turrets/turret/ewheel_weapon.qc @@ -1,7 +1,5 @@ #include "ewheel_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC void turret_initparams(entity); @@ -36,5 +34,3 @@ METHOD(EWheelAttack, wr_think, void(entity thiswep, entity actor, .entity weapon } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/flac.qc b/qcsrc/common/turrets/turret/flac.qc index ab6e5f5cb..6a81bc2c9 100644 --- a/qcsrc/common/turrets/turret/flac.qc +++ b/qcsrc/common/turrets/turret/flac.qc @@ -1,7 +1,5 @@ #include "flac.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_flac) { if (!turret_initialize(this, TUR_FLAC)) delete(this); } @@ -15,5 +13,3 @@ METHOD(Flac, tr_setup, void(Flac this, entity it)) } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/flac_weapon.qc b/qcsrc/common/turrets/turret/flac_weapon.qc index 357bba975..10d53aa08 100644 --- a/qcsrc/common/turrets/turret/flac_weapon.qc +++ b/qcsrc/common/turrets/turret/flac_weapon.qc @@ -1,7 +1,5 @@ #include "flac_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC void turret_flac_projectile_think_explode(entity this); @@ -53,5 +51,3 @@ void turret_flac_projectile_think_explode(entity this) } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/fusionreactor.qc b/qcsrc/common/turrets/turret/fusionreactor.qc index 3c468535c..32ac81d58 100644 --- a/qcsrc/common/turrets/turret/fusionreactor.qc +++ b/qcsrc/common/turrets/turret/fusionreactor.qc @@ -1,6 +1,5 @@ #include "fusionreactor.qh" -#ifdef IMPLEMENTATION #ifdef SVQC bool turret_fusionreactor_firecheck(entity this) { @@ -53,4 +52,3 @@ METHOD(FusionReactor, tr_setup, void(FusionReactor this, entity it)) } #endif -#endif diff --git a/qcsrc/common/turrets/turret/hellion.qc b/qcsrc/common/turrets/turret/hellion.qc index 88a0170ea..15dc36b3d 100644 --- a/qcsrc/common/turrets/turret/hellion.qc +++ b/qcsrc/common/turrets/turret/hellion.qc @@ -1,7 +1,5 @@ #include "hellion.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_hellion) { if (!turret_initialize(this, TUR_HELLION)) delete(this); } @@ -23,4 +21,3 @@ METHOD(Hellion, tr_setup, void(Hellion this, entity it)) } #endif -#endif diff --git a/qcsrc/common/turrets/turret/hellion_weapon.qc b/qcsrc/common/turrets/turret/hellion_weapon.qc index ea392ec4e..a1065dec1 100644 --- a/qcsrc/common/turrets/turret/hellion_weapon.qc +++ b/qcsrc/common/turrets/turret/hellion_weapon.qc @@ -1,7 +1,5 @@ #include "hellion_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC float autocvar_g_turrets_unit_hellion_shot_speed_gain; @@ -103,5 +101,3 @@ void turret_hellion_missile_think(entity this) } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/hk.qc b/qcsrc/common/turrets/turret/hk.qc index 255821e1c..811e386f5 100644 --- a/qcsrc/common/turrets/turret/hk.qc +++ b/qcsrc/common/turrets/turret/hk.qc @@ -1,7 +1,5 @@ #include "hk.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC #ifdef TURRET_DEBUG_HK @@ -47,4 +45,3 @@ bool turret_hk_addtarget(entity this, entity e_target,entity e_sender) } #endif // SVQC -#endif diff --git a/qcsrc/common/turrets/turret/hk_weapon.qc b/qcsrc/common/turrets/turret/hk_weapon.qc index 5a2f05a48..9a243adaa 100644 --- a/qcsrc/common/turrets/turret/hk_weapon.qc +++ b/qcsrc/common/turrets/turret/hk_weapon.qc @@ -1,7 +1,5 @@ #include "hk_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC float autocvar_g_turrets_unit_hk_shot_speed; @@ -278,5 +276,3 @@ bool hk_is_valid_target(entity this, entity proj, entity targ) } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/machinegun.qc b/qcsrc/common/turrets/turret/machinegun.qc index db3cb47bf..a2ee1def6 100644 --- a/qcsrc/common/turrets/turret/machinegun.qc +++ b/qcsrc/common/turrets/turret/machinegun.qc @@ -1,7 +1,5 @@ #include "machinegun.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_machinegun) { if (!turret_initialize(this, TUR_MACHINEGUN)) delete(this); } @@ -16,4 +14,3 @@ METHOD(MachineGunTurret, tr_setup, void(MachineGunTurret this, entity it)) } #endif // SVQC -#endif diff --git a/qcsrc/common/turrets/turret/machinegun_weapon.qc b/qcsrc/common/turrets/turret/machinegun_weapon.qc index c60cd3b37..846b52343 100644 --- a/qcsrc/common/turrets/turret/machinegun_weapon.qc +++ b/qcsrc/common/turrets/turret/machinegun_weapon.qc @@ -1,7 +1,5 @@ #include "machinegun_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC void W_MachineGun_MuzzleFlash(entity actor, .entity weaponentity); @@ -26,5 +24,3 @@ METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, entity actor, .ent } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/mlrs.qc b/qcsrc/common/turrets/turret/mlrs.qc index 472a0cb09..2315012b1 100644 --- a/qcsrc/common/turrets/turret/mlrs.qc +++ b/qcsrc/common/turrets/turret/mlrs.qc @@ -1,7 +1,5 @@ #include "mlrs.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_mlrs) { if (!turret_initialize(this, TUR_MLRS)) delete(this); } @@ -27,4 +25,3 @@ METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it)) } #endif // SVQC -#endif diff --git a/qcsrc/common/turrets/turret/mlrs_weapon.qc b/qcsrc/common/turrets/turret/mlrs_weapon.qc index cfd51c732..ccf309aaf 100644 --- a/qcsrc/common/turrets/turret/mlrs_weapon.qc +++ b/qcsrc/common/turrets/turret/mlrs_weapon.qc @@ -1,7 +1,5 @@ #include "mlrs_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC SOUND(MLRSTurretAttack_FIRE, W_Sound("electro_fire")); METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) @@ -27,5 +25,3 @@ METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity we } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/phaser.qc b/qcsrc/common/turrets/turret/phaser.qc index 31ece9cb2..9c93a6e89 100644 --- a/qcsrc/common/turrets/turret/phaser.qc +++ b/qcsrc/common/turrets/turret/phaser.qc @@ -1,7 +1,5 @@ #include "phaser.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_phaser) { if (!turret_initialize(this, TUR_PHASER)) delete(this); } @@ -45,4 +43,3 @@ bool turret_phaser_firecheck(entity this) } #endif -#endif diff --git a/qcsrc/common/turrets/turret/phaser_weapon.qc b/qcsrc/common/turrets/turret/phaser_weapon.qc index bf901d886..3fb34fb14 100644 --- a/qcsrc/common/turrets/turret/phaser_weapon.qc +++ b/qcsrc/common/turrets/turret/phaser_weapon.qc @@ -1,7 +1,5 @@ #include "phaser_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC void beam_think(entity this); @@ -90,5 +88,3 @@ void beam_think(entity this) } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/plasma.qc b/qcsrc/common/turrets/turret/plasma.qc index 7317930c9..96fa81f8e 100644 --- a/qcsrc/common/turrets/turret/plasma.qc +++ b/qcsrc/common/turrets/turret/plasma.qc @@ -1,7 +1,5 @@ #include "plasma.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_plasma) { if (!turret_initialize(this, TUR_PLASMA)) delete(this); } @@ -46,4 +44,3 @@ METHOD(PlasmaTurret, tr_setup, void(PlasmaTurret this, entity it)) } #endif -#endif diff --git a/qcsrc/common/turrets/turret/plasma_dual.qc b/qcsrc/common/turrets/turret/plasma_dual.qc index 3efe969f3..2a6f997cf 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qc +++ b/qcsrc/common/turrets/turret/plasma_dual.qc @@ -1,7 +1,5 @@ #include "plasma_dual.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) delete(this); } @@ -34,4 +32,3 @@ METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it)) } #endif -#endif diff --git a/qcsrc/common/turrets/turret/plasma_weapon.qc b/qcsrc/common/turrets/turret/plasma_weapon.qc index f6f717f85..7de7406e2 100644 --- a/qcsrc/common/turrets/turret/plasma_weapon.qc +++ b/qcsrc/common/turrets/turret/plasma_weapon.qc @@ -1,7 +1,5 @@ #include "plasma_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC SOUND(PlasmaAttack_FIRE, W_Sound("electro_fire")); METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { @@ -23,5 +21,3 @@ METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weapon } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/tesla.qc b/qcsrc/common/turrets/turret/tesla.qc index 249fe18eb..4c27bc9ac 100644 --- a/qcsrc/common/turrets/turret/tesla.qc +++ b/qcsrc/common/turrets/turret/tesla.qc @@ -1,7 +1,5 @@ #include "tesla.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC spawnfunc(turret_tesla) { if (!turret_initialize(this, TUR_TESLA)) delete(this); } @@ -88,4 +86,3 @@ bool turret_tesla_firecheck(entity this) } #endif -#endif diff --git a/qcsrc/common/turrets/turret/tesla_weapon.qc b/qcsrc/common/turrets/turret/tesla_weapon.qc index 7e6fda78a..88ca4db97 100644 --- a/qcsrc/common/turrets/turret/tesla_weapon.qc +++ b/qcsrc/common/turrets/turret/tesla_weapon.qc @@ -1,7 +1,5 @@ #include "tesla_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC entity toast(entity actor, entity from, float range, float damage); @@ -84,5 +82,3 @@ entity toast(entity actor, entity from, float range, float damage) } #endif - -#endif diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 2f651589d..415d5dfee 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -1,7 +1,5 @@ #include "walker.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC float autocvar_g_turrets_unit_walker_melee_damage; @@ -643,4 +641,3 @@ void walker_draw(entity this) } #endif // CSQC -#endif diff --git a/qcsrc/common/turrets/turret/walker_weapon.qc b/qcsrc/common/turrets/turret/walker_weapon.qc index 9bcf90290..b418ce40d 100644 --- a/qcsrc/common/turrets/turret/walker_weapon.qc +++ b/qcsrc/common/turrets/turret/walker_weapon.qc @@ -1,7 +1,5 @@ #include "walker_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC SOUND(WalkerTurretAttack_FIRE, W_Sound("electro_fire")); @@ -24,5 +22,3 @@ METHOD(WalkerTurretAttack, wr_think, void(entity thiswep, entity actor, .entity } #endif - -#endif diff --git a/qcsrc/common/turrets/util.qc b/qcsrc/common/turrets/util.qc index 5fef36458..d4cbb4fb1 100644 --- a/qcsrc/common/turrets/util.qc +++ b/qcsrc/common/turrets/util.qc @@ -1,4 +1,7 @@ #include "util.qh" + +#ifdef SVQC + /* * Update this.tur_shotorg by getting up2date bone info * NOTICE this func overwrites the global v_forward, v_right and v_up vectors. @@ -210,3 +213,5 @@ void paint_target3(vector where, float f_size, vector v_color, float f_time) SUB_SetFade(e,time,f_time); } #endif + +#endif diff --git a/qcsrc/common/turrets/util.qh b/qcsrc/common/turrets/util.qh index be207b711..4c84f268d 100644 --- a/qcsrc/common/turrets/util.qh +++ b/qcsrc/common/turrets/util.qh @@ -1,4 +1,8 @@ #pragma once +#ifdef SVQC + float turret_tag_fire_update(entity this); void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype); + +#endif