mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Exhumed: fixed some sound source issues.
This commit is contained in:
parent
3221ecf800
commit
e0e6efe0a0
1 changed files with 8 additions and 13 deletions
|
@ -427,10 +427,7 @@ void EXSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
||||||
if (nSnakeCam > -1)
|
if (nSnakeCam > -1)
|
||||||
{
|
{
|
||||||
Snake* pSnake = &SnakeList[nSnakeCam];
|
Snake* pSnake = &SnakeList[nSnakeCam];
|
||||||
spritetype* pSnakeSprite = &pSnake->pSprites[0]->s();
|
campos = pSnake->pSprites[0]->spr.pos;
|
||||||
campos.x = pSnakeSprite->x;
|
|
||||||
campos.y = pSnakeSprite->y;
|
|
||||||
campos.z = pSnakeSprite->z;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -504,9 +501,8 @@ void GameInterface::UpdateSounds()
|
||||||
if (nSnakeCam > -1)
|
if (nSnakeCam > -1)
|
||||||
{
|
{
|
||||||
Snake *pSnake = &SnakeList[nSnakeCam];
|
Snake *pSnake = &SnakeList[nSnakeCam];
|
||||||
spritetype *pSnakeSprite = &pSnake->pSprites[0]->s();
|
pos = pSnake->pSprites[0]->spr.pos;
|
||||||
pos = pSnakeSprite->pos;
|
ang = pSnake->pSprites[0]->spr.ang;
|
||||||
ang = pSnakeSprite->ang;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -604,10 +600,10 @@ void PlayFX2(int nSound, DExhumedActor* pActor, int sectf, EChanFlags chanflags,
|
||||||
{
|
{
|
||||||
if (chan->SoundID == nSound + 1)
|
if (chan->SoundID == nSound + 1)
|
||||||
{
|
{
|
||||||
if (!allowMultiple && &pActor->s() == chan->Source)
|
if (!allowMultiple && pActor == chan->Source)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (&pActor->s() == chan->Source)
|
else if (pActor == chan->Source)
|
||||||
{
|
{
|
||||||
soundEngine->StopChannel(chan);
|
soundEngine->StopChannel(chan);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -688,8 +684,7 @@ void CheckAmbience(sectortype* sect)
|
||||||
{
|
{
|
||||||
if (sect == pSector2)
|
if (sect == pSector2)
|
||||||
{
|
{
|
||||||
spritetype* pSprite = &PlayerList[0].Actor()->s();
|
amb = GetSoundPos(&PlayerList[0].Actor()->spr.pos);
|
||||||
amb = GetSoundPos(&pSprite->pos);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -719,7 +714,7 @@ void UpdateCreepySounds()
|
||||||
{
|
{
|
||||||
if ((currentLevel->gameflags & LEVEL_EX_COUNTDOWN) || nFreeze || !SoundEnabled())
|
if ((currentLevel->gameflags & LEVEL_EX_COUNTDOWN) || nFreeze || !SoundEnabled())
|
||||||
return;
|
return;
|
||||||
spritetype* pSprite = &PlayerList[nLocalPlayer].Actor()->s();
|
spritetype* pSprite = &PlayerList[nLocalPlayer].pActor->spr;
|
||||||
nCreepyTimer--;
|
nCreepyTimer--;
|
||||||
if (nCreepyTimer <= 0)
|
if (nCreepyTimer <= 0)
|
||||||
{
|
{
|
||||||
|
@ -769,7 +764,7 @@ void UpdateCreepySounds()
|
||||||
void StopActorSound(DExhumedActor *pActor)
|
void StopActorSound(DExhumedActor *pActor)
|
||||||
{
|
{
|
||||||
if (pActor)
|
if (pActor)
|
||||||
soundEngine->StopSound(SOURCE_Actor, &pActor->s(), -1);
|
soundEngine->StopSound(SOURCE_Actor, pActor, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopAllSounds(void)
|
void StopAllSounds(void)
|
||||||
|
|
Loading…
Reference in a new issue