From 717e9aa664f3373e778e67a4f94028d1708588cd Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 2 Apr 2025 19:12:01 +0200 Subject: [PATCH] Remove a not very useful wrapper function that was used only in Key Hunt --- qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc | 4 ++-- qcsrc/server/damage.qc | 7 +------ qcsrc/server/damage.qh | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index 85814dfec..a970be643 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc @@ -181,10 +181,10 @@ void kh_Scores_Event(entity player, entity key, string what, float frags_player, return; if(frags_player) - UpdateFrags(player, frags_player); + GameRules_scoring_add_team(player, SCORE, frags_player); if(key && key.owner && frags_owner) - UpdateFrags(key.owner, frags_owner); + GameRules_scoring_add_team(key.owner, SCORE, frags_owner); if(!autocvar_sv_eventlog) //output extra info to the console or text file return; diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index b67afb712..cc7d68a42 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -40,11 +40,6 @@ #include #include -void UpdateFrags(entity player, int f) -{ - GameRules_scoring_add_team(player, SCORE, f); -} - void GiveFrags(entity attacker, entity targ, float f, int deathtype, .entity weaponentity) { // TODO route through PlayerScores instead @@ -80,7 +75,7 @@ void GiveFrags(entity attacker, entity targ, float f, int deathtype, .entity wea attacker.totalfrags += f; if(f) - UpdateFrags(attacker, f); + GameRules_scoring_add_team(attacker, SCORE, f); } string AppendItemcodes(string s, entity player) diff --git a/qcsrc/server/damage.qh b/qcsrc/server/damage.qh index bd9e10f97..93805b16a 100644 --- a/qcsrc/server/damage.qh +++ b/qcsrc/server/damage.qh @@ -77,8 +77,6 @@ string deathmessage; float IsFlying(entity a); -void UpdateFrags(entity player, int f); - // NOTE: f=0 means still count as a (positive) kill, but count no frags for it void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity); void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity); -- 2.39.5