From: TimePath Date: Sun, 19 Apr 2015 10:53:16 +0000 (+1000) Subject: Declare `.SendEntity` as `bool(entity, int)` X-Git-Tag: xonotic-v0.8.1~69^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5d60a0a60d9b102d640cc6dd55c718bbb707e4fe;p=xonotic%2Fxonotic-data.pk3dir.git Declare `.SendEntity` as `bool(entity, int)` --- diff --git a/qcsrc/csqcmodellib/sv_model.qc b/qcsrc/csqcmodellib/sv_model.qc index 425c985ad..32c8b8707 100644 --- a/qcsrc/csqcmodellib/sv_model.qc +++ b/qcsrc/csqcmodellib/sv_model.qc @@ -36,7 +36,7 @@ // generic CSQC model code -float CSQCModel_Send(entity to, int sf) +bool CSQCModel_Send(entity to, int sf) { // some nice flags for CSQCMODEL_IF float isplayer = (IS_CLIENT(self)); diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index aa2648c08..860913f26 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -347,7 +347,7 @@ float next_pingtime; .float Version; .int SendFlags; -.float(entity to, float sendflags) SendEntity; +.bool(entity to, int sendflags) SendEntity; // player sounds, voice messages // TODO implemented fall and falling diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c6e1a24e9..7660b7e03 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1275,7 +1275,7 @@ void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer) } -void Net_LinkEntity(entity e, float docull, float dt, float(entity, float) sendfunc) +void Net_LinkEntity(entity e, float docull, float dt, bool(entity, int) sendfunc) { vector mi, ma; diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 27b0e6cda..72e3b0961 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -229,7 +229,7 @@ void ItemRead(float _IsNew) #endif #ifdef SVQC -float ItemSend(entity to, int sf) +bool ItemSend(entity to, int sf) { if(self.gravity) sf |= ISF_DROP; diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh index 000a4d2d8..ae4ecdb76 100644 --- a/qcsrc/server/t_items.qh +++ b/qcsrc/server/t_items.qh @@ -85,7 +85,7 @@ void ItemRead(float _IsNew); #endif #ifdef SVQC float autocvar_sv_simple_items; -float ItemSend(entity to, int sf); +bool ItemSend(entity to, int sf); float have_pickup_item(void); @@ -126,7 +126,7 @@ void Item_FindTeam(); // Savage: used for item garbage-collection // TODO: perhaps nice special effect? -float ItemSend(entity to, int sf); +bool ItemSend(entity to, int sf); void ItemUpdate(entity item); // pickup evaluation functions diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index 773b7f085..133e92d3f 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -13,7 +13,7 @@ .float csqcprojectile_type; -float CSQCProjectile_SendEntity(entity to, int sf) +bool CSQCProjectile_SendEntity(entity to, int sf) { float ft, fr; @@ -68,7 +68,7 @@ float CSQCProjectile_SendEntity(entity to, int sf) if(sf & 2) WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf? - return 1; + return true; } .vector csqcprojectile_oldorigin; diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index cc509d755..a9380070b 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -51,7 +51,7 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector WarpZone_PostTeleportPlayer_Callback(player); } -float WarpZone_Teleported_Send(entity to, int sf) +bool WarpZone_Teleported_Send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED); WriteCoord(MSG_ENTITY, self.angles.x); @@ -216,7 +216,7 @@ void WarpZone_Touch (void) } } -float WarpZone_Send(entity to, float sendflags) +bool WarpZone_Send(entity to, int sendflags) { WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE); @@ -270,7 +270,7 @@ float WarpZone_Send(entity to, float sendflags) return true; } -float WarpZone_Camera_Send(entity to, float sendflags) +bool WarpZone_Camera_Send(entity to, int sendflags) { int f = 0; WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);