Fixed lack of fuel scoop sound bug, at the same time attempting to fix the 'laserover-laserover' sound repetition issue. Thanks to Svengali for providing the code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4902 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
4500f5fa79
commit
7183c5f2ef
@ -2202,13 +2202,14 @@ static GLfloat sBaseMass = 0.0;
|
||||
- (void) updateFuelScoops:(OOTimeDelta)delta_t
|
||||
{
|
||||
if (scoopsActive)
|
||||
{
|
||||
[self updateFuelScoopSoundWithInterval:delta_t];
|
||||
if (![self scoopOverride])
|
||||
{
|
||||
scoopsActive = NO;
|
||||
}
|
||||
}
|
||||
{
|
||||
[self updateFuelScoopSoundWithInterval:delta_t];
|
||||
if (![self scoopOverride])
|
||||
{
|
||||
scoopsActive = NO;
|
||||
[self updateFuelScoopSoundWithInterval:delta_t];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -332,15 +332,19 @@ static OOSoundSource *sAfterburnerSources[2];
|
||||
{
|
||||
static double scoopSoundPlayTime = 0.0;
|
||||
scoopSoundPlayTime -= delta_t;
|
||||
if (!scoopsActive || ![self scoopOverride])
|
||||
if (scoopSoundPlayTime < 0.0)
|
||||
{
|
||||
if(![sInterfaceBeepSource isPlaying])
|
||||
{
|
||||
[self playInterfaceBeep:@"[scoop]"];
|
||||
scoopSoundPlayTime = 0.5;
|
||||
}
|
||||
else scoopSoundPlayTime = 0.0;
|
||||
}
|
||||
if (![self scoopOverride])
|
||||
{
|
||||
scoopSoundPlayTime = 0.0;
|
||||
}
|
||||
if (scoopSoundPlayTime < 0.0 && ![sInterfaceBeepSource isPlaying])
|
||||
{
|
||||
[self playInterfaceBeep:@"[scoop]"];
|
||||
scoopSoundPlayTime = 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user