#define TUBA_MIN -18
#define TUBA_MAX 27
-#define TUBA_INSTRUMENTS 1
+#define TUBA_INSTRUMENTS 2
#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
.float note; // note
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();
{
self.note = n;
self.tuba_instrument = i;
- Ent_TubaNote_UpdateSound();
+ upd = 1;
}
}
self.entremove = Ent_TubaNote_StopSound;
self.enemy.think = Ent_TubaNote_Think;
self.enemy.nextthink = time + 10;
+
+ if(upd)
+ Ent_TubaNote_UpdateSound();
}
void Tuba_Precache()