From a4e71642208a27102c82a782b72a72efc7d342bf Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 24 Dec 2015 17:34:11 +1000 Subject: [PATCH] Finally fix the stupid client including server items file issue --- qcsrc/client/hud/hud.qc | 2 +- qcsrc/client/main.qc | 2 +- qcsrc/client/progs.inc | 1 - qcsrc/client/t_items.qc | 7 ---- qcsrc/client/t_items.qh | 1 - qcsrc/common/_all.inc | 1 + qcsrc/common/items/item/ammo.qc | 2 +- qcsrc/common/items/item/armor.qc | 2 +- qcsrc/common/items/item/health.qc | 2 +- qcsrc/common/items/item/jetpack.qc | 2 +- qcsrc/common/physics/movetypes/movetypes.qc | 2 +- qcsrc/{server => common}/t_items.qc | 43 +++++++++++++-------- qcsrc/{server => common}/t_items.qh | 0 qcsrc/common/weapons/all.qc | 2 +- qcsrc/lib/warpzone/common.qc | 2 +- qcsrc/server/bot/bot.qc | 2 +- qcsrc/server/bot/navigation.qc | 2 +- qcsrc/server/g_damage.qc | 2 +- qcsrc/server/g_damage.qh | 2 +- qcsrc/server/miscfunctions.qc | 2 +- qcsrc/server/miscfunctions.qh | 2 +- qcsrc/server/mutators/all.qc | 2 +- qcsrc/server/progs.inc | 1 - qcsrc/server/weapons/common.qc | 2 +- qcsrc/server/weapons/csqcprojectile.qc | 2 +- qcsrc/server/weapons/selection.qc | 2 +- qcsrc/server/weapons/spawning.qc | 2 +- qcsrc/server/weapons/throwing.qc | 2 +- qcsrc/server/weapons/weaponsystem.qc | 2 +- 29 files changed, 50 insertions(+), 48 deletions(-) delete mode 100644 qcsrc/client/t_items.qc delete mode 100644 qcsrc/client/t_items.qh rename qcsrc/{server => common}/t_items.qc (98%) rename qcsrc/{server => common}/t_items.qh (100%) diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 75e678275..920ee1ebd 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -4,7 +4,7 @@ #include "mapvoting.qh" #include "scoreboard.qh" #include "teamradar.qh" -#include "t_items.qh" +#include "../common/t_items.qh" #include "../common/deathtypes/all.qh" #include "../common/items/all.qc" #include "../common/mapinfo.qh" diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 5fc5374b1..e436052f9 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -9,7 +9,7 @@ #include "scoreboard.qh" #include "shownames.qh" #include "tuba.qh" -#include "t_items.qh" +#include "../common/t_items.qh" #include "wall.qh" #include "weapons/projectile.qh" #include "../common/deathtypes/all.qh" diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index 70bf45e5c..fa6728d3b 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -16,7 +16,6 @@ #include "shownames.qc" #include "teamradar.qc" #include "tuba.qc" -#include "t_items.qc" #include "view.qc" #include "wall.qc" diff --git a/qcsrc/client/t_items.qc b/qcsrc/client/t_items.qc deleted file mode 100644 index 097f546ee..000000000 --- a/qcsrc/client/t_items.qc +++ /dev/null @@ -1,7 +0,0 @@ - -#include "../common/physics/movetypes/movetypes.qh" -#include "../common/weapons/all.qh" -#include "../lib/csqcmodel/cl_model.qh" -#include "../lib/csqcmodel/common.qh" - -#include "../server/t_items.qc" diff --git a/qcsrc/client/t_items.qh b/qcsrc/client/t_items.qh deleted file mode 100644 index eb016248f..000000000 --- a/qcsrc/client/t_items.qh +++ /dev/null @@ -1 +0,0 @@ -#include "../server/t_items.qh" diff --git a/qcsrc/common/_all.inc b/qcsrc/common/_all.inc index a27202962..9c888b91a 100644 --- a/qcsrc/common/_all.inc +++ b/qcsrc/common/_all.inc @@ -31,6 +31,7 @@ #include "effects/all.qc" #include "impulses/all.qc" #include "notifications.qc" +#include "t_items.qc" #endif #include "items/all.qc" diff --git a/qcsrc/common/items/item/ammo.qc b/qcsrc/common/items/item/ammo.qc index 16673711e..c1f0012be 100644 --- a/qcsrc/common/items/item/ammo.qc +++ b/qcsrc/common/items/item/ammo.qc @@ -1,6 +1,6 @@ #include "ammo.qh" #ifdef SVQC - #include "../../../server/t_items.qh" + #include "../../t_items.qh" #endif #ifndef MENUQC diff --git a/qcsrc/common/items/item/armor.qc b/qcsrc/common/items/item/armor.qc index 5bd550838..277cc8614 100644 --- a/qcsrc/common/items/item/armor.qc +++ b/qcsrc/common/items/item/armor.qc @@ -1,6 +1,6 @@ #include "armor.qh" #ifdef SVQC - #include "../../../server/t_items.qh" + #include "../../t_items.qh" #endif #ifndef MENUQC diff --git a/qcsrc/common/items/item/health.qc b/qcsrc/common/items/item/health.qc index 6a2b5b138..ce9b8760b 100644 --- a/qcsrc/common/items/item/health.qc +++ b/qcsrc/common/items/item/health.qc @@ -1,6 +1,6 @@ #include "health.qh" #ifdef SVQC - #include "../../../server/t_items.qh" + #include "../../t_items.qh" #endif #ifndef MENUQC diff --git a/qcsrc/common/items/item/jetpack.qc b/qcsrc/common/items/item/jetpack.qc index 63019aebe..256069790 100644 --- a/qcsrc/common/items/item/jetpack.qc +++ b/qcsrc/common/items/item/jetpack.qc @@ -1,5 +1,5 @@ #ifdef SVQC - #include "../../../server/t_items.qh" + #include "../../t_items.qh" #include "../../../server/constants.qh" #endif diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index fa169e9f8..bf1cb52e2 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -6,7 +6,7 @@ #include "../../util.qh" #include "movetypes.qh" #include "../../../lib/csqcmodel/common.qh" - #include "../../../server/t_items.qh" + #include "../../t_items.qh" #elif defined(MENUQC) #elif defined(SVQC) #include "../../../server/autocvars.qh" diff --git a/qcsrc/server/t_items.qc b/qcsrc/common/t_items.qc similarity index 98% rename from qcsrc/server/t_items.qc rename to qcsrc/common/t_items.qc index fbb733405..4f01b7a35 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -1,29 +1,34 @@ #include "t_items.qh" -#include "../common/items/all.qc" +#include "items/all.qc" #if defined(SVQC) - #include "bot/bot.qh" - #include "bot/waypoints.qh" + #include "../server/bot/bot.qh" + #include "../server/bot/waypoints.qh" - #include "mutators/all.qh" + #include "../server/mutators/all.qh" - #include "weapons/common.qh" - #include "weapons/selection.qh" - #include "weapons/weaponsystem.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/weaponsystem.qh" - #include "../common/constants.qh" - #include "../common/deathtypes/all.qh" - #include "../common/notifications.qh" - #include "../common/triggers/subs.qh" - #include "../common/util.qh" + #include "constants.qh" + #include "deathtypes/all.qh" + #include "notifications.qh" + #include "triggers/subs.qh" + #include "util.qh" - #include "../common/monsters/all.qh" + #include "monsters/all.qh" - #include "../common/weapons/all.qh" + #include "weapons/all.qh" #include "../lib/warpzone/util_server.qh" +#elif defined(CSQC) + #include "physics/movetypes/movetypes.qh" + #include "weapons/all.qh" + #include "../lib/csqcmodel/cl_model.qh" + #include "../lib/csqcmodel/common.qh" #endif REGISTER_NET_LINKED(ENT_CLIENT_ITEM) @@ -78,9 +83,15 @@ void ItemDrawSimple(entity this) void Item_PreDraw() {SELFPARAM(); - vector org; + if(warpzone_warpzones_exist) + { + // just incase warpzones were initialized last, reset these + self.alpha = 1; + self.drawmask = MASK_NORMAL; + return; + } float alph; - org = getpropertyvec(VF_ORIGIN); + vector org = getpropertyvec(VF_ORIGIN); if(!checkpvs(org, self)) // this makes sense as long as we don't support recursive warpzones alph = 0; else if(self.fade_start) diff --git a/qcsrc/server/t_items.qh b/qcsrc/common/t_items.qh similarity index 100% rename from qcsrc/server/t_items.qh rename to qcsrc/common/t_items.qh diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 5149c8d42..78c9c923d 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -31,7 +31,7 @@ #include "config.qh" #include "../../server/weapons/csqcprojectile.qh" #include "../../server/weapons/tracing.qh" - #include "../../server/t_items.qh" + #include "../t_items.qh" #include "../../server/autocvars.qh" #include "../../server/constants.qh" #include "../../server/defs.qh" diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 0f898c340..c725c69a7 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -1,7 +1,7 @@ #include "common.qh" #if defined(CSQC) - #include "../../server/t_items.qh" + #include "../../common/t_items.qh" #elif defined(MENUQC) #elif defined(SVQC) #include "../../common/weapons/all.qh" diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 8d21757c2..d9beb7c53 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -17,7 +17,7 @@ #include "../constants.qh" #include "../defs.qh" #include "../race.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../mutators/all.qh" diff --git a/qcsrc/server/bot/navigation.qc b/qcsrc/server/bot/navigation.qc index 36171eddf..a1bfb05c0 100644 --- a/qcsrc/server/bot/navigation.qc +++ b/qcsrc/server/bot/navigation.qc @@ -3,7 +3,7 @@ #include "bot.qh" #include "waypoints.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../../common/items/all.qh" diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index cdafc53b6..f792874a8 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -5,7 +5,7 @@ #include "mutators/all.qh" #include "scores.qh" #include "spawnpoints.qh" -#include "t_items.qh" +#include "../common/t_items.qh" #include "../common/vehicles/all.qh" #include "../common/items/all.qc" #include "../common/mutators/mutator/waypoints/waypointsprites.qh" diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index fc8bf9c8f..1f4f3b5d2 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -12,7 +12,7 @@ #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" - #include "t_items.qh" + #include "../common/t_items.qh" #include "autocvars.qh" #include "constants.qh" #include "defs.qh" diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 9fd8026a3..c6900aa95 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -5,7 +5,7 @@ #include "g_hook.qh" #include "ipban.qh" #include "mutators/all.qh" -#include "t_items.qh" +#include "../common/t_items.qh" #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 22b769d6f..9df9042aa 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -1,7 +1,7 @@ #ifndef MISCFUNCTIONS_H #define MISCFUNCTIONS_H -#include "t_items.qh" +#include "../common/t_items.qh" #include "mutators/events.qh" diff --git a/qcsrc/server/mutators/all.qc b/qcsrc/server/mutators/all.qc index 3520953ba..72c41ad47 100644 --- a/qcsrc/server/mutators/all.qc +++ b/qcsrc/server/mutators/all.qc @@ -30,7 +30,7 @@ #include "../weapons/tracing.qh" #include "../weapons/weaponstats.qh" #include "../weapons/weaponsystem.qh" - #include "../t_items.qh" + #include "../../common/t_items.qh" #include "../autocvars.qh" #include "../constants.qh" #include "../defs.qh" diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index f0c13be64..0665f807c 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -31,7 +31,6 @@ #include "sv_main.qc" #include "teamplay.qc" #include "t_halflife.qc" -#include "t_items.qc" #include "t_quake3.qc" #include "t_quake.qc" diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index b100259ef..5efd97ae0 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -1,6 +1,6 @@ #include "common.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../../common/constants.qh" #include "../../common/deathtypes/all.qh" #include "../../common/notifications.qh" diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index dfee55136..1b7bd8231 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,6 +1,6 @@ #include "csqcprojectile.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../command/common.qh" diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 4b96e1f9d..9a4024a60 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -1,7 +1,7 @@ #include "selection.qh" #include "weaponsystem.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../../common/constants.qh" #include "../../common/util.qh" #include "../../common/items/item.qh" diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index 3732db3b9..269273287 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -2,7 +2,7 @@ #include "weaponsystem.qh" #include "../mutators/all.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../../common/weapons/all.qh" string W_Apply_Weaponreplace(string in) diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index c70364993..1e0f9c02f 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -2,7 +2,7 @@ #include "weaponsystem.qh" #include "../mutators/all.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../g_damage.qh" #include "../../common/items/item.qh" #include "../../common/mapinfo.qh" diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index abc2ffa80..f762b40dc 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -5,7 +5,7 @@ #include "../command/common.qh" #include "../mutators/all.qh" #include "../round_handler.qh" -#include "../t_items.qh" +#include "../../common/t_items.qh" #include "../../common/animdecide.qh" #include "../../common/constants.qh" #include "../../common/monsters/all.qh" -- 2.39.2