From 84ed53c3fe912ef2bd782a42cca94bb8db2d9e09 Mon Sep 17 00:00:00 2001 From: TimePath Date: Fri, 6 Nov 2015 09:00:06 +1100 Subject: [PATCH] Net: move message headers to their respective files --- qcsrc/common/constants.qh | 46 +++++-------------- qcsrc/common/items/inventory.qh | 2 + qcsrc/common/minigames/minigames.qc | 2 + qcsrc/common/net_notice.qc | 2 + qcsrc/common/notifications.qc | 2 + qcsrc/common/triggers/func/conveyor.qc | 2 + qcsrc/common/triggers/func/door.qc | 2 + qcsrc/common/triggers/func/ladder.qc | 2 + qcsrc/common/triggers/func/plat.qc | 2 + qcsrc/common/triggers/func/pointparticles.qc | 2 + qcsrc/common/triggers/func/rainsnow.qc | 2 + qcsrc/common/triggers/func/train.qc | 2 + qcsrc/common/triggers/misc/corner.qc | 2 + qcsrc/common/triggers/misc/laser.qc | 2 + qcsrc/common/triggers/target/music.qc | 3 ++ qcsrc/common/triggers/trigger/impulse.qc | 2 + qcsrc/common/triggers/trigger/jumppads.qc | 3 ++ qcsrc/common/triggers/trigger/keylock.qc | 2 + qcsrc/common/triggers/trigger/swamp.qc | 4 +- qcsrc/common/triggers/trigger/viewloc.qc | 3 ++ qcsrc/common/turrets/all.qc | 2 + qcsrc/common/vehicles/all.qc | 2 + .../vehicles/vehicle/bumblebee_weapons.qc | 2 + qcsrc/common/weapons/weapon/shockwave.qc | 3 ++ qcsrc/common/weapons/weapon/vortex.qc | 2 + qcsrc/server/t_items.qc | 2 + 26 files changed, 66 insertions(+), 36 deletions(-) diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 2b40b2e00..8c94c37ca 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -33,14 +33,10 @@ const int AS_FLOAT = 8; REGISTER_NET_TEMP(TE_CSQC_PICTURE) REGISTER_NET_TEMP(TE_CSQC_RACE) -REGISTER_NET_TEMP(TE_CSQC_VORTEXBEAMPARTICLE) REGISTER_NET_TEMP(TE_CSQC_TEAMNAGGER) REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT) -REGISTER_NET_TEMP(TE_CSQC_TARGET_MUSIC) REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN) REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP) -REGISTER_NET_TEMP(TE_CSQC_SVNOTICE) -REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE) const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder const int RACE_NET_CHECKPOINT_CLEAR = 1; @@ -61,9 +57,6 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS) REGISTER_NET_LINKED(ENT_CLIENT_SCORES_INFO) REGISTER_NET_LINKED(ENT_CLIENT_SCORES) REGISTER_NET_LINKED(ENT_CLIENT_TEAMSCORES) -REGISTER_NET_LINKED(ENT_CLIENT_POINTPARTICLES) -REGISTER_NET_LINKED(ENT_CLIENT_RAINSNOW) -REGISTER_NET_LINKED(ENT_CLIENT_LASER) REGISTER_NET_LINKED(ENT_CLIENT_NAGGER) // flags [votecalledvote] REGISTER_NET_LINKED(ENT_CLIENT_RADARLINK) // flags [startorigin] [endorigin] [startcolor+16*endcolor] REGISTER_NET_LINKED(ENT_CLIENT_PROJECTILE) @@ -71,39 +64,22 @@ REGISTER_NET_LINKED(ENT_CLIENT_INIT) REGISTER_NET_LINKED(ENT_CLIENT_MAPVOTE) REGISTER_NET_LINKED(ENT_CLIENT_CLIENTDATA) REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED) -REGISTER_NET_LINKED(ENT_CLIENT_WALL) -REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE) +REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY) +REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS) + +REGISTER_NET_LINKED(ENT_CLIENT_MODEL) + REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE) REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA) -REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_MUSIC) -REGISTER_NET_LINKED(ENT_CLIENT_HOOK) -REGISTER_NET_LINKED(ENT_CLIENT_INVENTORY) -REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM) // WEAPONTODO: fix numbers -REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY) REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED) -REGISTER_NET_LINKED(ENT_CLIENT_MODEL) -REGISTER_NET_LINKED(ENT_CLIENT_ITEM) -REGISTER_NET_LINKED(ENT_CLIENT_BUMBLE_RAYGUN) + +REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM) +REGISTER_NET_LINKED(ENT_CLIENT_HOOK) +REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE) + REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT) REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT) -REGISTER_NET_LINKED(ENT_CLIENT_NOTIFICATION) -REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS) -REGISTER_NET_LINKED(ENT_CLIENT_TURRET) -REGISTER_NET_LINKED(ENT_CLIENT_AUXILIARYXHAIR) -REGISTER_NET_LINKED(ENT_CLIENT_LADDER) -REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_PUSH) -REGISTER_NET_LINKED(ENT_CLIENT_TARGET_PUSH) -REGISTER_NET_LINKED(ENT_CLIENT_CONVEYOR) -REGISTER_NET_LINKED(ENT_CLIENT_DOOR) -REGISTER_NET_LINKED(ENT_CLIENT_TRAIN) -REGISTER_NET_LINKED(ENT_CLIENT_PLAT) -REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_IMPULSE) -REGISTER_NET_LINKED(ENT_CLIENT_SWAMP) -REGISTER_NET_LINKED(ENT_CLIENT_CORNER) -REGISTER_NET_LINKED(ENT_CLIENT_KEYLOCK) -REGISTER_NET_LINKED(ENT_CLIENT_MINIGAME) -REGISTER_NET_LINKED(ENT_CLIENT_VIEWLOC) -REGISTER_NET_LINKED(ENT_CLIENT_VIEWLOC_TRIGGER) +REGISTER_NET_LINKED(ENT_CLIENT_WALL) const int SPRITERULE_DEFAULT = 0; const int SPRITERULE_TEAMPLAY = 1; diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index b4c7c787c..4ea378994 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -11,6 +11,8 @@ class(Inventory) .int inv_items[Items_MAX]; /** Player inventory; Inventories also have one inventory for storing the previous state */ .Inventory inventory; +REGISTER_NET_LINKED(ENT_CLIENT_INVENTORY) + #ifdef CSQC NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew) { diff --git a/qcsrc/common/minigames/minigames.qc b/qcsrc/common/minigames/minigames.qc index bc854952e..8a29bc297 100644 --- a/qcsrc/common/minigames/minigames.qc +++ b/qcsrc/common/minigames/minigames.qc @@ -1,5 +1,7 @@ #include "minigames.qh" +REGISTER_NET_LINKED(ENT_CLIENT_MINIGAME) + entity minigame_get_descriptor(string id) { FOREACH(Minigames, true, LAMBDA( diff --git a/qcsrc/common/net_notice.qc b/qcsrc/common/net_notice.qc index b409ecd5f..b54e19e98 100644 --- a/qcsrc/common/net_notice.qc +++ b/qcsrc/common/net_notice.qc @@ -1,5 +1,7 @@ #include "net_notice.qh" +REGISTER_NET_TEMP(TE_CSQC_SVNOTICE) + #ifdef SVQC void sv_notice_join_think() {SELFPARAM(); diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 6507669b6..94a46d94a 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -1679,6 +1679,8 @@ void Local_Notification_WOVA( // Notification Networking // ========================= +REGISTER_NET_LINKED(ENT_CLIENT_NOTIFICATION) + #ifdef CSQC NET_HANDLE(ENT_CLIENT_NOTIFICATION, bool is_new) { diff --git a/qcsrc/common/triggers/func/conveyor.qc b/qcsrc/common/triggers/func/conveyor.qc index f0cc4d803..ac30dda43 100644 --- a/qcsrc/common/triggers/func/conveyor.qc +++ b/qcsrc/common/triggers/func/conveyor.qc @@ -1,3 +1,5 @@ +REGISTER_NET_LINKED(ENT_CLIENT_CONVEYOR) + void conveyor_think() {SELFPARAM(); #ifdef CSQC diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index 20bedff30..6c8256556 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -599,6 +599,8 @@ void LinkDoors() door_spawnfield(cmins, cmaxs); } +REGISTER_NET_LINKED(ENT_CLIENT_DOOR) + #ifdef SVQC /*QUAKED spawnfunc_func_door (0 .5 .8) ? START_OPEN x DOOR_DONT_LINK GOLD_KEY SILVER_KEY TOGGLE if two doors touch, they are assumed to be connected and operate as a unit. diff --git a/qcsrc/common/triggers/func/ladder.qc b/qcsrc/common/triggers/func/ladder.qc index 8c87c15ae..0ddf08eef 100644 --- a/qcsrc/common/triggers/func/ladder.qc +++ b/qcsrc/common/triggers/func/ladder.qc @@ -1,3 +1,5 @@ +REGISTER_NET_LINKED(ENT_CLIENT_LADDER) + void func_ladder_touch() {SELFPARAM(); #ifdef SVQC diff --git a/qcsrc/common/triggers/func/plat.qc b/qcsrc/common/triggers/func/plat.qc index 3b3c8eefd..cb2cc3a49 100644 --- a/qcsrc/common/triggers/func/plat.qc +++ b/qcsrc/common/triggers/func/plat.qc @@ -1,3 +1,5 @@ +REGISTER_NET_LINKED(ENT_CLIENT_PLAT) + #ifdef SVQC void plat_link(); diff --git a/qcsrc/common/triggers/func/pointparticles.qc b/qcsrc/common/triggers/func/pointparticles.qc index 470e5ff5b..ef42c93eb 100644 --- a/qcsrc/common/triggers/func/pointparticles.qc +++ b/qcsrc/common/triggers/func/pointparticles.qc @@ -1,3 +1,5 @@ +REGISTER_NET_LINKED(ENT_CLIENT_POINTPARTICLES) + #ifdef SVQC // NOTE: also contains func_sparks diff --git a/qcsrc/common/triggers/func/rainsnow.qc b/qcsrc/common/triggers/func/rainsnow.qc index f1f320ee6..7ed9c558c 100644 --- a/qcsrc/common/triggers/func/rainsnow.qc +++ b/qcsrc/common/triggers/func/rainsnow.qc @@ -1,3 +1,5 @@ +REGISTER_NET_LINKED(ENT_CLIENT_RAINSNOW) + #ifdef SVQC bool rainsnow_SendEntity(entity this, entity to, float sf) { diff --git a/qcsrc/common/triggers/func/train.qc b/qcsrc/common/triggers/func/train.qc index d7a3666ff..0f827a60e 100644 --- a/qcsrc/common/triggers/func/train.qc +++ b/qcsrc/common/triggers/func/train.qc @@ -101,6 +101,8 @@ void train_next() _sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_IDLE); } +REGISTER_NET_LINKED(ENT_CLIENT_TRAIN) + #ifdef SVQC float train_send(entity to, float sf) {SELFPARAM(); diff --git a/qcsrc/common/triggers/misc/corner.qc b/qcsrc/common/triggers/misc/corner.qc index 1623ac4fc..d1bfe00de 100644 --- a/qcsrc/common/triggers/misc/corner.qc +++ b/qcsrc/common/triggers/misc/corner.qc @@ -1,3 +1,5 @@ +REGISTER_NET_LINKED(ENT_CLIENT_CORNER) + #ifdef SVQC bool corner_send(entity to, int sf) {SELFPARAM(); diff --git a/qcsrc/common/triggers/misc/laser.qc b/qcsrc/common/triggers/misc/laser.qc index 20a5b7229..a7dcd7e90 100644 --- a/qcsrc/common/triggers/misc/laser.qc +++ b/qcsrc/common/triggers/misc/laser.qc @@ -7,6 +7,8 @@ #elif defined(SVQC) #endif +REGISTER_NET_LINKED(ENT_CLIENT_LASER) + #ifdef SVQC .float modelscale; void misc_laser_aim() diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index a1ef4829d..283b8afb4 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -6,6 +6,9 @@ #include "../../../server/defs.qh" #endif +REGISTER_NET_TEMP(TE_CSQC_TARGET_MUSIC) +REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_MUSIC) + #ifdef SVQC // values: diff --git a/qcsrc/common/triggers/trigger/impulse.qc b/qcsrc/common/triggers/trigger/impulse.qc index a9c68051b..77c491c35 100644 --- a/qcsrc/common/triggers/trigger/impulse.qc +++ b/qcsrc/common/triggers/trigger/impulse.qc @@ -113,6 +113,8 @@ void trigger_impulse_touch3() #endif } +REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_IMPULSE) + /*QUAKED spawnfunc_trigger_impulse (.5 .5 .5) ? -------- KEYS -------- target : If this is set, this points to the spawnfunc_target_position to which the player will get pushed. diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 7cbc86e96..0b3be0056 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -13,6 +13,9 @@ void trigger_push_use() } #endif +REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_PUSH) +REGISTER_NET_LINKED(ENT_CLIENT_TARGET_PUSH) + /* trigger_push_calculatevelocity diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index d3ffd719d..98b121d6e 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -94,6 +94,8 @@ void trigger_keylock_touch() } +REGISTER_NET_LINKED(ENT_CLIENT_KEYLOCK) + #ifdef SVQC bool trigger_keylock_send(entity to, int sf) {SELFPARAM(); diff --git a/qcsrc/common/triggers/trigger/swamp.qc b/qcsrc/common/triggers/trigger/swamp.qc index 38e4e394a..ae29a7534 100644 --- a/qcsrc/common/triggers/trigger/swamp.qc +++ b/qcsrc/common/triggers/trigger/swamp.qc @@ -92,10 +92,12 @@ void swamp_touch() other.swampslug.health = 2; } +REGISTER_NET_LINKED(ENT_CLIENT_SWAMP) + #ifdef SVQC float swamp_send(entity to, float sf) {SELFPARAM(); - WriteHeader(MSG_ENTITY, ENT_CLIENT_LADDER); // FIXME: should this really be sent as a ladder? + WriteHeader(MSG_ENTITY, ENT_CLIENT_SWAMP); WriteByte(MSG_ENTITY, self.dmg); // can probably get away with using a single byte here WriteByte(MSG_ENTITY, self.swamp_slowdown); diff --git a/qcsrc/common/triggers/trigger/viewloc.qc b/qcsrc/common/triggers/trigger/viewloc.qc index 81b364cef..af67533a8 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qc +++ b/qcsrc/common/triggers/trigger/viewloc.qc @@ -5,6 +5,9 @@ #include "../../../server/defs.qh" #endif +REGISTER_NET_LINKED(ENT_CLIENT_VIEWLOC) +REGISTER_NET_LINKED(ENT_CLIENT_VIEWLOC_TRIGGER) + #ifdef SVQC void viewloc_think() diff --git a/qcsrc/common/turrets/all.qc b/qcsrc/common/turrets/all.qc index 8fa4632f9..bbd0d6811 100644 --- a/qcsrc/common/turrets/all.qc +++ b/qcsrc/common/turrets/all.qc @@ -1,5 +1,7 @@ #include "all.qh" +REGISTER_NET_LINKED(ENT_CLIENT_TURRET) + #ifdef SVQC #include "sv_turrets.qh" #endif diff --git a/qcsrc/common/vehicles/all.qc b/qcsrc/common/vehicles/all.qc index 72d72d29d..c7b845822 100644 --- a/qcsrc/common/vehicles/all.qc +++ b/qcsrc/common/vehicles/all.qc @@ -23,6 +23,8 @@ STATIC_INIT(vehicles_common_initialize) } #endif +REGISTER_NET_LINKED(ENT_CLIENT_AUXILIARYXHAIR) + #if defined(SVQC) #include "sv_vehicles.qc" #elif defined(CSQC) diff --git a/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc b/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc index a5bb23e63..8ff604579 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc @@ -7,6 +7,8 @@ #ifdef IMPLEMENTATION +REGISTER_NET_LINKED(ENT_CLIENT_BUMBLE_RAYGUN) + #ifdef SVQC float autocvar_g_vehicle_bumblebee_cannon_cost; diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index e2f56c949..b795cb7e9 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -83,6 +83,9 @@ void Net_ReadShockwaveParticle(); #endif #endif #ifdef IMPLEMENTATION + +REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE) + #ifdef SVQC spawnfunc(weapon_shockwave) { diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index b5e81c8e6..bae7cca3d 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -61,6 +61,8 @@ VORTEX_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP) #endif #ifdef IMPLEMENTATION +REGISTER_NET_TEMP(TE_CSQC_VORTEXBEAMPARTICLE) + #if defined(SVQC) void SendCSQCVortexBeamParticle(float charge) { vector v; diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 5d2509102..f295777db 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -26,6 +26,8 @@ #include "../lib/warpzone/util_server.qh" #endif +REGISTER_NET_LINKED(ENT_CLIENT_ITEM) + #ifdef CSQC void ItemDraw(entity self) { -- 2.39.2