]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a not very useful wrapper function that was used only in Key Hunt
authorterencehill <piuntn@gmail.com>
Wed, 2 Apr 2025 17:12:01 +0000 (19:12 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 2 Apr 2025 17:12:01 +0000 (19:12 +0200)
qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc
qcsrc/server/damage.qc
qcsrc/server/damage.qh

index 85814dfecdc21a35b6756e352629c8c8dba635b2..a970be643fc83d3b115f5746118e2ade4a761aab 100644 (file)
@@ -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;
index b67afb712dc1e11e8e3d96b41c081f53c58bc0a3..cc7d68a425d9691fd9ca73a748e4d336e27b7b9c 100644 (file)
 #include <server/weapons/weaponsystem.qh>
 #include <server/world.qh>
 
-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)
index bd9e10f97e062f2d775cc4b7e855b8fa53ff4cfa..93805b16af3d959db16416f46ebb4cd0c0c83ece 100644 (file)
@@ -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);