]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/tuba.qc
Replace all direct assignments to self with setself(e)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / tuba.qc
index 9baa0c61555b5a16f5eee43fc64a677359ec24da..05787ba58777650a2522782586f6900e7df64fa3 100644 (file)
@@ -336,10 +336,8 @@ void W_Tuba_NoteOn(float hittype)
        {
                if(self.tuba_note.cnt != n || self.tuba_note.tuba_instrument != self.tuba_instrument)
                {
-                       entity oldself = self;
-                       self = self.tuba_note;
-                       W_Tuba_NoteOff();
-                       self = oldself;
+                       SELFCALL(self.tuba_note, W_Tuba_NoteOff());
+                       SELFCALL_DONE();
                }
        }
 
@@ -406,10 +404,8 @@ bool W_Tuba(int req)
                        {
                                if(!self.BUTTON_ATCK && !self.BUTTON_ATCK2)
                                {
-                                       entity oldself = self;
-                                       self = self.tuba_note;
-                                       W_Tuba_NoteOff();
-                                       self = oldself;
+                                       SELFCALL(self.tuba_note, W_Tuba_NoteOff());
+                                       SELFCALL_DONE();
                                }
                        }