From: terencehill Date: Wed, 2 Apr 2025 17:12:01 +0000 (+0200) Subject: Remove a not very useful wrapper function that was used only in Key Hunt X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=717e9aa664f3373e778e67a4f94028d1708588cd;p=xonotic%2Fxonotic-data.pk3dir.git Remove a not very useful wrapper function that was used only in Key Hunt --- 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);