]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/clientkill.qc
Fix kicked player not receiving the kick message (if sent with Send_Notification)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientkill.qc
index 08758a06536f706bd722e6ed57549e0ae1b6d154..e87a2b11831c350714e352ddd436e08ade9ba6b7 100644 (file)
@@ -1,13 +1,18 @@
 #include "clientkill.qh"
 
-#include <server/defs.qh>
-
-#include "g_damage.qh"
-#include "teamplay.qh"
-
-#include <common/vehicles/sv_vehicles.qh>
+#include <common/csqcmodel_settings.qh>
+#include <common/deathtypes/all.qh>
+#include <common/mapobjects/triggers.qh>
 #include <common/notifications/all.qh>
 #include <common/stats.qh>
+#include <common/stats.qh>
+#include <common/vehicles/sv_vehicles.qh>
+#include <common/weapons/_all.qh>
+#include <server/client.qh>
+#include <server/damage.qh>
+#include <server/mutators/_mod.qh>
+#include <server/player.qh>
+#include <server/teamplay.qh>
 
 void ClientKill_Now_TeamChange(entity this)
 {
@@ -125,7 +130,7 @@ void ClientKill_TeamChange(entity this, float targetteam) // 0 = don't change, -
                {
                        float starttime = max(time, clientkilltime);
 
-                       this.killindicator = spawn();
+                       this.killindicator = new(killindicator);
                        this.killindicator.owner = this;
                        this.killindicator.scale = 0.5;
                        setattachment(this.killindicator, this, "");
@@ -137,9 +142,9 @@ void ClientKill_TeamChange(entity this, float targetteam) // 0 = don't change, -
                        this.killindicator.count = bound(0, ceil(killtime), 10);
                        //sprint(this, strcat("^1You'll be dead in ", ftos(this.killindicator.cnt), " seconds\n"));
 
-                       IL_EACH(g_clones, it.enemy == this && !(it.effects & CSQCMODEL_EF_RESPAWNGHOST),
+                       IL_EACH(g_clones, it.enemy == this && !(it.effects & CSQCMODEL_EF_RESPAWNGHOST) && !it.killindicator,
                        {
-                               it.killindicator = spawn();
+                               it.killindicator = new(killindicator);
                                it.killindicator.owner = it;
                                it.killindicator.scale = 0.5;
                                setattachment(it.killindicator, it, "");
@@ -183,7 +188,7 @@ void ClientKill_TeamChange(entity this, float targetteam) // 0 = don't change, -
 
 void ClientKill_Silent(entity this, float _delay)
 {
-       this.killindicator = spawn();
+       this.killindicator = new(killindicator);
        this.killindicator.owner = this;
        setthink(this.killindicator, KillIndicator_Think);
        this.killindicator.nextthink = time + (this.lip) * 0.05;