From d3a8529b3c8b9fa132f7ba343e4d60274331671a Mon Sep 17 00:00:00 2001 From: tankefugl Date: Tue, 9 May 2006 21:17:17 +0000 Subject: [PATCH] o Fixed bug where blink and leap would not get silenced by the silence upgrade git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@470 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/pm_shared/pm_shared.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/releases/3.2.0/source/pm_shared/pm_shared.cpp b/releases/3.2.0/source/pm_shared/pm_shared.cpp index ec122307..b0a7b185 100644 --- a/releases/3.2.0/source/pm_shared/pm_shared.cpp +++ b/releases/3.2.0/source/pm_shared/pm_shared.cpp @@ -4368,7 +4368,9 @@ bool PM_BlinkMove (void) SetUpgradeMask(&pmove->iuser4, MASK_ALIEN_MOVEMENT, true); - PM_NSPlaySound(CHAN_WEAPON, kBlinkSound, 1.0f, ATTN_NORM, 0, 94 + pmove->RandomLong(0, 0xf)); + int theSilenceUpgradeLevel = AvHGetAlienUpgradeLevel(pmove->iuser4, MASK_UPGRADE_6); + float theVolumeScalar = 1.0f - theSilenceUpgradeLevel/3.0f; + PM_NSPlaySound(CHAN_WEAPON, kBlinkSound, theVolumeScalar, ATTN_NORM, 0, 94 + pmove->RandomLong(0, 0xf)); vec3_t forward, right, up; AngleVectors(pmove->angles, forward, right, up); @@ -4479,7 +4481,9 @@ bool PM_LeapMove() SetUpgradeMask(&pmove->iuser4, MASK_ALIEN_MOVEMENT, true); - PM_NSPlaySound(CHAN_WEAPON, kLeapSound, 1.0f, ATTN_NORM, 0, 94 + pmove->RandomLong(0, 0xf)); + int theSilenceUpgradeLevel = AvHGetAlienUpgradeLevel(pmove->iuser4, MASK_UPGRADE_6); + float theVolumeScalar = 1.0f - theSilenceUpgradeLevel/3.0f; + PM_NSPlaySound(CHAN_WEAPON, kLeapSound, theVolumeScalar, ATTN_NORM, 0, 94 + pmove->RandomLong(0, 0xf)); vec3_t forward, right, up; AngleVectors(pmove->angles, forward, right, up);