1 //#define TUBA_STARTNOTE(n) strcat("weapons/tuba_startnote", ftos(n), ".wav")
2 //#define TUBA_STOPNOTE(n) strcat("weapons/tuba_stopnote", ftos(n), ".wav")
3 #define TUBA_STARTNOTE(n) strcat("weapons/tuba_note", ftos(n), ".wav")
4 #define TUBA_STOPNOTE(n) ""
7 void Ent_TubaNote_UpdateSound()
9 sound(self, CHAN_PROJECTILE, TUBA_STARTNOTE(self.cnt), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), cvar("g_balance_tuba_attenuation"));
12 void Ent_TubaNote_StopSound()
14 sound(self, CHAN_PROJECTILE, TUBA_STOPNOTE(self.cnt), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), cvar("g_balance_tuba_attenuation"));
17 void Ent_TubaNote(float bIsNew)
21 n = floor(f / 2) - 42;
24 self.origin_x = ReadCoord();
25 self.origin_y = ReadCoord();
26 self.origin_z = ReadCoord();
27 setorigin(self, self.origin);
29 self.think = Ent_TubaNote_StopSound;
30 self.entremove = Ent_TubaNote_StopSound;
31 self.nextthink = time + 10;
32 if(n != self.cnt || bIsNew)
35 Ent_TubaNote_UpdateSound();
42 for(i = -18; i <= +27; ++i)
44 precache_sound(TUBA_STARTNOTE(i));
45 //precache_sound(TUBA_STOPNOTE(i));