X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Ftuba.qc;h=05787ba58777650a2522782586f6900e7df64fa3;hb=3a035cb2732af064519135410c5664c2e1b3f501;hp=686c89ec3a7f6f0dae6a0fe3ed8c0761735b6555;hpb=a81365864859ecccf601a8e50768322b6012e90c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index 686c89ec3..05787ba58 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -148,7 +148,7 @@ bool W_Tuba_HasPlayed(entity pl, string melody, int instrument, bool ignorepitch } void W_Tuba_NoteOff(void) -{ +{SELFPARAM(); // we have a note: // on: self.spawnshieldtime // off: time @@ -252,7 +252,7 @@ int W_Tuba_GetNote(entity pl, int hittype) } bool W_Tuba_NoteSendEntity(entity to, int sf) -{ +{SELFPARAM(); int f; msg_entity = to; @@ -280,7 +280,7 @@ bool W_Tuba_NoteSendEntity(entity to, int sf) } void W_Tuba_NoteThink(void) -{ +{SELFPARAM(); float dist_mult; float vol0, vol1; vector dir0, dir1; @@ -318,7 +318,7 @@ void W_Tuba_NoteThink(void) } void W_Tuba_NoteOn(float hittype) -{ +{SELFPARAM(); vector o; float n; @@ -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(); } } @@ -369,7 +367,7 @@ void W_Tuba_NoteOn(float hittype) } bool W_Tuba(int req) -{ +{SELFPARAM(); switch(req) { case WR_AIM: @@ -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(); } } @@ -495,7 +491,7 @@ bool W_Tuba(int req) #endif #ifdef CSQC bool W_Tuba(int req) -{ +{SELFPARAM(); // nothing to do here; particles of tuba are handled differently // WEAPONTODO