From e96921cf1aaf000518f93645539e2c3baa60f528 Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 21 Sep 2015 20:41:02 +1000 Subject: [PATCH] Group effects in a folder --- qcsrc/client/csqcmodel_hooks.qc | 2 +- qcsrc/client/damage.qc | 2 +- qcsrc/client/main.qc | 2 +- qcsrc/client/progs.inc | 2 +- qcsrc/common/{ => effects}/effects.inc | 10 +++++----- qcsrc/common/{ => effects}/effects.qc | 14 ++++---------- qcsrc/common/{ => effects}/effects.qh | 0 qcsrc/common/vehicles/sv_vehicles.qc | 2 +- qcsrc/common/vehicles/unit/racer.qc | 2 +- qcsrc/server/cheats.qc | 2 +- qcsrc/server/g_world.qc | 2 +- qcsrc/server/progs.inc | 2 +- 12 files changed, 18 insertions(+), 24 deletions(-) rename qcsrc/common/{ => effects}/effects.inc (96%) rename qcsrc/common/{ => effects}/effects.qc (91%) rename qcsrc/common/{ => effects}/effects.qh (100%) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 7e36cabec..70e2c99fe 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -8,7 +8,7 @@ #include "../common/animdecide.qh" #include "../common/csqcmodel_settings.qh" -#include "../common/effects.qh" +#include "../common/effects/effects.qh" #include "../common/teams.qh" #include "../common/triggers/trigger/viewloc.qh" diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index ec0328116..21c1a79b6 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -7,7 +7,7 @@ #include "../common/constants.qh" #include "../common/deathtypes.qh" -#include "../common/effects.qh" +#include "../common/effects/effects.qh" #include "../common/movetypes/movetypes.qh" #include "../common/util.qh" diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 17a3fce1c..798b7c7dd 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -28,7 +28,7 @@ #include "../common/buffs.qh" #include "../common/deathtypes.qh" -#include "../common/effects.qh" +#include "../common/effects/effects.qh" #include "../common/mapinfo.qh" #include "../common/monsters/all.qh" #include "../common/nades.qh" diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index b46a371de..b985e36f6 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -37,7 +37,7 @@ #include "../common/animdecide.qc" #include "../common/buffs.qc" -#include "../common/effects.qc" +#include "../common/effects/effects.qc" #include "../common/mapinfo.qc" #include "../common/movetypes/include.qc" #include "../common/nades.qc" diff --git a/qcsrc/common/effects.inc b/qcsrc/common/effects/effects.inc similarity index 96% rename from qcsrc/common/effects.inc rename to qcsrc/common/effects/effects.inc index 8cd4d4995..cbd3a44ab 100644 --- a/qcsrc/common/effects.inc +++ b/qcsrc/common/effects/effects.inc @@ -99,14 +99,14 @@ EFFECT(0, RACER_ROCKETLAUNCH, "wakizashi_rocket_launch") EFFECT(0, RACER_ROCKET_EXPLODE, "wakizashi_rocket_launch") EFFECT(1, RACER_ROCKET_TRAIL, "wakizashi_rocket_thrust") -EFFECT(0, SPIDERBOT_ROCKETLAUNCH, "spiderbot_rocket_launch") -EFFECT(1, SPIDERBOT_ROCKET_TRAIL, "spiderbot_rocket_thrust") -EFFECT(0, SPIDERBOT_ROCKET_EXPLODE, "spiderbot_rocket_explode") -EFFECT(0, SPIDERBOT_MINIGUN_IMPACT, "spiderbot_minigun_impact") +EFFECT(0, SPIDERBOT_ROCKETLAUNCH, "spiderbot_rocket_launch") +EFFECT(1, SPIDERBOT_ROCKET_TRAIL, "spiderbot_rocket_thrust") +EFFECT(0, SPIDERBOT_ROCKET_EXPLODE, "spiderbot_rocket_explode") +EFFECT(0, SPIDERBOT_MINIGUN_IMPACT, "spiderbot_minigun_impact") EFFECT(0, SPIDERBOT_MINIGUN_MUZZLEFLASH, "spiderbot_minigun_muzzleflash") EFFECT(0, BUMBLEBEE_HEAL_MUZZLEFLASH, "healray_muzzleflash") -EFFECT(0, BUMBLEBEE_HEAL_IMPACT, "healray_impact") +EFFECT(0, BUMBLEBEE_HEAL_IMPACT, "healray_impact") EFFECT(0, BIGPLASMA_IMPACT, "bigplasma_impact") EFFECT(0, BIGPLASMA_MUZZLEFLASH, "bigplasma_muzzleflash") diff --git a/qcsrc/common/effects.qc b/qcsrc/common/effects/effects.qc similarity index 91% rename from qcsrc/common/effects.qc rename to qcsrc/common/effects/effects.qc index 242145f0b..5ea8a95b1 100644 --- a/qcsrc/common/effects.qc +++ b/qcsrc/common/effects/effects.qc @@ -1,11 +1,7 @@ #ifdef CSQC void Read_Effect(bool is_new) { -#if EFFECTS_COUNT >= 255 - int net_name = ReadShort(); -#else - int net_name = ReadByte(); -#endif + int net_name = (EFFECT_COUNT >= 255) ? ReadShort() : ReadByte(); entity eff = effects_ent[net_name]; @@ -41,11 +37,9 @@ void Read_Effect(bool is_new) bool Net_Write_Effect(entity client, int sf) {SELFPARAM(); WriteByte(MSG_ENTITY, ENT_CLIENT_EFFECT); -#if EFFECTS_COUNT >= 255 - WriteShort(MSG_ENTITY, self.m_id); -#else - WriteByte(MSG_ENTITY, self.m_id); -#endif + (EFFECT_COUNT >= 255) + ? WriteShort(MSG_ENTITY, self.m_id) + : WriteByte(MSG_ENTITY, self.m_id); WriteCoord(MSG_ENTITY, self.eent_net_location_x); WriteCoord(MSG_ENTITY, self.eent_net_location_y); WriteCoord(MSG_ENTITY, self.eent_net_location_z); diff --git a/qcsrc/common/effects.qh b/qcsrc/common/effects/effects.qh similarity index 100% rename from qcsrc/common/effects.qh rename to qcsrc/common/effects/effects.qh diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index ea9f18fd2..33e0bab15 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1,5 +1,5 @@ #include "sv_vehicles.qh" -#include "../effects.qh" +#include "../effects/effects.qh" #if 0 bool vehicle_send(entity to, int sf) diff --git a/qcsrc/common/vehicles/unit/racer.qc b/qcsrc/common/vehicles/unit/racer.qc index 40dbfecb3..846c647a0 100644 --- a/qcsrc/common/vehicles/unit/racer.qc +++ b/qcsrc/common/vehicles/unit/racer.qc @@ -23,7 +23,7 @@ REGISTER_VEHICLE_SIMPLE( #ifdef IMPLEMENTATION #ifdef SVQC -#include "../../effects.qh" +#include "../../effects/effects.qh" #include "../../triggers/trigger/impulse.qh" bool autocvar_g_vehicle_racer; diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 2b72368fa..a87b304bc 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -11,7 +11,7 @@ #include "../common/constants.qh" #include "../common/deathtypes.qh" -#include "../common/effects.qh" +#include "../common/effects/effects.qh" #include "../common/util.qh" #include "../common/monsters/all.qh" diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index b15e847c5..81f5c71f4 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -22,7 +22,7 @@ #include "../common/buffs.qh" #include "../common/constants.qh" #include "../common/deathtypes.qh" -#include "../common/effects.qh" +#include "../common/effects/effects.qh" #include "../common/mapinfo.qh" #include "../common/monsters/all.qh" #include "../common/monsters/sv_monsters.qh" diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index b387ed35c..069c96459 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -83,7 +83,7 @@ #include "../common/buffs.qc" #include "../common/campaign_file.qc" #include "../common/campaign_setup.qc" -#include "../common/effects.qc" +#include "../common/effects/effects.qc" #include "../common/mapinfo.qc" #include "../common/monsters/spawn.qc" #include "../common/monsters/sv_monsters.qc" -- 2.39.2