X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Ftuba.qc;h=a22347fe3ca3f53ebea4acbd59eb01aa05bc684f;hb=d719b4d3b3edb3a675c121c5942ede0d92cd1ceb;hp=6e1c1f9bd78b2ab3480a1054020fbec475edbc86;hpb=46efdcf8bf523f3e1fd9a7850204f4fec661d724;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/tuba.qc b/qcsrc/client/tuba.qc index 6e1c1f9bd..a22347fe3 100644 --- a/qcsrc/client/tuba.qc +++ b/qcsrc/client/tuba.qc @@ -1,6 +1,6 @@ #define TUBA_MIN -18 #define TUBA_MAX 27 -#define TUBA_INSTRUMENTS 1 +#define TUBA_INSTRUMENTS 3 #define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav") .float note; // note @@ -117,9 +117,11 @@ void Ent_TubaNote_StopSound() void Ent_TubaNote(float bIsNew) { - float f, n, i, att; + float f, n, i, att, upd; f = ReadByte(); + upd = 0; + if(f & 1) { n = ReadChar(); @@ -151,7 +153,7 @@ void Ent_TubaNote(float bIsNew) { self.note = n; self.tuba_instrument = i; - Ent_TubaNote_UpdateSound(); + upd = 1; } } @@ -169,6 +171,9 @@ void Ent_TubaNote(float bIsNew) self.entremove = Ent_TubaNote_StopSound; self.enemy.think = Ent_TubaNote_Think; self.enemy.nextthink = time + 10; + + if(upd) + Ent_TubaNote_UpdateSound(); } void Tuba_Precache()