From 1f184059485a958c714cc21ab6f8a8122e767e6b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 9 Oct 2011 21:57:20 +0200 Subject: [PATCH] tuba: fix notes playing too loud in first frame --- qcsrc/client/tuba.qc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/tuba.qc b/qcsrc/client/tuba.qc index 6e1c1f9bd..13e37f0e7 100644 --- a/qcsrc/client/tuba.qc +++ b/qcsrc/client/tuba.qc @@ -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() -- 2.39.2