]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Register score fields
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index a765503192354ffd4a6793031c85eb57c9c2c4fc..dad52d685f5f3e3f4ed6cd47a73748254425692e 100644 (file)
@@ -5,6 +5,8 @@
 #include "mutators/all.qh"
 #include "scores.qh"
 #include "spawnpoints.qh"
+#include "../common/state.qh"
+#include "../common/physics/player.qh"
 #include "../common/t_items.qh"
 #include "../common/vehicles/all.qh"
 #include "../common/items/all.qc"
@@ -14,7 +16,7 @@
 #include "weapons/selection.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes/all.qh"
-#include "../common/notifications.qh"
+#include "../common/notifications/all.qh"
 #include "../common/physics/movetypes/movetypes.qh"
 #include "../common/playerstats.qh"
 #include "../common/teams.qh"
@@ -23,7 +25,7 @@
 #include "../lib/csqcmodel/sv_model.qh"
 #include "../lib/warpzone/common.qh"
 
-void UpdateFrags(entity player, float f)
+void UpdateFrags(entity player, int f)
 {
        PlayerTeamScore_AddScore(player, f);
 }
@@ -125,7 +127,7 @@ string AppendItemcodes(string s, entity player)
                s = strcat(s, "I");
        if(player.flagcarried != world)
                s = strcat(s, "F");
-       if(player.BUTTON_CHAT)
+       if(PHYS_INPUT_BUTTON_CHAT(player))
                s = strcat(s, "T");
        if(player.kh_next)
                s = strcat(s, "K");
@@ -396,7 +398,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        CHOICE_TYPEFRAG,
                                        targ.netname,
                                        kill_count_to_attacker,
-                                       (IS_BOT_CLIENT(targ) ? NO_MSG_ : targ.ping)
+                                       (IS_BOT_CLIENT(targ) ? -1 : targ.ping)
                                );
                                Send_Notification(
                                        NOTIF_ONE,
@@ -407,7 +409,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        kill_count_to_target,
                                        attacker.health,
                                        attacker.armorvalue,
-                                       (IS_BOT_CLIENT(attacker) ? NO_MSG_ : attacker.ping)
+                                       (IS_BOT_CLIENT(attacker) ? -1 : attacker.ping)
                                );
                        }
                        else
@@ -419,7 +421,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        CHOICE_FRAG,
                                        targ.netname,
                                        kill_count_to_attacker,
-                                       (IS_BOT_CLIENT(targ) ? NO_MSG_ : targ.ping)
+                                       (IS_BOT_CLIENT(targ) ? -1 : targ.ping)
                                );
                                Send_Notification(
                                        NOTIF_ONE,
@@ -430,7 +432,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        kill_count_to_target,
                                        attacker.health,
                                        attacker.armorvalue,
-                                       (IS_BOT_CLIENT(attacker) ? NO_MSG_ : attacker.ping)
+                                       (IS_BOT_CLIENT(attacker) ? -1 : attacker.ping)
                                );
                        }
 
@@ -538,7 +540,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo
        targ.iceblock = ice;
        targ.revival_time = 0;
 
-       WITH(entity, self, ice, Ice_Think());
+       WITHSELF(ice, Ice_Think());
 
        RemoveGrapplingHook(targ);
 
@@ -551,6 +553,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo
 
 void Unfreeze (entity targ)
 {
+    SELFPARAM();
        if(!STAT(FROZEN, targ))
                return;
 
@@ -801,7 +804,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                        {
                                                if(deathtype != DEATH_FIRE.m_id)
                                                {
-                                                       if(victim.BUTTON_CHAT)
+                                                       if(PHYS_INPUT_BUTTON_CHAT(victim))
                                                                attacker.typehitsound += 1;
                                                        else
                                                                attacker.damage_dealt += damage;