]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/clientkill.qc
LMS: improve handling of forced spectators in warmup and countdown to game start...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientkill.qc
index ee01f7ff196433f5c2b2a5397c9bfb0d54851f6b..9b29273a65b2f65edd5c2c3830e1230a64d20c29 100644 (file)
@@ -24,7 +24,7 @@ void ClientKill_Now_TeamChange(entity this)
        {
                if (blockSpectators)
                        Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
-               PutObserverInServer(this);
+               PutObserverInServer(this, false);
        }
        else
        {
@@ -130,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, "");
@@ -144,7 +144,7 @@ void ClientKill_TeamChange(entity this, float targetteam) // 0 = don't change, -
 
                        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, "");
@@ -188,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;