From 1a65f7bb6bae1bb6d1a40d3e2eda30c822052313 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 23 Apr 2015 18:34:23 +1000 Subject: [PATCH] Even more floats to bool/int --- qcsrc/common/nades.qh | 2 +- qcsrc/common/notifications.qc | 2 +- qcsrc/common/weapons/w_arc.qc | 6 +++--- qcsrc/common/weapons/w_blaster.qc | 4 ++-- qcsrc/common/weapons/w_crylink.qc | 4 ++-- qcsrc/common/weapons/w_devastator.qc | 4 ++-- qcsrc/common/weapons/w_electro.qc | 4 ++-- qcsrc/common/weapons/w_fireball.qc | 4 ++-- qcsrc/common/weapons/w_hagar.qc | 4 ++-- qcsrc/common/weapons/w_hlac.qc | 4 ++-- qcsrc/common/weapons/w_hmg.qc | 4 ++-- qcsrc/common/weapons/w_hook.qc | 4 ++-- qcsrc/common/weapons/w_machinegun.qc | 4 ++-- qcsrc/common/weapons/w_minelayer.qc | 8 ++++---- qcsrc/common/weapons/w_mortar.qc | 4 ++-- qcsrc/common/weapons/w_porto.qc | 6 +++--- qcsrc/common/weapons/w_rifle.qc | 4 ++-- qcsrc/common/weapons/w_rpc.qc | 4 ++-- qcsrc/common/weapons/w_seeker.qc | 4 ++-- qcsrc/common/weapons/w_shockwave.qc | 4 ++-- qcsrc/common/weapons/w_tuba.qc | 14 +++++++------- qcsrc/common/weapons/w_vortex.qc | 4 ++-- qcsrc/csqcmodellib/cl_model.qc | 4 ++-- qcsrc/csqcmodellib/cl_model.qh | 8 ++++---- qcsrc/server/cl_client.qc | 2 +- qcsrc/server/g_casings.qc | 2 +- qcsrc/server/g_damage.qc | 2 +- qcsrc/server/g_damage.qh | 2 +- qcsrc/server/g_hook.qc | 2 +- qcsrc/server/g_models.qc | 2 +- qcsrc/server/g_triggers.qc | 2 +- qcsrc/server/g_triggers.qh | 2 +- qcsrc/server/g_violence.qc | 2 +- qcsrc/server/g_violence.qh | 2 +- qcsrc/server/g_world.qc | 2 +- qcsrc/server/mapvoting.qc | 2 +- qcsrc/server/miscfunctions.qc | 4 ++-- qcsrc/server/scores.qc | 2 +- qcsrc/server/spawnpoints.qc | 4 ++-- qcsrc/server/spawnpoints.qh | 2 +- qcsrc/server/t_items.qc | 2 +- qcsrc/server/t_items.qh | 4 ++-- qcsrc/server/target_music.qc | 2 +- qcsrc/server/tturrets/system/system_main.qc | 2 +- qcsrc/server/vehicles/bumblebee.qc | 2 +- qcsrc/server/vehicles/bumblebee.qh | 4 ++-- qcsrc/server/vehicles/vehicles.qc | 2 +- qcsrc/warpzonelib/server.qc | 2 +- 48 files changed, 85 insertions(+), 85 deletions(-) diff --git a/qcsrc/common/nades.qh b/qcsrc/common/nades.qh index d11e4eabf..505e2e2d5 100644 --- a/qcsrc/common/nades.qh +++ b/qcsrc/common/nades.qh @@ -104,7 +104,7 @@ string Nade_TrailEffect(float proj, float nade_team) } #ifdef SVQC -float healer_send(entity to, float sf); +float healer_send(entity to, int sf); #endif #ifdef CSQC diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 8af30a957..7470cb888 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -1768,7 +1768,7 @@ void Net_Notification_Remove() remove(self); } -float Net_Write_Notification(entity client, float sf) +float Net_Write_Notification(entity client, int sf) { if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client)) { diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index 3024c689e..79d4dc7c7 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -127,7 +127,7 @@ vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as #ifdef SVQC void spawnfunc_weapon_arc(void) { weapon_defaultspawnfunc(WEP_ARC); } -float W_Arc_Beam_Send(entity to, float sf) +float W_Arc_Beam_Send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_ARC_BEAM); @@ -636,7 +636,7 @@ void Arc_Smoke() } } -float W_Arc(float req) +bool W_Arc(int req) { switch(req) { @@ -1521,7 +1521,7 @@ void Ent_ReadArcBeam(float isnew) } } -float W_Arc(float req) +bool W_Arc(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_blaster.qc b/qcsrc/common/weapons/w_blaster.qc index 8eaff86e3..a776edbf4 100644 --- a/qcsrc/common/weapons/w_blaster.qc +++ b/qcsrc/common/weapons/w_blaster.qc @@ -147,7 +147,7 @@ void W_Blaster_Attack( self = oldself; } } -float W_Blaster(float request) +bool W_Blaster(int request) { switch(request) { @@ -266,7 +266,7 @@ float W_Blaster(float request) } #endif #ifdef CSQC -float W_Blaster(float request) +bool W_Blaster(int request) { switch(request) { diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index 21a86e7da..4d4430206 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -563,7 +563,7 @@ void W_Crylink_Attack2(void) } } -float W_Crylink(float req) +bool W_Crylink(int req) { float ammo_amount; switch(req) @@ -689,7 +689,7 @@ float W_Crylink(float req) } #endif #ifdef CSQC -float W_Crylink(float req) +bool W_Crylink(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index ea3c03757..618c2e535 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -391,7 +391,7 @@ void W_Devastator_Attack(void) other = missile; MUTATOR_CALLHOOK(EditProjectile); } -float W_Devastator(float req) +bool W_Devastator(int req) { entity rock; float rockfound; @@ -655,7 +655,7 @@ float W_Devastator(float req) } #endif #ifdef CSQC -float W_Devastator(float req) +bool W_Devastator(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index a94fcd89b..e3b809296 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -419,7 +419,7 @@ void W_Electro_CheckAttack(void) } .float bot_secondary_electromooth; -float W_Electro(float req) +bool W_Electro(int req) { float ammo_amount; switch(req) @@ -569,7 +569,7 @@ float W_Electro(float req) } #endif #ifdef CSQC -float W_Electro(float req) +bool W_Electro(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index 59c806dbd..7bb5ccb66 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -347,7 +347,7 @@ void W_Fireball_Attack2(void) other = proj; MUTATOR_CALLHOOK(EditProjectile); } -float W_Fireball(float req) +bool W_Fireball(int req) { switch(req) { @@ -447,7 +447,7 @@ float W_Fireball(float req) } #endif #ifdef CSQC -float W_Fireball(float req) +bool W_Fireball(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index 283e9d845..4c9f66498 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -393,7 +393,7 @@ void W_Hagar_Attack2_Load(void) } } -float W_Hagar(float req) +bool W_Hagar(int req) { float ammo_amount; switch(req) @@ -522,7 +522,7 @@ float W_Hagar(float req) } #endif #ifdef CSQC -float W_Hagar(float req) +bool W_Hagar(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index 38f04841a..7f7d7a27b 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -203,7 +203,7 @@ void W_HLAC_Attack2_Frame(void) } } -float W_HLAC(float req) +bool W_HLAC(int req) { float ammo_amount; switch(req) @@ -282,7 +282,7 @@ float W_HLAC(float req) } #endif #ifdef CSQC -float W_HLAC(float req) +bool W_HLAC(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_hmg.qc b/qcsrc/common/weapons/w_hmg.qc index 8190411cd..de9c983b2 100644 --- a/qcsrc/common/weapons/w_hmg.qc +++ b/qcsrc/common/weapons/w_hmg.qc @@ -85,7 +85,7 @@ void W_HeavyMachineGun_Attack_Auto() weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(hmg, refire), W_HeavyMachineGun_Attack_Auto); } -float W_HeavyMachineGun(float req) +bool W_HeavyMachineGun(int req) { float ammo_amount; switch(req) @@ -169,7 +169,7 @@ float W_HeavyMachineGun(float req) } #endif #ifdef CSQC -float W_HeavyMachineGun(float req) +bool W_HeavyMachineGun(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_hook.qc b/qcsrc/common/weapons/w_hook.qc index bf49a66b2..1c05c23d6 100644 --- a/qcsrc/common/weapons/w_hook.qc +++ b/qcsrc/common/weapons/w_hook.qc @@ -173,7 +173,7 @@ void W_Hook_Attack2(void) other = gren; MUTATOR_CALLHOOK(EditProjectile); } -float W_Hook(float req) +bool W_Hook(int req) { float hooked_time_max, hooked_fuel; @@ -336,7 +336,7 @@ float W_Hook(float req) } #endif #ifdef CSQC -float W_Hook(float req) +bool W_Hook(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 907bc7594..24a0db83f 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -235,7 +235,7 @@ void W_MachineGun_Attack_Burst(void) } -float W_MachineGun(float req) +bool W_MachineGun(int req) { float ammo_amount; switch(req) @@ -369,7 +369,7 @@ float W_MachineGun(float req) } #endif #ifdef CSQC -float W_MachineGun(float req) +bool W_MachineGun(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index e8425ae0e..d4ef95547 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -194,9 +194,9 @@ void W_MineLayer_ProximityExplode(void) W_MineLayer_Explode(); } -float W_MineLayer_Count(entity e) +int W_MineLayer_Count(entity e) { - float minecount = 0; + int minecount = 0; entity mine; for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == e) minecount += 1; @@ -400,7 +400,7 @@ float W_MineLayer_PlacedMines(float detonate) return minfound; } -float W_MineLayer(float req) +bool W_MineLayer(int req) { entity mine; float ammo_amount; @@ -591,7 +591,7 @@ float W_MineLayer(float req) } #endif #ifdef CSQC -float W_MineLayer(float req) +bool W_MineLayer(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_mortar.qc b/qcsrc/common/weapons/w_mortar.qc index 39c618ff6..c958372af 100644 --- a/qcsrc/common/weapons/w_mortar.qc +++ b/qcsrc/common/weapons/w_mortar.qc @@ -319,7 +319,7 @@ void W_Mortar_Attack2(void) } .float bot_secondary_grenademooth; -float W_Mortar(float req) +bool W_Mortar(int req) { entity nade; float nadefound; @@ -459,7 +459,7 @@ float W_Mortar(float req) } #endif #ifdef CSQC -float W_Mortar(float req) +bool W_Mortar(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index 0010449a0..01b1ab648 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -284,8 +284,8 @@ void W_Porto_Attack(float type) other = gren; MUTATOR_CALLHOOK(EditProjectile); } -float w_nexball_weapon(float req); // WEAPONTODO -float W_Porto(float req) +bool w_nexball_weapon(int req); // WEAPONTODO +bool W_Porto(int req) { //vector v_angle_save; @@ -396,7 +396,7 @@ float W_Porto(float req) } #endif #ifdef CSQC -float W_Porto(float req) +bool W_Porto(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index 91e6b5f70..16d6ad6f8 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -133,7 +133,7 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt } .float bot_secondary_riflemooth; -float W_Rifle(float req) +bool W_Rifle(int req) { float ammo_amount; @@ -264,7 +264,7 @@ float W_Rifle(float req) } #endif #ifdef CSQC -float W_Rifle(float req) +bool W_Rifle(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_rpc.qc b/qcsrc/common/weapons/w_rpc.qc index 5955b7449..d641572c3 100644 --- a/qcsrc/common/weapons/w_rpc.qc +++ b/qcsrc/common/weapons/w_rpc.qc @@ -146,7 +146,7 @@ void W_RocketPropelledChainsaw_Attack (void) other = missile; MUTATOR_CALLHOOK(EditProjectile); } -float W_RocketPropelledChainsaw(float req) +bool W_RocketPropelledChainsaw(int req) { float ammo_amount = false; switch(req) @@ -232,7 +232,7 @@ float W_RocketPropelledChainsaw(float req) #endif #ifdef CSQC -float W_RocketPropelledChainsaw(float req) +bool W_RocketPropelledChainsaw(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_seeker.qc b/qcsrc/common/weapons/w_seeker.qc index 8565d6d46..f338ed7ea 100644 --- a/qcsrc/common/weapons/w_seeker.qc +++ b/qcsrc/common/weapons/w_seeker.qc @@ -596,7 +596,7 @@ void W_Seeker_Fire_Tag(void) // Begin: Genereal weapon functions // ============================ -float W_Seeker(float req) +bool W_Seeker(int req) { float ammo_amount; @@ -725,7 +725,7 @@ float W_Seeker(float req) } #endif #ifdef CSQC -float W_Seeker(float req) +bool W_Seeker(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index 3f40c5397..d23ce753a 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -665,7 +665,7 @@ void W_Shockwave_Attack(void) } } -float W_Shockwave(float req) +bool W_Shockwave(int req) { switch(req) { @@ -864,7 +864,7 @@ void Net_ReadShockwaveParticle(void) shockwave.sw_time = time; } -float W_Shockwave(float req) +bool W_Shockwave(int req) { switch(req) { diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index 0b70b8572..3c40519d6 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -55,7 +55,7 @@ float W_Tuba_MarkClientOnlyFieldsAsUsed() { #ifdef SVQC void spawnfunc_weapon_tuba(void) { weapon_defaultspawnfunc(WEP_TUBA); } -float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorepitch, float mintempo, float maxtempo) +bool W_Tuba_HasPlayed(entity pl, string melody, int instrument, bool ignorepitch, float mintempo, float maxtempo) { float i, j, mmin, mmax, nolength; float n = tokenize_console(melody); @@ -182,7 +182,7 @@ void W_Tuba_NoteOff(void) remove(self); } -float W_Tuba_GetNote(entity pl, float hittype) +int W_Tuba_GetNote(entity pl, int hittype) { float movestate = 5; if (pl.movement.x < 0) movestate -= 3; @@ -190,7 +190,7 @@ float W_Tuba_GetNote(entity pl, float hittype) if (pl.movement.y < 0) movestate -= 1; else if (pl.movement.y > 0) movestate += 1; - float note = 0; + int note = 0; switch(movestate) { // layout: originally I wanted @@ -250,9 +250,9 @@ float W_Tuba_GetNote(entity pl, float hittype) return note; } -float W_Tuba_NoteSendEntity(entity to, float sf) +bool W_Tuba_NoteSendEntity(entity to, int sf) { - float f; + int f; msg_entity = to; if(!sound_allowed(MSG_ONE, self.realowner)) @@ -367,7 +367,7 @@ void W_Tuba_NoteOn(float hittype) } } -float W_Tuba(float req) +bool W_Tuba(int req) { switch(req) { @@ -493,7 +493,7 @@ float W_Tuba(float req) } #endif #ifdef CSQC -float W_Tuba(float req) +bool W_Tuba(int req) { // nothing to do here; particles of tuba are handled differently // WEAPONTODO diff --git a/qcsrc/common/weapons/w_vortex.qc b/qcsrc/common/weapons/w_vortex.qc index 67096cb97..6deff5e57 100644 --- a/qcsrc/common/weapons/w_vortex.qc +++ b/qcsrc/common/weapons/w_vortex.qc @@ -131,7 +131,7 @@ void W_Vortex_Attack(float issecondary) void spawnfunc_weapon_vortex(void); // defined in t_items.qc .float vortex_chargepool_pauseregen_finished; -float W_Vortex(float req) +bool W_Vortex(int req) { float dt; float ammo_amount; @@ -308,7 +308,7 @@ float W_Vortex(float req) #endif #ifdef CSQC float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO -float W_Vortex(float req) +bool W_Vortex(int req) { switch(req) { diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index 6d3542bd0..95489ad43 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -68,7 +68,7 @@ void CSQCModel_InterpolateAnimation_1To2_PreNote(int sf) self.frame2time = self.frame1time; } } -void CSQCModel_InterpolateAnimation_PreNote(float sf) +void CSQCModel_InterpolateAnimation_PreNote(int sf) { #ifdef CSQCMODEL_HAVE_TWO_FRAMES CSQCModel_InterpolateAnimation_2To4_PreNote(sf); @@ -104,7 +104,7 @@ void CSQCModel_InterpolateAnimation_1To2_Note(int sf, float set_times) self.frame1time = time; } } -void CSQCModel_InterpolateAnimation_Note(float sf) +void CSQCModel_InterpolateAnimation_Note(int sf) { #ifdef CSQCMODEL_HAVE_TWO_FRAMES CSQCModel_InterpolateAnimation_2To4_Note(sf, true); diff --git a/qcsrc/csqcmodellib/cl_model.qh b/qcsrc/csqcmodellib/cl_model.qh index c2aca6f7a..98f1da03b 100644 --- a/qcsrc/csqcmodellib/cl_model.qh +++ b/qcsrc/csqcmodellib/cl_model.qh @@ -42,12 +42,12 @@ entity CSQCModel_server2csqc(float pl); // this is exported for custom frame animation code. Use with care. // to update frames, first call this: -void CSQCModel_InterpolateAnimation_2To4_PreNote(float sf); -void CSQCModel_InterpolateAnimation_1To2_PreNote(float sf); +void CSQCModel_InterpolateAnimation_2To4_PreNote(int sf); +void CSQCModel_InterpolateAnimation_1To2_PreNote(int sf); // then update frame, frame1time (and possibly frame2, frame2time, lerpfrac) // if set_times is not set, caller is responsible for frame1time, frame2time, csqcmodel_lerpfractime! -void CSQCModel_InterpolateAnimation_2To4_Note(float sf, float set_times); -void CSQCModel_InterpolateAnimation_1To2_Note(float sf, float set_times); +void CSQCModel_InterpolateAnimation_2To4_Note(int sf, float set_times); +void CSQCModel_InterpolateAnimation_1To2_Note(int sf, float set_times); // to retrieve animation state, call this void CSQCModel_InterpolateAnimation_2To4_Do(); void CSQCModel_InterpolateAnimation_1To2_Do(); diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 3bc5cc762..74469b101 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -651,7 +651,7 @@ void PutClientInServer (void) .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, float sf) +float ClientInit_SendEntity(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_INIT); WriteByte(MSG_ENTITY, g_nexball_meter_period * 32); diff --git a/qcsrc/server/g_casings.qc b/qcsrc/server/g_casings.qc index 2b78ebe0b..82374c41b 100644 --- a/qcsrc/server/g_casings.qc +++ b/qcsrc/server/g_casings.qc @@ -8,7 +8,7 @@ #include "defs.qh" #endif -float Casing_SendEntity(entity to, float sf) +float Casing_SendEntity(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_CASING); WriteByte(MSG_ENTITY, self.state); // actually type diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 0285210f1..788eb345f 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -27,7 +27,7 @@ #include "spawnpoints.qh" #endif -float Damage_DamageInfo_SendEntity(entity to, float sf) +float Damage_DamageInfo_SendEntity(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO); WriteShort(MSG_ENTITY, self.projectiledeathtype); diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index d4d0eb002..b98693de6 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, float sf); +float Damage_DamageInfo_SendEntity(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 6d3d0b58a..f0b953704 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -105,7 +105,7 @@ void GrapplingHook_Stop() } .vector hook_start, hook_end; -float GrapplingHookSend(entity to, float sf) +float GrapplingHookSend(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_HOOK); sf = sf & 0x7F; diff --git a/qcsrc/server/g_models.qc b/qcsrc/server/g_models.qc index 6e1c06d05..0214b9ed3 100644 --- a/qcsrc/server/g_models.qc +++ b/qcsrc/server/g_models.qc @@ -60,7 +60,7 @@ void g_clientmodel_dropbyspawnflags() self.SendFlags |= 2; } -float g_clientmodel_genericsendentity (entity to, float sf) +float g_clientmodel_genericsendentity (entity to, int sf) { sf = sf & 0x0F; if(self.angles != '0 0 0') diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index e0df85042..d58d4105e 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -984,7 +984,7 @@ void spawnfunc_func_sparks() spawnfunc_func_pointparticles(); } -float rainsnow_SendEntity(entity to, float sf) +float rainsnow_SendEntity(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_RAINSNOW); WriteByte(MSG_ENTITY, self.state); diff --git a/qcsrc/server/g_triggers.qh b/qcsrc/server/g_triggers.qh index 68bf1575b..793d79909 100644 --- a/qcsrc/server/g_triggers.qh +++ b/qcsrc/server/g_triggers.qh @@ -193,7 +193,7 @@ void spawnfunc_func_pointparticles(); void spawnfunc_func_sparks(); -float rainsnow_SendEntity(entity to, float sf); +float rainsnow_SendEntity(entity to, int sf); /*QUAKED spawnfunc_func_rain (0 .5 .8) ? This is an invisible area like a trigger, which rain falls inside of. diff --git a/qcsrc/server/g_violence.qc b/qcsrc/server/g_violence.qc index fdff4a66f..4ef4f45ff 100644 --- a/qcsrc/server/g_violence.qc +++ b/qcsrc/server/g_violence.qc @@ -1,6 +1,6 @@ #include "g_violence.qh" -float Violence_GibSplash_SendEntity(entity to, float sf) +float Violence_GibSplash_SendEntity(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_GIBSPLASH); WriteByte(MSG_ENTITY, self.state); // actually type diff --git a/qcsrc/server/g_violence.qh b/qcsrc/server/g_violence.qh index 1f1df0683..98d2b811f 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, float sf); +float Violence_GibSplash_SendEntity(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 04f8ff7b3..b4df2d06e 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -509,7 +509,7 @@ void detect_maptype() } entity randomseed; -float RandomSeed_Send(entity to, float sf) +float RandomSeed_Send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED); WriteShort(MSG_ENTITY, self.cnt); diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index fd42c99ab..178dfe7ba 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -252,7 +252,7 @@ void MapVote_WriteMask() } } -float MapVote_SendEntity(entity to, float sf) +float MapVote_SendEntity(entity to, int sf) { float i; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index d998ea799..884fe04ed 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -822,7 +822,7 @@ void soundtoat(float _dest, entity e, vector o, float chan, string samp, float v entno = num_for_edict(e); idx = precache_sound_index(samp); - float sflags; + int sflags; sflags = 0; _atten = floor(_atten * 64); @@ -1836,7 +1836,7 @@ vector gettaginfo_relative(entity e, float tag) .float scale2; -float modeleffect_SendEntity(entity to, float sf) +float modeleffect_SendEntity(entity to, int sf) { float f; WriteByte(MSG_ENTITY, ENT_CLIENT_MODELEFFECT); diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 8f9da8b06..f196220f5 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -180,7 +180,7 @@ void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags) } } -float ScoreInfo_SendEntity(entity to, float sf) +float ScoreInfo_SendEntity(entity to, int sf) { float i; WriteByte(MSG_ENTITY, ENT_CLIENT_SCORES_INFO); diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 253c70fbe..91add1a40 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -15,7 +15,7 @@ #include "race.qh" #endif -float SpawnPoint_Send(entity to, float sf) +float SpawnPoint_Send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT); @@ -27,7 +27,7 @@ float SpawnPoint_Send(entity to, float sf) return true; } -float SpawnEvent_Send(entity to, float sf) +float SpawnEvent_Send(entity to, int sf) { float send; diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index beab71c7a..b654d83ca 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, float sf); +float SpawnEvent_Send(entity to, int sf); entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck); entity SelectSpawnPoint (float anypoint); #endif diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 4f5d2048d..27b0e6cda 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, float sf) +float 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 bb914234e..000a4d2d8 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, float sf); +float 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, float sf); +float ItemSend(entity to, int sf); void ItemUpdate(entity item); // pickup evaluation functions diff --git a/qcsrc/server/target_music.qc b/qcsrc/server/target_music.qc index 94bc92f69..be476d758 100644 --- a/qcsrc/server/target_music.qc +++ b/qcsrc/server/target_music.qc @@ -75,7 +75,7 @@ void TargetMusic_RestoreGame() // spawnflags: // 1 = START_OFF // when triggered, it is disabled/enabled for everyone -float trigger_music_SendEntity(entity to, float sf) +float trigger_music_SendEntity(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_TRIGGER_MUSIC); sf &= ~0x80; diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index b897ebdd5..600edcc58 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -15,7 +15,7 @@ void turrets_setframe(float _frame, float client_only) } -float turret_send(entity to, float sf) +float turret_send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_TURRET); diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index 9b3ae6c31..c9edecf56 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -844,7 +844,7 @@ void spawnfunc_vehicle_bumblebee() } } -float bumble_raygun_send(entity to, float sf) +float bumble_raygun_send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_BUMBLE_RAYGUN); diff --git a/qcsrc/server/vehicles/bumblebee.qh b/qcsrc/server/vehicles/bumblebee.qh index 727cbf2a6..16dba7ba2 100644 --- a/qcsrc/server/vehicles/bumblebee.qh +++ b/qcsrc/server/vehicles/bumblebee.qh @@ -78,7 +78,7 @@ vector autocvar_g_vehicle_bumblebee_bouncepain; float autocvar_g_vehicle_bumblebee = 0; -float bumble_raygun_send(entity to, float sf); +float bumble_raygun_send(entity to, int sf); const vector BUMB_MIN = '-130 -130 -130'; const vector BUMB_MAX = '130 130 130'; @@ -117,7 +117,7 @@ void bumb_spawn(float _f); void spawnfunc_vehicle_bumblebee(); -float bumble_raygun_send(entity to, float sf); +float bumble_raygun_send(entity to, int sf); #endif // SVQC #ifdef CSQC diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 524f85e19..e29c23519 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -26,7 +26,7 @@ void vehicles_setreturn(); const float MAX_AXH = 4; .entity AuxiliaryXhair[MAX_AXH]; -float SendAuxiliaryXhair(entity to, float sf) +float SendAuxiliaryXhair(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR); diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index c4dc7287f..cc509d755 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, float sf) +float WarpZone_Teleported_Send(entity to, int sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED); WriteCoord(MSG_ENTITY, self.angles.x); -- 2.39.2