]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Net: purge SELFPARAM from sendfuncs
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 7 Oct 2015 00:20:20 +0000 (11:20 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 7 Oct 2015 00:46:28 +0000 (11:46 +1100)
49 files changed:
qcsrc/common/effects/effects.qc
qcsrc/common/items/inventory.qh
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/minigames/sv_minigames.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh
qcsrc/common/nades/all.qc
qcsrc/common/nades/all.qh
qcsrc/common/notifications.qc
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/ladder.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/func/rainsnow.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/lib/net.qh
qcsrc/server/cl_client.qc
qcsrc/server/command/vote.qc
qcsrc/server/controlpoint.qc
qcsrc/server/defs.qh
qcsrc/server/ent_cs.qc
qcsrc/server/ent_cs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_hook.qc
qcsrc/server/g_models.qc
qcsrc/server/g_violence.qc
qcsrc/server/g_violence.qh
qcsrc/server/g_world.qc
qcsrc/server/generator.qc
qcsrc/server/generator.qh
qcsrc/server/mapvoting.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/scores.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/spawnpoints.qh
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/csqcprojectile.qc

index 5ea8a95b1c2813643139d8ff20f14c3232289380..dd015e0f6b3a4a0080e5564bf8d2f7e2370669e8 100644 (file)
@@ -34,8 +34,8 @@ void Read_Effect(bool is_new)
 #endif
 
 #ifdef SVQC
-bool Net_Write_Effect(entity client, int sf)
-{SELFPARAM();
+bool Net_Write_Effect(entity this, entity client, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_EFFECT);
        (EFFECT_COUNT >= 255)
        ? WriteShort(MSG_ENTITY, self.m_id)
index ba137a8f94ab3d7f98a7d4fcde1ab922abfb444f..a6d266ae5fba57d3d50727b25cb41d1fe1c396e2 100644 (file)
@@ -40,8 +40,8 @@ void Inventory_Write(Inventory data)
 #endif
 
 #ifdef SVQC
-bool Inventory_Send(entity to, int sf)
-{SELFPARAM();
+bool Inventory_Send(entity this, entity to, int sf)
+{
     WriteByte(MSG_ENTITY, ENT_CLIENT_INVENTORY);
     entity e = self.owner;
     if (IS_SPEC(e)) e = e.enemy;
index 73ad876cfe2da65435350ddb5718f46bcb99d7cc..7a428d8d087e36f69b0347683a971af836644cfd 100644 (file)
@@ -60,8 +60,8 @@ void minigame_rmplayer(entity minigame_session, entity player)
 
 // Send an entity to a client
 // only use on minigame entities or entities with a minigame owner
-bool minigame_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool minigame_SendEntity(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_MINIGAME);
        WriteByte(MSG_ENTITY, sf);
 
index 43b392f743a843caf5ecf26be5996be40a431536..f00605316b6410f6b837c8e649d9d031e49a4f57 100644 (file)
@@ -44,7 +44,7 @@ entity minigame_find_player(entity client);
 
 entity minigame_sessions;
 
-bool minigame_SendEntity(entity to, int sf);
+bool minigame_SendEntity(entity this, entity to, int sf);
 
 void RegisterMinigames();
 const int MINIGAMES_MAX = 24;
index d06fb617208c3aeeec384a949b3dbd5fc918e02b..bd4be8d7540aab05379cf84405d0cf614eed1e2d 100644 (file)
@@ -4,8 +4,8 @@ REGISTER_MUTATOR(waypointsprites, true);
 
 #ifdef SVQC
 /** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
-float WaypointSprite_SendEntity(entity to, float sendflags)
-{SELFPARAM();
+bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
+{
     WriteMutator(MSG_ENTITY, waypointsprites);
 
     sendflags = sendflags & 0x7F;
@@ -984,7 +984,7 @@ float WaypointSprite_Customize()
     return self.waypointsprite_visible_for_player(e);
 }
 
-float WaypointSprite_SendEntity(entity to, float sendflags);
+bool WaypointSprite_SendEntity(entity this, entity to, float sendflags);
 
 void WaypointSprite_Reset()
 {SELFPARAM();
index d6ea51867e4a97a3f0a26a9d837d5f28bb5c1c0f..e4ed397c278de25b29f6fd739764a281e66ce0ec 100644 (file)
@@ -171,7 +171,7 @@ float WaypointSprite_isteammate(entity e, entity e2);
 
 float WaypointSprite_Customize();
 
-float WaypointSprite_SendEntity(entity to, float sendflags);
+bool WaypointSprite_SendEntity(entity this, entity to, float sendflags);
 
 void WaypointSprite_Reset();
 
index 33c1a7e181fb5b57b90ad625bc4a58b39fbc5db0..3a4f632a3f54ec894625e41ee0438dd1d5463bb8 100644 (file)
@@ -71,9 +71,8 @@ REGISTER_NET_LINKED(Nade_Heal, bool isNew)
 #endif
 
 #ifdef SVQC
-bool healer_send(entity to, int sf)
+bool healer_send(entity this, entity to, int sf)
 {
-       SELFPARAM();
        int channel = MSG_ENTITY;
        WriteHeader(channel, Nade_Heal);
        WriteByte(channel, sf);
index f5a274d98095424716f8ffe0cbc05ee5bc2c52b7..84b3900432dbf23b5a7812e02432d14fdc5206ad 100644 (file)
@@ -40,7 +40,7 @@ ENDCLASS(Nade)
 REGISTER_NADE(Null);
 
 #ifdef SVQC
-float healer_send(entity to, int sf);
+bool healer_send(entity this, entity to, int sf);
 #endif
 
 entity Nade_FromProjectile(float proj)
index f2195698190f19aa8e7e2aaa64f93c131905929d..13097a425f01b65388324e75f4d73a796a6f3d0f 100644 (file)
@@ -1773,8 +1773,8 @@ void Net_Notification_Remove()
        remove(self);
 }
 
-float Net_Write_Notification(entity client, int sf)
-{SELFPARAM();
+bool Net_Write_Notification(entity this, entity client, int sf)
+{
        if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client))
        {
                WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
index 32c12299e08e7b58726be45d072f2760f4904a65..587dec8d015dff6d6d7d0cbb730a719569cfb9d1 100644 (file)
@@ -70,8 +70,8 @@ void conveyor_reset()
        self.SendFlags |= 2;
 }
 
-bool conveyor_send(entity to, int sf)
-{SELFPARAM();
+bool conveyor_send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_CONVEYOR);
        WriteByte(MSG_ENTITY, sf);
 
index 3785299e24444b361cf01bf23377e3a44fa5d94d..c27dd2ce08604e576c642d855d03fbbc2af67a67 100644 (file)
@@ -18,8 +18,8 @@ void func_ladder_touch()
 }
 
 #ifdef SVQC
-float func_ladder_send(entity to, float sf)
-{SELFPARAM();
+bool func_ladder_send(entity this, entity to, float sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_LADDER);
 
        WriteString(MSG_ENTITY, self.classname);
index 04ab77f7fd70a4d3fd93f64b2cf26174416a7806..c9e8ba96cb758fa7e62a8d7e9dfcf30d3bfc9b65 100644 (file)
@@ -5,8 +5,8 @@
 #ifdef SVQC
 // NOTE: also contains func_sparks
 
-float pointparticles_SendEntity(entity to, float fl)
-{SELFPARAM();
+bool pointparticles_SendEntity(entity this, entity to, float fl)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_POINTPARTICLES);
 
        // optional features to save space
index 25085ae4aa880e934304b9f96c8db1ee0533e041..05f555a24f7da99b1637b65cd96314ab49bcaec3 100644 (file)
@@ -1,6 +1,6 @@
 #ifdef SVQC
-float rainsnow_SendEntity(entity to, float sf)
-{SELFPARAM();
+bool rainsnow_SendEntity(entity this, entity to, float sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_RAINSNOW);
        WriteByte(MSG_ENTITY, self.state);
        WriteCoord(MSG_ENTITY, self.origin_x + self.mins_x);
@@ -12,7 +12,7 @@ float rainsnow_SendEntity(entity to, float sf)
        WriteShort(MSG_ENTITY, compressShortVector(self.dest));
        WriteShort(MSG_ENTITY, self.count);
        WriteByte(MSG_ENTITY, self.cnt);
-       return 1;
+       return true;
 }
 
 /*QUAKED spawnfunc_func_rain (0 .5 .8) ?
index 5f7707d5b2bf02364fb52e94807cedb8acc2e19d..f0babbc557a9f47cf0a0772fe0ce8ebb40cb212f 100644 (file)
@@ -123,8 +123,8 @@ void misc_laser_think()
        }
 }
 
-float laser_SendEntity(entity to, float fl)
-{SELFPARAM();
+bool laser_SendEntity(entity this, entity to, float fl)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_LASER);
        fl = fl - (fl & 0xF0); // use that bit to indicate finite length laser
        if(self.spawnflags & 2)
index 2748ed6f63af351807fa7ce56d3911d7e7c2145f..41edbb718740193adce9252fbdc55666c64c6d6d 100644 (file)
@@ -76,8 +76,8 @@ void TargetMusic_RestoreGame()
 // spawnflags:
 //   1 = START_OFF
 // when triggered, it is disabled/enabled for everyone
-float trigger_music_SendEntity(entity to, float sf)
-{SELFPARAM();
+bool trigger_music_SendEntity(entity this, entity to, float sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_TRIGGER_MUSIC);
        sf &= ~0x80;
        if(self.cnt)
index 0695811e0f4143cb95567923700fd3719825b771..a5482402891c433fec98f9ebc0f1b2b797af8559 100644 (file)
@@ -387,8 +387,8 @@ spawnfunc(trigger_push)
 }
 
 
-float target_push_send(entity to, float sf)
-{SELFPARAM();
+bool target_push_send(entity this, entity to, float sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_TARGET_PUSH);
 
        WriteByte(MSG_ENTITY, self.cnt);
index 73d722cf0079a6490b52f8eb4d95da9c395b6ecf..65deb3963d804c6ce7b9e71e2cc7a4cdc659958b 100644 (file)
@@ -38,8 +38,8 @@ void viewloc_think()
        self.nextthink = time;
 }
 
-bool trigger_viewloc_send(entity to, int sf)
-{SELFPARAM();
+bool trigger_viewloc_send(entity this, entity to, int sf)
+{
        // CSQC doesn't need to know our origin (yet), as we're only available for referencing
        WriteByte(MSG_ENTITY, ENT_CLIENT_VIEWLOC_TRIGGER);
 
@@ -89,8 +89,8 @@ spawnfunc(trigger_viewlocation)
        InitializeEntity(self, viewloc_init, INITPRIO_FINDTARGET);
 }
 
-bool viewloc_send(entity to, int sf)
-{SELFPARAM();
+bool viewloc_send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_VIEWLOC);
 
        WriteByte(MSG_ENTITY, self.cnt);
index a53a81e90aeca2f7f091ccc00eda1b0dfa0a7c12..e1c23c7ab0e476022d01e7bf501a6cb362d612b8 100644 (file)
@@ -299,8 +299,8 @@ void turrets_setframe(float _frame, float client_only)
 
 }
 
-float turret_send(entity to, float sf)
-{SELFPARAM();
+bool turret_send(entity this, entity to, float sf)
+{
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_TURRET);
        WriteByte(MSG_ENTITY, sf);
index 1bbe1030518e376f778f3dd2f164a1896e3ffdb0..c2e41dd9417a8857444f91b68cf24926dfc02b77 100644 (file)
@@ -38,8 +38,8 @@ bool vehicle_send(entity to, int sf)
 }
 #endif
 
-bool SendAuxiliaryXhair(entity to, int sf)
-{SELFPARAM();
+bool SendAuxiliaryXhair(entity this, entity to, int sf)
+{
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR);
 
index 75b81c777872ac9948266ae41b6d894edf50ff0f..c01f1f7ca1df5e731879edbf844ad49b36f305c8 100644 (file)
@@ -17,7 +17,7 @@ float autocvar_g_vehicle_bumblebee_cannon_speed;
 float autocvar_g_vehicle_bumblebee_cannon_spread;
 float autocvar_g_vehicle_bumblebee_cannon_force;
 
-float bumble_raygun_send(entity to, int sf);
+bool bumble_raygun_send(entity this, entity to, int sf);
 
 void bumblebee_fire_cannon(entity _gun, string _tagname, entity _owner)
 {
@@ -28,8 +28,8 @@ void bumblebee_fire_cannon(entity _gun, string _tagname, entity _owner)
                         DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, true, true, _owner);
 }
 
-float bumble_raygun_send(entity to, float sf)
-{SELFPARAM();
+bool bumble_raygun_send(entity this, entity to, float sf)
+{
     WriteByte(MSG_ENTITY, ENT_CLIENT_BUMBLE_RAYGUN);
 
     WriteByte(MSG_ENTITY, sf);
index e1796bdf235a4d6bee4873a3e53d9e95c1357048..d9ad712ea1a8cbedfa90abc4ab1e2ef260d1b26e 100644 (file)
@@ -130,8 +130,8 @@ vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as
 #ifdef SVQC
 spawnfunc(weapon_arc) { weapon_defaultspawnfunc(WEP_ARC.m_id); }
 
-float W_Arc_Beam_Send(entity to, int sf)
-{SELFPARAM();
+bool W_Arc_Beam_Send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_ARC_BEAM);
 
        // Truncate information when this beam is displayed to the owner client
index d1c86de307e208ffd216f4d74d0c39a2880919cb..66ea8f7b5165151bdb4040bb01883068dd452bf1 100644 (file)
@@ -253,8 +253,8 @@ int W_Tuba_GetNote(entity pl, int hittype)
        return note;
 }
 
-bool W_Tuba_NoteSendEntity(entity to, int sf)
-{SELFPARAM();
+bool W_Tuba_NoteSendEntity(entity this, entity to, int sf)
+{
        int f;
 
        msg_entity = to;
index ff18f0eaf34594393a1016eda44b3918ff443a5d..de6525fe9e01c0de20225c2604fcf9aa131d5182 100644 (file)
@@ -2,10 +2,14 @@
 #define NET_H
 
 #ifdef SVQC
+.int Version; // deprecated, use SendFlags
 .int SendFlags;
 .bool(entity to, int sendflags) SendEntity;
+.bool(entity this, entity to, int sendflags) SendEntity3;
 
-void Net_LinkEntity(entity e, bool docull, float dt, bool(entity to, int sendflags) sendfunc)
+bool SendEntity_self(entity to, int sendflags) { return self.SendEntity3(self, to, sendflags); }
+
+void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
 {
     if (!e.classname) e.classname = "net_linked";
 
@@ -16,7 +20,8 @@ void Net_LinkEntity(entity e, bool docull, float dt, bool(entity to, int sendfla
         setsize(e, mi, ma);
     }
 
-    e.SendEntity = sendfunc;
+    e.SendEntity = SendEntity_self;
+    e.SendEntity3 = sendfunc;
     e.SendFlags = 0xFFFFFF;
 
     if (!docull) e.effects |= EF_NODEPTHTEST;
index eedecf87b96ced564b4a0daf7d87d5d1e355617e..0d0d356a9da379ad579963386d814a4608c7bae3 100644 (file)
@@ -53,8 +53,8 @@ void send_CSQC_teamnagger() {
        WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER);
 }
 
-float ClientData_Send(entity to, int sf)
-{SELFPARAM();
+bool ClientData_Send(entity this, entity to, int sf)
+{
        if(to != self.owner)
        {
                error("wtf");
@@ -667,8 +667,8 @@ void PutClientInServer()
 .float ebouncefactor, ebouncestop; // electro's values
 // TODO do we need all these fields, or should we stop autodetecting runtime
 // changes and just have a console command to update this?
-float ClientInit_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool ClientInit_SendEntity(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
        WriteByte(MSG_ENTITY, g_nexball_meter_period * 32);
        WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[0]));
index 3e9f129622c61ac64dcccc4d2f96a1cdc16547dd..c92ffd3e82a31dd065d8bd288a97b4cb0f71febe 100644 (file)
@@ -24,7 +24,7 @@
 // =============================================
 
 //  Nagger for players to know status of voting
-float Nagger_SendEntity(entity to, float sendflags)
+bool Nagger_SendEntity(entity this, entity to, float sendflags)
 {
        int nags, i, f, b;
        entity e;
index fac8bca4dd4d5f84bf92fcec714e960ffd540a25..7f17228fa23b0513b203f77a078bcc9dedd7205a 100644 (file)
@@ -1,7 +1,7 @@
 #include "controlpoint.qh"
 
-bool cpicon_send(entity to, int sf)
-{SELFPARAM();
+bool cpicon_send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_CONTROLPOINT_ICON);
        WriteByte(MSG_ENTITY, sf);
        if(sf & CPSF_SETUP)
index 8d52d6f38ee03b7f47dff95e1e3b63baa2ec8fdf..4a7edc2b94a782fb900fa7554760c522b171d8ed 100644 (file)
@@ -302,8 +302,6 @@ float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end)
 
 float next_pingtime;
 
-.float Version;
-
 // player sounds, voice messages
 // TODO implemented fall and falling
 #define ALLPLAYERSOUNDS \
index a3be17bf2bb5c99d5652a099c342c5bf07b3cb4e..904f4c9cc28a59e6eac04730cc143ca466e26a2f 100644 (file)
@@ -42,8 +42,8 @@ float entcs_customize()
        return true;
 }
 
-float entcs_send(entity to, int sf)
-{SELFPARAM();
+bool entcs_send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_ENTCS);
        WriteByte(MSG_ENTITY, sf);
        if(sf & 1)
index 05821f9ba3081b9ff19694940ae5662f581fd000..1e875b58e54480adbbb8fc4558d9611132bb0ebf 100644 (file)
@@ -22,7 +22,7 @@ void entcs_init();
 
 float entcs_customize();
 
-float entcs_send(entity to, int sf);
+bool entcs_send(entity this, entity to, int sf);
 
 void entcs_think();
 
index 840ffe5c5d4a98315ebaf608ffe4cd03a817e928..5cae69239ddfb084153e706e5867a8f91d460565 100644 (file)
@@ -22,8 +22,8 @@
 #include "../csqcmodellib/sv_model.qh"
 #include "../warpzonelib/common.qh"
 
-float Damage_DamageInfo_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
        WriteShort(MSG_ENTITY, self.projectiledeathtype);
        WriteCoord(MSG_ENTITY, floor(self.origin.x));
index 8d7db7f5dcf05a46e3804b0acf2d5aa16de0731d..e7430690e4be3f157c9cfeca32b77a07cec285eb 100644 (file)
@@ -35,7 +35,7 @@
 .float dmg_force;
 .float dmg_radius;
 
-float Damage_DamageInfo_SendEntity(entity to, int sf);
+bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf);
 
 void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
 
index 87d7e0e529c986f340043a59ee732890de1b7ce0..ec66994280b9874c70af8ddd3cbcfc5e89e76671 100644 (file)
@@ -102,8 +102,8 @@ void GrapplingHook_Stop()
 }
 
 .vector hook_start, hook_end;
-float GrapplingHookSend(entity to, int sf)
-{SELFPARAM();
+bool GrapplingHookSend(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_HOOK);
        sf = sf & 0x7F;
        if(sound_allowed(MSG_BROADCAST, self.realowner))
index 3a94d6f1abeb1dff1ee6a6bea05ded66c77d0e1e..781ecc612e7d3f2f968e524c954d6a766022b716 100644 (file)
@@ -72,8 +72,8 @@ void g_clientmodel_dropbyspawnflags()
                self.SendFlags |= 2;
 }
 
-float g_clientmodel_genericsendentity (entity to, int sf)
-{SELFPARAM();
+bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
+{
        sf = sf & 0x0F;
        if(self.angles != '0 0 0')
                sf |= 0x10;
index a9111a03bc7f3ef231b3e4445df5d32f4a9e0abc..2a885f901ab2f0b7100326430fa6963ea31c6855 100644 (file)
@@ -1,8 +1,8 @@
 #include "g_violence.qh"
 #include "_all.qh"
 
-float Violence_GibSplash_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool Violence_GibSplash_SendEntity(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_GIBSPLASH);
        WriteByte(MSG_ENTITY, self.state); // actually type
        WriteByte(MSG_ENTITY, bound(1, self.cnt * 16, 255)); // gibbage amount multiplier
index 98d2b811fcd2858cec93686b65fd3e35da9fd7ea..6a33ac4418407602a97e8c5932e4f87d3c174e09 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef G_VIOLENCE_H
 #define G_VIOLENCE_H
 
-float Violence_GibSplash_SendEntity(entity to, int sf);
+bool Violence_GibSplash_SendEntity(entity this, entity to, int sf);
 
 // TODO maybe convert this to a TE?
 void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker);
index 654c8a77ab07d62770a419eb776683b358d7e824..d6ffeeb5d12dcee38fbcc12591879e4de84db5c3 100644 (file)
@@ -512,8 +512,8 @@ void detect_maptype()
 }
 
 entity randomseed;
-float RandomSeed_Send(entity to, int sf)
-{SELFPARAM();
+bool RandomSeed_Send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
        WriteShort(MSG_ENTITY, self.cnt);
        return true;
index ec38521c6650670e43ddf00217db62a76131b756..2a1c0b2f861ab34b1035e0087880e97d67c5849c 100644 (file)
@@ -1,7 +1,7 @@
 #include "generator.qh"
 
-bool generator_send(entity to, int sf)
-{SELFPARAM();
+bool generator_send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_GENERATOR);
        WriteByte(MSG_ENTITY, sf);
        if(sf & GSF_SETUP)
index cbdb36e05f4e0f5669ac2d1bb6a57f66c7f01686..003c2b1d6855f1f93fed3d1ae078dbf2e8c841b9 100644 (file)
@@ -6,5 +6,5 @@ const vector GENERATOR_MAX = '52 52 75';
 const int GSF_STATUS = 4;
 const int GSF_SETUP = 8;
 
-bool generator_send(entity to, int sf);
+bool generator_send(entity this, entity to, int sf);
 #endif
index 8e7deae8fe94c09023baa3181c93ac96ff540c15..a8e027df1e1769187e919842d46bac97e1c2005a 100644 (file)
@@ -343,7 +343,7 @@ void GameTypeVote_SendOption(int i)
        }
 }
 
-float MapVote_SendEntity(entity to, int sf)
+bool MapVote_SendEntity(entity this, entity to, int sf)
 {
        float i;
 
index 8a5a5df5dc61081eb534e05e5ce04fd7bf67f84b..57bbd51d0e1f1c17cf8966c10e3a3c1276b8c2f6 100644 (file)
@@ -1156,7 +1156,7 @@ void InitializeEntitiesRun()
 }
 
 .float(entity) isEliminated;
-float EliminatedPlayers_SendEntity(entity to, float sendflags)
+bool EliminatedPlayers_SendEntity(entity this, entity to, float sendflags)
 {
        float i, f, b;
        entity e;
@@ -1690,8 +1690,8 @@ vector gettaginfo_relative(entity e, float tag)
 
 .float scale2;
 
-float modeleffect_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool modeleffect_SendEntity(entity this, entity to, int sf)
+{
        float f;
        WriteByte(MSG_ENTITY, ENT_CLIENT_MODELEFFECT);
 
index 8b94ffe9345e3b32e4c97de767ae31389c94cc57..007de3cac6c35e501b727e135e09896f83888263 100644 (file)
@@ -458,6 +458,5 @@ entity initialize_entity_first;
 float sound_allowed(float dest, entity e);
 void InitializeEntity(entity e, void(void) func, float order);
 void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer);
-void Net_LinkEntity(entity e, bool docull, float dt, bool(entity, int) sendfunc);
 
 #endif
index 35a8e7bdc76c92f9eb04356f197c02b73d762cbe..ebfc22bb5f9ceb82ebb58c297632ad867eadc7c6 100644 (file)
@@ -228,8 +228,8 @@ void onslaught_updatelinks()
 // Main Link Functions
 // ===================
 
-bool ons_Link_Send(entity to, int sendflags)
-{SELFPARAM();
+bool ons_Link_Send(entity this, entity to, int sendflags)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_RADARLINK);
        WriteByte(MSG_ENTITY, sendflags);
        if(sendflags & 1)
index ad00c5437d4765da3a3bc56e22e4cadd4f2558c5..14893b12d8a9d3140da373415fc4b35871fdf56d 100644 (file)
@@ -55,8 +55,8 @@ vector ScoreField_Compare(entity t1, entity t2, .float field, float fieldflags,
  * teamscore entities
  */
 
-float TeamScore_SendEntity(entity to, float sendflags)
-{SELFPARAM();
+bool TeamScore_SendEntity(entity this, entity to, float sendflags)
+{
        float i, p, longflags;
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_TEAMSCORES);
@@ -186,7 +186,7 @@ void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags)
        }
 }
 
-float ScoreInfo_SendEntity(entity to, int sf)
+bool ScoreInfo_SendEntity(entity this, entity to, int sf)
 {
        float i;
        WriteByte(MSG_ENTITY, ENT_CLIENT_SCORES_INFO);
@@ -230,8 +230,8 @@ void ScoreInfo_Init(float teams)
  * per-player score entities
  */
 
-float PlayerScore_SendEntity(entity to, float sendflags)
-{SELFPARAM();
+bool PlayerScore_SendEntity(entity this, entity to, float sendflags)
+{
        float i, p, longflags;
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_SCORES);
index 3c2851b91fe4d1da15a9abce1c9e473328d94610..09d914a3c86751b7f0d6bbc97e49c8277575e560 100644 (file)
@@ -9,8 +9,8 @@
 #include "../common/util.qh"
 #include "../warpzonelib/util_server.qh"
 
-float SpawnPoint_Send(entity to, int sf)
-{SELFPARAM();
+bool SpawnPoint_Send(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
 
        WriteByte(MSG_ENTITY, self.team);
@@ -21,8 +21,8 @@ float SpawnPoint_Send(entity to, int sf)
        return true;
 }
 
-float SpawnEvent_Send(entity to, int sf)
-{SELFPARAM();
+bool SpawnEvent_Send(entity this, entity to, int sf)
+{
        float send;
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNEVENT);
index c6ed28a4c71f86ca94045029f40127023234d22f..ef2ab6687800227d3caa022fa3b8b09761346081 100644 (file)
@@ -3,7 +3,7 @@
 
 .vector spawnpoint_score;
 float spawnpoint_nag;
-float SpawnEvent_Send(entity to, int sf);
+bool SpawnEvent_Send(entity this, entity to, int sf);
 entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck);
 entity SelectSpawnPoint (float anypoint);
 spawnfunc(info_player_deathmatch);
index 337c55ef8729450abf2b9fa7fd2d1a536db69637..603522d4ac8004076f84f17901db887eca31474b 100644 (file)
@@ -246,8 +246,8 @@ void ItemRead(float _IsNew)
 #endif
 
 #ifdef SVQC
-bool ItemSend(entity to, int sf)
-{SELFPARAM();
+bool ItemSend(entity this, entity to, int sf)
+{
        if(self.gravity)
                sf |= ISF_DROP;
        else
index 1dfe537494cba522feed45f332f8d909486a3c89..991e2d665a8693c1f24734bc2f9d611f3be13077 100644 (file)
@@ -94,7 +94,7 @@ spawnfunc(item_bullets);
 spawnfunc(item_rockets);
 
 float autocvar_sv_simple_items;
-bool ItemSend(entity to, int sf);
+bool ItemSend(entity this, entity to, int sf);
 
 
 float have_pickup_item(void);
@@ -135,7 +135,7 @@ void Item_FindTeam();
 // Savage: used for item garbage-collection
 // TODO: perhaps nice special effect?
 
-bool ItemSend(entity to, int sf);
+bool ItemSend(entity this, entity to, int sf);
 void ItemUpdate(entity item);
 
 // pickup evaluation functions
index d78d93c873e33760c29f84c6c46509a541f62ffe..09f155ecbd7ea68052a953e1f713c560f0d829b4 100644 (file)
@@ -17,8 +17,8 @@ float accuracy_byte(float n, float d)
        return 1 + rint(n * 100.0 / d);
 }
 
-float accuracy_send(entity to, int sf)
-{SELFPARAM();
+bool accuracy_send(entity this, entity to, int sf)
+{
        int w, f;
        entity a;
        WriteByte(MSG_ENTITY, ENT_CLIENT_ACCURACY);
index 36d037167bacb5d2fef195abf0b0b3ec4622eb90..79108be7eed4e6e38a14df5f51e578483a30c4e8 100644 (file)
@@ -10,8 +10,8 @@
 
 .float csqcprojectile_type;
 
-bool CSQCProjectile_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool CSQCProjectile_SendEntity(entity this, entity to, int sf)
+{
        float ft, fr;
 
        // note: flag 0x08 = no trail please (teleport bit)