]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/tuba.qc
Purge most cases of self from the client folder
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / tuba.qc
index ebf4881df669df53226c69180470d50ad425ccb1..0e429acb22b50e1ff66d17461c4f0a24f2f08dc6 100644 (file)
@@ -582,12 +582,14 @@ void Ent_TubaNote_UpdateSound(entity this)
        tubasound(this.enemy, 1);
 }
 
-void Ent_TubaNote_StopSound()
-{SELFPARAM();
+void Ent_TubaNote_StopSound(entity this)
+{
        this.enemy.nextthink = time;
        this.enemy = NULL;
 }
 
+void Ent_TubaNote_StopSound_self() { Ent_TubaNote_StopSound(self); }
+
 NET_HANDLE(ENT_CLIENT_TUBANOTE, bool isNew)
 {
        bool upd = false;
@@ -600,7 +602,7 @@ NET_HANDLE(ENT_CLIENT_TUBANOTE, bool isNew)
 
                if (this.enemy) {
                        if (n != this.note || i != this.tuba_instrument || isNew) {
-                               Ent_TubaNote_StopSound();
+                               Ent_TubaNote_StopSound(this);
                        }
                } else {
                        this.enemy = new(tuba_note);
@@ -629,7 +631,7 @@ NET_HANDLE(ENT_CLIENT_TUBANOTE, bool isNew)
                }
        }
 
-       this.think = Ent_TubaNote_StopSound;
+       this.think = Ent_TubaNote_StopSound_self;
        this.entremove = Ent_TubaNote_StopSound;
        this.enemy.think = Ent_TubaNote_Think;
        this.enemy.nextthink = time + 10;