From: TimePath Date: Wed, 7 Oct 2015 00:20:20 +0000 (+1100) Subject: Net: purge SELFPARAM from sendfuncs X-Git-Tag: xonotic-v0.8.2~1860 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e4b6fcb1aec544934a31bd49bba5eeecaffbf86;p=xonotic%2Fxonotic-data.pk3dir.git Net: purge SELFPARAM from sendfuncs --- diff --git a/qcsrc/common/effects/effects.qc b/qcsrc/common/effects/effects.qc index 5ea8a95b1..dd015e0f6 100644 --- a/qcsrc/common/effects/effects.qc +++ b/qcsrc/common/effects/effects.qc @@ -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) diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index ba137a8f9..a6d266ae5 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -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; diff --git a/qcsrc/common/minigames/sv_minigames.qc b/qcsrc/common/minigames/sv_minigames.qc index 73ad876cf..7a428d8d0 100644 --- a/qcsrc/common/minigames/sv_minigames.qc +++ b/qcsrc/common/minigames/sv_minigames.qc @@ -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); diff --git a/qcsrc/common/minigames/sv_minigames.qh b/qcsrc/common/minigames/sv_minigames.qh index 43b392f74..f00605316 100644 --- a/qcsrc/common/minigames/sv_minigames.qh +++ b/qcsrc/common/minigames/sv_minigames.qh @@ -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; diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index d06fb6172..bd4be8d75 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -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(); diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh index d6ea51867..e4ed397c2 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh @@ -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(); diff --git a/qcsrc/common/nades/all.qc b/qcsrc/common/nades/all.qc index 33c1a7e18..3a4f632a3 100644 --- a/qcsrc/common/nades/all.qc +++ b/qcsrc/common/nades/all.qc @@ -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); diff --git a/qcsrc/common/nades/all.qh b/qcsrc/common/nades/all.qh index f5a274d98..84b390043 100644 --- a/qcsrc/common/nades/all.qh +++ b/qcsrc/common/nades/all.qh @@ -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) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index f21956981..13097a425 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -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); diff --git a/qcsrc/common/triggers/func/conveyor.qc b/qcsrc/common/triggers/func/conveyor.qc index 32c12299e..587dec8d0 100644 --- a/qcsrc/common/triggers/func/conveyor.qc +++ b/qcsrc/common/triggers/func/conveyor.qc @@ -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); diff --git a/qcsrc/common/triggers/func/ladder.qc b/qcsrc/common/triggers/func/ladder.qc index 3785299e2..c27dd2ce0 100644 --- a/qcsrc/common/triggers/func/ladder.qc +++ b/qcsrc/common/triggers/func/ladder.qc @@ -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); diff --git a/qcsrc/common/triggers/func/pointparticles.qc b/qcsrc/common/triggers/func/pointparticles.qc index 04ab77f7f..c9e8ba96c 100644 --- a/qcsrc/common/triggers/func/pointparticles.qc +++ b/qcsrc/common/triggers/func/pointparticles.qc @@ -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 diff --git a/qcsrc/common/triggers/func/rainsnow.qc b/qcsrc/common/triggers/func/rainsnow.qc index 25085ae4a..05f555a24 100644 --- a/qcsrc/common/triggers/func/rainsnow.qc +++ b/qcsrc/common/triggers/func/rainsnow.qc @@ -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) ? diff --git a/qcsrc/common/triggers/misc/laser.qc b/qcsrc/common/triggers/misc/laser.qc index 5f7707d5b..f0babbc55 100644 --- a/qcsrc/common/triggers/misc/laser.qc +++ b/qcsrc/common/triggers/misc/laser.qc @@ -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) diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index 2748ed6f6..41edbb718 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -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) diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 0695811e0..a54824028 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -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); diff --git a/qcsrc/common/triggers/trigger/viewloc.qc b/qcsrc/common/triggers/trigger/viewloc.qc index 73d722cf0..65deb3963 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qc +++ b/qcsrc/common/triggers/trigger/viewloc.qc @@ -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); diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index a53a81e90..e1c23c7ab 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -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); diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 1bbe10305..c2e41dd94 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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); diff --git a/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc b/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc index 75b81c777..c01f1f7ca 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc @@ -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); diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index e1796bdf2..d9ad712ea 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -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 diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index d1c86de30..66ea8f7b5 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -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; diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index ff18f0eaf..de6525fe9 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -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; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index eedecf87b..0d0d356a9 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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])); diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 3e9f12962..c92ffd3e8 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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; diff --git a/qcsrc/server/controlpoint.qc b/qcsrc/server/controlpoint.qc index fac8bca4d..7f17228fa 100644 --- a/qcsrc/server/controlpoint.qc +++ b/qcsrc/server/controlpoint.qc @@ -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) diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 8d52d6f38..4a7edc2b9 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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 \ diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index a3be17bf2..904f4c9cc 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -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) diff --git a/qcsrc/server/ent_cs.qh b/qcsrc/server/ent_cs.qh index 05821f9ba..1e875b58e 100644 --- a/qcsrc/server/ent_cs.qh +++ b/qcsrc/server/ent_cs.qh @@ -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(); diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 840ffe5c5..5cae69239 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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)); diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 8d7db7f5d..e7430690e 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -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); diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 87d7e0e52..ec6699428 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -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)) diff --git a/qcsrc/server/g_models.qc b/qcsrc/server/g_models.qc index 3a94d6f1a..781ecc612 100644 --- a/qcsrc/server/g_models.qc +++ b/qcsrc/server/g_models.qc @@ -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; diff --git a/qcsrc/server/g_violence.qc b/qcsrc/server/g_violence.qc index a9111a03b..2a885f901 100644 --- a/qcsrc/server/g_violence.qc +++ b/qcsrc/server/g_violence.qc @@ -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 diff --git a/qcsrc/server/g_violence.qh b/qcsrc/server/g_violence.qh index 98d2b811f..6a33ac441 100644 --- a/qcsrc/server/g_violence.qh +++ b/qcsrc/server/g_violence.qh @@ -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); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 654c8a77a..d6ffeeb5d 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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; diff --git a/qcsrc/server/generator.qc b/qcsrc/server/generator.qc index ec38521c6..2a1c0b2f8 100644 --- a/qcsrc/server/generator.qc +++ b/qcsrc/server/generator.qc @@ -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) diff --git a/qcsrc/server/generator.qh b/qcsrc/server/generator.qh index cbdb36e05..003c2b1d6 100644 --- a/qcsrc/server/generator.qh +++ b/qcsrc/server/generator.qh @@ -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 diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 8e7deae8f..a8e027df1 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -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; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 8a5a5df5d..57bbd51d0 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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); diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 8b94ffe93..007de3cac 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -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 diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index 35a8e7bdc..ebfc22bb5 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -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) diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index ad00c5437..14893b12d 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -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); diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 3c2851b91..09d914a3c 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -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); diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index c6ed28a4c..ef2ab6687 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -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); diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 337c55ef8..603522d4a 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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 diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh index 1dfe53749..991e2d665 100644 --- a/qcsrc/server/t_items.qh +++ b/qcsrc/server/t_items.qh @@ -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 diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index d78d93c87..09f155ecb 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -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); diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index 36d037167..79108be7e 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -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)