From f19182bb895ceff0b85a38d663576cc3cff873a5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 23 Apr 2015 10:59:00 +1000 Subject: [PATCH] Convert some floats into ints --- qcsrc/common/monsters/monster/shambler.qc | 2 +- qcsrc/common/monsters/sv_monsters.qc | 6 +++--- qcsrc/common/monsters/sv_monsters.qh | 2 +- qcsrc/common/util.qc | 4 ++-- qcsrc/common/util.qh | 4 ++-- qcsrc/common/weapons/w_devastator.qc | 2 +- qcsrc/common/weapons/w_electro.qc | 2 +- qcsrc/common/weapons/w_fireball.qc | 2 +- qcsrc/common/weapons/w_hagar.qc | 2 +- qcsrc/common/weapons/w_hook.qc | 2 +- qcsrc/common/weapons/w_machinegun.qc | 2 +- qcsrc/common/weapons/w_minelayer.qc | 2 +- qcsrc/common/weapons/w_mortar.qc | 2 +- qcsrc/common/weapons/w_rifle.qc | 2 +- qcsrc/common/weapons/w_rpc.qc | 2 +- qcsrc/common/weapons/w_seeker.qc | 4 ++-- qcsrc/server/cl_player.qc | 2 +- qcsrc/server/cl_player.qh | 2 +- qcsrc/server/defs.qh | 4 ++-- qcsrc/server/g_damage.qc | 18 +++++++++--------- qcsrc/server/g_damage.qh | 18 +++++++++--------- qcsrc/server/g_hook.qc | 2 +- qcsrc/server/g_triggers.qc | 2 +- qcsrc/server/g_triggers.qh | 2 +- qcsrc/server/mutators/gamemode_ctf.qc | 2 +- qcsrc/server/mutators/gamemode_keyhunt.qc | 2 +- qcsrc/server/mutators/gamemode_onslaught.qc | 6 +++--- qcsrc/server/mutators/mutator_nades.qc | 2 +- .../server/mutators/mutator_physical_items.qc | 2 +- qcsrc/server/portals.qc | 2 +- qcsrc/server/t_items.qc | 2 +- qcsrc/server/t_plats.qc | 6 +++--- qcsrc/server/tturrets/include/turrets_early.qh | 2 +- qcsrc/server/tturrets/system/system_damage.qc | 2 +- qcsrc/server/tturrets/system/system_main.qc | 2 +- qcsrc/server/tturrets/system/system_misc.qc | 2 +- qcsrc/server/tturrets/units/unit_walker.qc | 2 +- qcsrc/server/vehicles/raptor.qc | 2 +- qcsrc/server/vehicles/vehicles.qc | 10 +++++----- qcsrc/server/weapons/common.qc | 2 +- qcsrc/server/weapons/common.qh | 2 +- qcsrc/server/weapons/tracing.qc | 2 +- qcsrc/server/weapons/tracing.qh | 2 +- 43 files changed, 73 insertions(+), 73 deletions(-) diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index 12ff5dc89..1858b9bd1 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -86,7 +86,7 @@ void shambler_lightning_explode() self.nextthink = time + 0.2; } -void shambler_lightning_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void shambler_lightning_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if (self.health <= 0) return; diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 28430e961..24ea1b919 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -321,7 +321,7 @@ void monster_makevectors(entity e) makevectors(self.v_angle); } -float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop) +float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop) { if (self.health <= 0) return false; // attacking while dead?! @@ -910,7 +910,7 @@ void monsters_reset() self.moveto = self.origin; } -void monsters_corpse_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void monsters_corpse_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { self.health -= damage; @@ -979,7 +979,7 @@ void monster_die(entity attacker, float gibbed) MON_ACTION(self.monsterid, MR_DEATH); } -void monsters_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void monsters_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE) return; diff --git a/qcsrc/common/monsters/sv_monsters.qh b/qcsrc/common/monsters/sv_monsters.qh index f6b149816..697c07b72 100644 --- a/qcsrc/common/monsters/sv_monsters.qh +++ b/qcsrc/common/monsters/sv_monsters.qh @@ -93,7 +93,7 @@ const int MONSTER_STATE_ATTACK_MELEE = 2; float monster_initialize(float mon_id); float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished); void monster_makevectors(entity e); -float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop); +float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop); void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_run, float manim_walk, float manim_idle); void monster_setupcolors(entity mon); float Monster_SkillModifier(); diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 49d707f07..f47bcf15a 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1843,7 +1843,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori } #ifndef MENUQC -vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype) +vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype) { // NOTE: we'll always choose the SMALLER value... float healthdamage, armordamage, armorideal; @@ -1867,7 +1867,7 @@ vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype return v; } -vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage) +vector healtharmor_applydamage(float a, float armorblock, int deathtype, float damage) { vector v; if (deathtype == DEATH_DROWN) // Why should armor help here... diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index b2cdf8dca..a59d31cac 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -214,8 +214,8 @@ void RandomSelection_Init(); void RandomSelection_Add(entity e, float f, string s, float weight, float priority); #ifndef MENUQC -vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored -vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage); // returns vector: take, save, 0 +vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored +vector healtharmor_applydamage(float a, float armorblock, int deathtype, float damage); // returns vector: take, save, 0 #endif string getcurrentmod(); diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index ab334fafb..ea3c03757 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -319,7 +319,7 @@ void W_Devastator_Touch(void) W_Devastator_Explode(); } -void W_Devastator_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Devastator_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index 3f5e75159..a94fcd89b 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -300,7 +300,7 @@ void W_Electro_Orb_Touch(void) } } -void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index d09800913..59c806dbd 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -161,7 +161,7 @@ void W_Fireball_Think(void) self.nextthink = time + 0.1; } -void W_Fireball_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Fireball_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index 62b52168e..283e9d845 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -75,7 +75,7 @@ void W_Hagar_Explode2(void) remove(self); } -void W_Hagar_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Hagar_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_hook.qc b/qcsrc/common/weapons/w_hook.qc index 5d52dabae..bf49a66b2 100644 --- a/qcsrc/common/weapons/w_hook.qc +++ b/qcsrc/common/weapons/w_hook.qc @@ -108,7 +108,7 @@ void W_Hook_Explode2(void) self.movetype = MOVETYPE_NONE; } -void W_Hook_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Hook_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 14a59e398..907bc7594 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -101,7 +101,7 @@ void W_MachineGun_MuzzleFlash(void) self.muzzle_flash.owner = self.muzzle_flash.realowner = self; } -void W_MachineGun_Attack(float deathtype) +void W_MachineGun_Attack(int deathtype) { W_SetupShot(self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, ((self.misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage))); if(!autocvar_g_norecoil) diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index 2fe0172a9..e8425ae0e 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -290,7 +290,7 @@ void W_MineLayer_Touch(void) } } -void W_MineLayer_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_MineLayer_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_mortar.qc b/qcsrc/common/weapons/w_mortar.qc index 34b5e5747..39c618ff6 100644 --- a/qcsrc/common/weapons/w_mortar.qc +++ b/qcsrc/common/weapons/w_mortar.qc @@ -99,7 +99,7 @@ void W_Mortar_Grenade_Explode2(void) } -void W_Mortar_Grenade_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Mortar_Grenade_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index f20872f70..91e6b5f70 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -50,7 +50,7 @@ void spawnfunc_weapon_rifle(void) { weapon_defaultspawnfunc(WEP_RIFLE); } void spawnfunc_weapon_campingrifle(void) { spawnfunc_weapon_rifle(); } void spawnfunc_weapon_sniperrifle(void) { spawnfunc_weapon_rifle(); } -void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, float deathtype, float pTracer, float pShots, string pSound) +void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, int deathtype, float pTracer, float pShots, string pSound) { float i; diff --git a/qcsrc/common/weapons/w_rpc.qc b/qcsrc/common/weapons/w_rpc.qc index 387dc32d8..5955b7449 100644 --- a/qcsrc/common/weapons/w_rpc.qc +++ b/qcsrc/common/weapons/w_rpc.qc @@ -65,7 +65,7 @@ void W_RocketPropelledChainsaw_Touch (void) W_RocketPropelledChainsaw_Explode(); } -void W_RocketPropelledChainsaw_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_RocketPropelledChainsaw_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if (self.health <= 0) return; diff --git a/qcsrc/common/weapons/w_seeker.qc b/qcsrc/common/weapons/w_seeker.qc index 45a121ab4..8565d6d46 100644 --- a/qcsrc/common/weapons/w_seeker.qc +++ b/qcsrc/common/weapons/w_seeker.qc @@ -200,7 +200,7 @@ void W_Seeker_Missile_Think(void) -void W_Seeker_Missile_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Seeker_Missile_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; @@ -482,7 +482,7 @@ void W_Seeker_Tag_Explode(void) remove(self); } -void W_Seeker_Tag_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void W_Seeker_Tag_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 49d1c1b46..afd52171e 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -147,7 +147,7 @@ void player_anim (void) } } -void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { float take, save; vector v; diff --git a/qcsrc/server/cl_player.qh b/qcsrc/server/cl_player.qh index cf5ec0a7d..cd1ec2e15 100644 --- a/qcsrc/server/cl_player.qh +++ b/qcsrc/server/cl_player.qh @@ -16,7 +16,7 @@ void player_setupanimsformodel(); void player_anim (void); -void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); +void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); // g__str: // If 0, default is used. diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 822c5163c..7c26399af 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -64,7 +64,7 @@ float server_is_dedicated; // Fields -.void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage; +.void(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) event_damage; //.string wad; //.string map; @@ -333,7 +333,7 @@ float have_team_spawns_forteam[17]; // 0 = this team has no spawns, 1 = this tea .entity killindicator; .float killindicator_teamchange; -void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); +void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); float lockteams; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index d170cf4c0..0285210f1 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -42,7 +42,7 @@ float Damage_DamageInfo_SendEntity(entity to, float sf) return true; } -void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner) +void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner) { // TODO maybe call this from non-edgedamage too? // TODO maybe make the client do the particle effects for the weapons and the impact sounds using this info? @@ -83,7 +83,7 @@ void UpdateFrags(entity player, float f) PlayerTeamScore_AddScore(player, f); } -void GiveFrags (entity attacker, entity targ, float f, float deathtype) +void GiveFrags (entity attacker, entity targ, float f, int deathtype) { // TODO route through PlayerScores instead if(gameover) return; @@ -203,7 +203,7 @@ string AppendItemcodes(string s, entity player) return s; } -void LogDeath(string mode, float deathtype, entity killer, entity killed) +void LogDeath(string mode, int deathtype, entity killer, entity killed) { string s; if(!autocvar_sv_eventlog) @@ -225,7 +225,7 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed) void Obituary_SpecialDeath( entity notif_target, float murder, - float deathtype, + int deathtype, string s1, string s2, string s3, float f1, float f2, float f3) { @@ -285,7 +285,7 @@ void Obituary_SpecialDeath( float Obituary_WeaponDeath( entity notif_target, float murder, - float deathtype, + int deathtype, string s1, string s2, string s3, float f1, float f2) { @@ -329,7 +329,7 @@ float Obituary_WeaponDeath( return false; } -void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) +void Obituary(entity attacker, entity inflictor, entity targ, int deathtype) { // Sanity check if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; } @@ -635,7 +635,7 @@ void Unfreeze (entity targ) targ.iceblock = world; } -void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { float mirrordamage; float mirrorforce; @@ -949,7 +949,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float } } -float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float deathtype, entity directhitentity) +float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity) // Returns total damage applies to creatures { entity targ; @@ -1138,7 +1138,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in return total_damage_to_creatures; } -float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity) +float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity) { return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, directhitentity); } diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 4cc3f6f63..d4d0eb002 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -37,7 +37,7 @@ float Damage_DamageInfo_SendEntity(entity to, float sf); -void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner); +void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner); float checkrules_firstblood; @@ -60,16 +60,16 @@ void UpdateFrags(entity player, float f); // NOTE: f=0 means still count as a (positive) kill, but count no frags for it void W_SwitchWeapon_Force(entity e, float w); entity GiveFrags_randomweapons; -void GiveFrags (entity attacker, entity targ, float f, float deathtype); +void GiveFrags (entity attacker, entity targ, float f, int deathtype); string AppendItemcodes(string s, entity player); -void LogDeath(string mode, float deathtype, entity killer, entity killed); +void LogDeath(string mode, int deathtype, entity killer, entity killed); void Obituary_SpecialDeath( entity notif_target, float murder, - float deathtype, + int deathtype, string s1, string s2, string s3, float f1, float f2, float f3); @@ -77,11 +77,11 @@ float w_deathtype; float Obituary_WeaponDeath( entity notif_target, float murder, - float deathtype, + int deathtype, string s1, string s2, string s3, float f1, float f2); -void Obituary(entity attacker, entity inflictor, entity targ, float deathtype); +void Obituary(entity attacker, entity inflictor, entity targ, int deathtype); void Ice_Think(); @@ -94,13 +94,13 @@ entity damage_targ; entity damage_inflictor; entity damage_attacker; -void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); +void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); float RadiusDamage_running; -float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float deathtype, entity directhitentity); +float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity); // Returns total damage applies to creatures -float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity); +float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity); .float fire_damagepersec; .float fire_endtime; diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 310833e43..6d3d0b58a 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -289,7 +289,7 @@ void GrapplingHookTouch (void) //self.realowner.disableclientprediction = true; } -void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.health <= 0) return; diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 9bb1e06e7..e0df85042 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -225,7 +225,7 @@ void multi_touch() multi_trigger (); } -void multi_eventdamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void multi_eventdamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if (!self.takedamage) return; diff --git a/qcsrc/server/g_triggers.qh b/qcsrc/server/g_triggers.qh index 35c39f290..68bf1575b 100644 --- a/qcsrc/server/g_triggers.qh +++ b/qcsrc/server/g_triggers.qh @@ -48,7 +48,7 @@ void multi_use(); void multi_touch(); -void multi_eventdamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); +void multi_eventdamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); void multi_reset(); diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 5ea2924cc..0cbcf714c 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -643,7 +643,7 @@ void ctf_CheckStalemate(void) } } -void ctf_FlagDamage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void ctf_FlagDamage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(ITEM_DAMAGE_NEEDKILL(deathtype)) { diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/gamemode_keyhunt.qc index 2a6731610..d0103d80e 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/gamemode_keyhunt.qc @@ -397,7 +397,7 @@ void kh_Key_AssignTo(entity key, entity player) // runs every time a key is pic } } -void kh_Key_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void kh_Key_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.owner) return; diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index d1f20f7ee..7d02e6ff9 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -25,7 +25,7 @@ void onslaught_link_checkupdate(); entity ons_red_generator; entity ons_blue_generator; -void ons_gib_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce) +void ons_gib_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce) { self.velocity = self.velocity + vforce; } @@ -570,7 +570,7 @@ void onslaught_generator_deaththink() self.count = self.count - 1; } -void onslaught_generator_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void onslaught_generator_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { float i; if (damage <= 0) @@ -966,7 +966,7 @@ void spawnfunc_onslaught_generator() float ons_notification_time_team1; float ons_notification_time_team2; -void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { entity oself; float nag; diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index 60b2acce5..a7c3b7ea7 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -583,7 +583,7 @@ void nade_beep() self.nextthink = max(self.wait, time); } -void nade_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void nade_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(ITEM_DAMAGE_NEEDKILL(deathtype)) { diff --git a/qcsrc/server/mutators/mutator_physical_items.qc b/qcsrc/server/mutators/mutator_physical_items.qc index dd2d8556d..4963b3c8f 100644 --- a/qcsrc/server/mutators/mutator_physical_items.qc +++ b/qcsrc/server/mutators/mutator_physical_items.qc @@ -45,7 +45,7 @@ void physical_item_touch() } } -void physical_item_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void physical_item_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(!self.cnt) // not for dropped items if(ITEM_DAMAGE_NEEDKILL(deathtype)) diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 53c77ecce..8d061cdb8 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -430,7 +430,7 @@ void Portal_Remove(entity portal, float killed) } } -void Portal_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void Portal_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(deathtype == DEATH_TELEFRAG) return; diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 03af802e7..4f5d2048d 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -925,7 +925,7 @@ float commodity_pickupevalfunc(entity player, entity item) return item.bot_pickupbasevalue * c; } -void Item_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void Item_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(ITEM_DAMAGE_NEEDKILL(deathtype)) RemoveItem(); diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 5b9433af4..ebe1676c7 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -785,7 +785,7 @@ void button_touch() button_fire (); } -void button_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void button_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { if(self.spawnflags & DOOR_NOSPLASH) if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH)) @@ -1145,7 +1145,7 @@ void door_trigger_touch() } -void door_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void door_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { entity oself; if(self.spawnflags & DOOR_NOSPLASH) @@ -1765,7 +1765,7 @@ void fd_secret_use() sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM); } -void fd_secret_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void fd_secret_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { fd_secret_use(); } diff --git a/qcsrc/server/tturrets/include/turrets_early.qh b/qcsrc/server/tturrets/include/turrets_early.qh index 4c5d95f9e..1cb23e67b 100644 --- a/qcsrc/server/tturrets/include/turrets_early.qh +++ b/qcsrc/server/tturrets/include/turrets_early.qh @@ -417,7 +417,7 @@ vector turret_stdproc_aim_generic(); void turret_stdproc_track(); /// Generic damage handeling. blows up the turret when health <= 0 -void turret_stdproc_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce); +void turret_stdproc_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce); /// Spawns a explotion, does some damage & trows bits arround. void turret_stdproc_die(); /// reassembles the turret. diff --git a/qcsrc/server/tturrets/system/system_damage.qc b/qcsrc/server/tturrets/system/system_damage.qc index 45b2e9b3b..43567fcbf 100644 --- a/qcsrc/server/tturrets/system/system_damage.qc +++ b/qcsrc/server/tturrets/system/system_damage.qc @@ -81,7 +81,7 @@ void turret_stdproc_respawn() /* * Standard damage proc. */ -void turret_stdproc_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce) +void turret_stdproc_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce) { // Enougth allready! if(self.deadflag == DEAD_DEAD) diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index 70ae2ae09..b897ebdd5 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -163,7 +163,7 @@ void turret_projectile_touch() turret_projectile_explode(); } -void turret_projectile_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce) +void turret_projectile_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce) { self.velocity += vforce; self.health -= damage; diff --git a/qcsrc/server/tturrets/system/system_misc.qc b/qcsrc/server/tturrets/system/system_misc.qc index 787510694..98eca069e 100644 --- a/qcsrc/server/tturrets/system/system_misc.qc +++ b/qcsrc/server/tturrets/system/system_misc.qc @@ -133,7 +133,7 @@ float turret_tag_fire_update_s() * Railgun-like beam, but has thickness and suppots slowing of target */ void FireImoBeam (vector start, vector end, vector smin, vector smax, - float bforce, float f_dmg, float f_velfactor, float deathtype) + float bforce, float f_dmg, float f_velfactor, int deathtype) { vector hitloc, force, endpoint, dir; diff --git a/qcsrc/server/tturrets/units/unit_walker.qc b/qcsrc/server/tturrets/units/unit_walker.qc index 4b1c44c15..f76d11923 100644 --- a/qcsrc/server/tturrets/units/unit_walker.qc +++ b/qcsrc/server/tturrets/units/unit_walker.qc @@ -56,7 +56,7 @@ void walker_rocket_explode() remove (self); } -void walker_rocket_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce) +void walker_rocket_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce) { self.health = self.health - damage; self.velocity = self.velocity + vforce; diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index 4533da6f3..4bd283693 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -345,7 +345,7 @@ void raptor_flare_touch() remove(self); } -void raptor_flare_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void raptor_flare_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { self.health -= damage; if(self.health <= 0) diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 6d9369d9f..524f85e19 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -11,7 +11,7 @@ float autocvar_g_vehicles_tag_damagerate = 5; float autocvar_g_vehicles; -void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); +void vehicles_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); void vehicles_return(); void vehicles_enter(); void vehicles_touch(); @@ -150,7 +150,7 @@ vector targetdrone_getnewspot() #if 0 void targetdrone_think(); -void targetdrone_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); +void targetdrone_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); void targetdrone_renwe() { self.think = targetdrone_think; @@ -167,7 +167,7 @@ void targetdrone_renwe() setsize(self, '-100 -100 -100', '100 100 100'); } -void targetdrone_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void targetdrone_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { self.health -= damage; if(self.health <= 0) @@ -366,7 +366,7 @@ vector vehicles_force_fromtag_maglev(string tag_name, float spring_length, float } // Generic vehile projectile system -void vehicles_projectile_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void vehicles_projectile_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { // Ignore damage from oterh projectiles from my owner (dont mess up volly's) if(inflictor.owner == self.owner) @@ -910,7 +910,7 @@ void vehicles_painframe() } } -void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) +void vehicles_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { self.dmg_time = time; diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index c37fce0ab..5125410b9 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -43,7 +43,7 @@ void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound player.prevstrengthsoundattempt = time; } -float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception) +float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception) { float is_from_contents = (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA); float is_from_owner = (inflictor == projowner); diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index 341f4ff35..b97457ad9 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -5,6 +5,6 @@ void W_GiveWeapon (entity e, float wep); .float prevstrengthsound; .float prevstrengthsoundattempt; void W_PlayStrengthSound(entity player); -float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception); +float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception); void W_PrepareExplosionByDamage(entity attacker, void() explode); #endif diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index c3532d3d6..1621f8e8e 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -190,7 +190,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p // Ballistics Tracing // ==================== -void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype) +void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype) { vector hitloc, force, endpoint, dir; entity ent, endent; diff --git a/qcsrc/server/weapons/tracing.qh b/qcsrc/server/weapons/tracing.qh index 1cab448cb..b2ab7d082 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -50,7 +50,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p .float railgundistance; .vector railgunforce; -void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype); +void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype); float fireBullet_trace_callback_eff; entity fireBullet_last_hit; -- 2.39.2