mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
- switched all aiPlay3DSound calls to use actors.
This commit is contained in:
parent
bdba52aede
commit
61d9cd1b17
11 changed files with 43 additions and 48 deletions
|
@ -7419,11 +7419,6 @@ bool dudeIsPlayingSeq(spritetype* pSprite, int nSeq)
|
||||||
return dudeIsPlayingSeq(&bloodActors[pSprite->index], nSeq);
|
return dudeIsPlayingSeq(&bloodActors[pSprite->index], nSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aiPlay3DSound(spritetype* pSprite, int a2, AI_SFX_PRIORITY a3, int a4)
|
|
||||||
{
|
|
||||||
return aiPlay3DSound(&bloodActors[pSprite->index], a2, a3, a4);
|
|
||||||
}
|
|
||||||
|
|
||||||
void aiSetTarget_(XSPRITE* pXSprite, int nTarget)
|
void aiSetTarget_(XSPRITE* pXSprite, int nTarget)
|
||||||
{
|
{
|
||||||
aiSetTarget(&bloodActors[pXSprite->reference], &bloodActors[nTarget]);
|
aiSetTarget(&bloodActors[pXSprite->reference], &bloodActors[nTarget]);
|
||||||
|
|
|
@ -416,7 +416,7 @@ void aiActivateDude(DBloodActor* actor)
|
||||||
if (Chance(0x8000))
|
if (Chance(0x8000))
|
||||||
{
|
{
|
||||||
if (pSprite->type == kDudeCultistTommy) aiPlay3DSound(actor, 4008+Random(5), AI_SFX_PRIORITY_1, -1);
|
if (pSprite->type == kDudeCultistTommy) aiPlay3DSound(actor, 4008+Random(5), AI_SFX_PRIORITY_1, -1);
|
||||||
else aiPlay3DSound(pSprite, 1008+Random(5), AI_SFX_PRIORITY_1, -1);
|
else aiPlay3DSound(actor, 1008+Random(5), AI_SFX_PRIORITY_1, -1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kMediumWater:
|
case kMediumWater:
|
||||||
|
@ -764,7 +764,7 @@ void aiActivateDude(DBloodActor* actor)
|
||||||
aiNewState(actor, &houndSearch);
|
aiNewState(actor, &houndSearch);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 1300, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1300, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &houndChase);
|
aiNewState(actor, &houndChase);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -773,7 +773,7 @@ void aiActivateDude(DBloodActor* actor)
|
||||||
aiNewState(actor, &handSearch);
|
aiNewState(actor, &handSearch);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 1900, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1900, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &handChase);
|
aiNewState(actor, &handChase);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -782,7 +782,7 @@ void aiActivateDude(DBloodActor* actor)
|
||||||
aiNewState(actor, &ratSearch);
|
aiNewState(actor, &ratSearch);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 2100, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 2100, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &ratChase);
|
aiNewState(actor, &ratChase);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1076,7 +1076,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
||||||
|
|
||||||
if (pExtra->canBurn && pExtra->availDeaths[kDamageBurn] > 0) {
|
if (pExtra->canBurn && pExtra->availDeaths[kDamageBurn] > 0) {
|
||||||
|
|
||||||
aiPlay3DSound(pSprite, 361, AI_SFX_PRIORITY_0, -1);
|
aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1);
|
||||||
playGenDudeSound(pSprite, kGenDudeSndBurning);
|
playGenDudeSound(pSprite, kGenDudeSndBurning);
|
||||||
pSprite->type = kDudeModernCustomBurning;
|
pSprite->type = kDudeModernCustomBurning;
|
||||||
|
|
||||||
|
@ -1223,7 +1223,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
||||||
pSprite->type = kDudeBurningInnocent;
|
pSprite->type = kDudeBurningInnocent;
|
||||||
aiNewState(actor, &cultistBurnGoto);
|
aiNewState(actor, &cultistBurnGoto);
|
||||||
}
|
}
|
||||||
aiPlay3DSound(pSprite, 361, AI_SFX_PRIORITY_0, -1);
|
aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1);
|
||||||
actor->dudeExtra.time = PlayClock+360;
|
actor->dudeExtra.time = PlayClock+360;
|
||||||
actHealDude(actor, dudeInfo[39].startHealth, dudeInfo[39].startHealth);
|
actHealDude(actor, dudeInfo[39].startHealth, dudeInfo[39].startHealth);
|
||||||
evKill(actor, kCallbackFXFlameLick);
|
evKill(actor, kCallbackFXFlameLick);
|
||||||
|
@ -1317,8 +1317,8 @@ void RecoilDude(DBloodActor* actor)
|
||||||
case kDudeCultistTesla:
|
case kDudeCultistTesla:
|
||||||
case kDudeCultistTNT:
|
case kDudeCultistTNT:
|
||||||
case kDudeCultistBeast:
|
case kDudeCultistBeast:
|
||||||
if (pSprite->type == kDudeCultistTommy) aiPlay3DSound(pSprite, 4013+Random(2), AI_SFX_PRIORITY_2, -1);
|
if (pSprite->type == kDudeCultistTommy) aiPlay3DSound(actor, 4013+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
else aiPlay3DSound(pSprite, 1013+Random(2), AI_SFX_PRIORITY_2, -1);
|
else aiPlay3DSound(actor, 1013+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
|
|
||||||
if (!v4 && pXSprite->medium == kMediumNormal) {
|
if (!v4 && pXSprite->medium == kMediumNormal) {
|
||||||
if (pDudeExtra->teslaHit) aiNewState(actor, &cultistTeslaRecoil);
|
if (pDudeExtra->teslaHit) aiNewState(actor, &cultistTeslaRecoil);
|
||||||
|
@ -1348,7 +1348,7 @@ void RecoilDude(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case kDudeZombieButcher:
|
case kDudeZombieButcher:
|
||||||
aiPlay3DSound(pSprite, 1202, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1202, AI_SFX_PRIORITY_2, -1);
|
||||||
if (pDudeExtra->teslaHit)
|
if (pDudeExtra->teslaHit)
|
||||||
aiNewState(actor, &zombieFTeslaRecoil);
|
aiNewState(actor, &zombieFTeslaRecoil);
|
||||||
else
|
else
|
||||||
|
@ -1356,7 +1356,7 @@ void RecoilDude(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
case kDudeZombieAxeNormal:
|
case kDudeZombieAxeNormal:
|
||||||
case kDudeZombieAxeBuried:
|
case kDudeZombieAxeBuried:
|
||||||
aiPlay3DSound(pSprite, 1106, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1106, AI_SFX_PRIORITY_2, -1);
|
||||||
if (pDudeExtra->teslaHit && pXSprite->data3 > pDudeInfo->startHealth/3)
|
if (pDudeExtra->teslaHit && pXSprite->data3 > pDudeInfo->startHealth/3)
|
||||||
aiNewState(actor, &zombieATeslaRecoil);
|
aiNewState(actor, &zombieATeslaRecoil);
|
||||||
else if (pXSprite->data3 > pDudeInfo->startHealth/3)
|
else if (pXSprite->data3 > pDudeInfo->startHealth/3)
|
||||||
|
@ -1365,61 +1365,61 @@ void RecoilDude(DBloodActor* actor)
|
||||||
aiNewState(actor, &zombieARecoil);
|
aiNewState(actor, &zombieARecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeBurningZombieAxe:
|
case kDudeBurningZombieAxe:
|
||||||
aiPlay3DSound(pSprite, 1106, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1106, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &zombieABurnGoto);
|
aiNewState(actor, &zombieABurnGoto);
|
||||||
break;
|
break;
|
||||||
case kDudeBurningZombieButcher:
|
case kDudeBurningZombieButcher:
|
||||||
aiPlay3DSound(pSprite, 1202, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1202, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &zombieFBurnGoto);
|
aiNewState(actor, &zombieFBurnGoto);
|
||||||
break;
|
break;
|
||||||
case kDudeGargoyleFlesh:
|
case kDudeGargoyleFlesh:
|
||||||
case kDudeGargoyleStone:
|
case kDudeGargoyleStone:
|
||||||
aiPlay3DSound(pSprite, 1402, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1402, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &gargoyleFRecoil);
|
aiNewState(actor, &gargoyleFRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeCerberusTwoHead:
|
case kDudeCerberusTwoHead:
|
||||||
aiPlay3DSound(pSprite, 2302+Random(2), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 2302+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
if (pDudeExtra->teslaHit && pXSprite->data3 > pDudeInfo->startHealth/3)
|
if (pDudeExtra->teslaHit && pXSprite->data3 > pDudeInfo->startHealth/3)
|
||||||
aiNewState(actor, &cerberusTeslaRecoil);
|
aiNewState(actor, &cerberusTeslaRecoil);
|
||||||
else
|
else
|
||||||
aiNewState(actor, &cerberusRecoil);
|
aiNewState(actor, &cerberusRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeCerberusOneHead:
|
case kDudeCerberusOneHead:
|
||||||
aiPlay3DSound(pSprite, 2302+Random(2), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 2302+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &cerberus2Recoil);
|
aiNewState(actor, &cerberus2Recoil);
|
||||||
break;
|
break;
|
||||||
case kDudeHellHound:
|
case kDudeHellHound:
|
||||||
aiPlay3DSound(pSprite, 1302, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1302, AI_SFX_PRIORITY_2, -1);
|
||||||
if (pDudeExtra->teslaHit)
|
if (pDudeExtra->teslaHit)
|
||||||
aiNewState(actor, &houndTeslaRecoil);
|
aiNewState(actor, &houndTeslaRecoil);
|
||||||
else
|
else
|
||||||
aiNewState(actor, &houndRecoil);
|
aiNewState(actor, &houndRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeTchernobog:
|
case kDudeTchernobog:
|
||||||
aiPlay3DSound(pSprite, 2370+Random(2), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 2370+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &tchernobogRecoil);
|
aiNewState(actor, &tchernobogRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeHand:
|
case kDudeHand:
|
||||||
aiPlay3DSound(pSprite, 1902, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1902, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &handRecoil);
|
aiNewState(actor, &handRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeRat:
|
case kDudeRat:
|
||||||
aiPlay3DSound(pSprite, 2102, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 2102, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &ratRecoil);
|
aiNewState(actor, &ratRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeBat:
|
case kDudeBat:
|
||||||
aiPlay3DSound(pSprite, 2002, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 2002, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &batRecoil);
|
aiNewState(actor, &batRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeBoneEel:
|
case kDudeBoneEel:
|
||||||
aiPlay3DSound(pSprite, 1502, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1502, AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &eelRecoil);
|
aiNewState(actor, &eelRecoil);
|
||||||
break;
|
break;
|
||||||
case kDudeGillBeast: {
|
case kDudeGillBeast: {
|
||||||
XSECTOR *pXSector = NULL;
|
XSECTOR *pXSector = NULL;
|
||||||
if (sector[pSprite->sectnum].extra > 0)
|
if (sector[pSprite->sectnum].extra > 0)
|
||||||
pXSector = &xsector[sector[pSprite->sectnum].extra];
|
pXSector = &xsector[sector[pSprite->sectnum].extra];
|
||||||
aiPlay3DSound(pSprite, 1702, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1702, AI_SFX_PRIORITY_2, -1);
|
||||||
if (pXSector && pXSector->Underwater)
|
if (pXSector && pXSector->Underwater)
|
||||||
aiNewState(actor, &gillBeastSwimRecoil);
|
aiNewState(actor, &gillBeastSwimRecoil);
|
||||||
else
|
else
|
||||||
|
@ -1427,7 +1427,7 @@ void RecoilDude(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case kDudePhantasm:
|
case kDudePhantasm:
|
||||||
aiPlay3DSound(pSprite, 1602, AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1602, AI_SFX_PRIORITY_2, -1);
|
||||||
if (pDudeExtra->teslaHit)
|
if (pDudeExtra->teslaHit)
|
||||||
aiNewState(actor, &ghostTeslaRecoil);
|
aiNewState(actor, &ghostTeslaRecoil);
|
||||||
else
|
else
|
||||||
|
@ -1436,15 +1436,15 @@ void RecoilDude(DBloodActor* actor)
|
||||||
case kDudeSpiderBrown:
|
case kDudeSpiderBrown:
|
||||||
case kDudeSpiderRed:
|
case kDudeSpiderRed:
|
||||||
case kDudeSpiderBlack:
|
case kDudeSpiderBlack:
|
||||||
aiPlay3DSound(pSprite, 1802+Random(1), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1802+Random(1), AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &spidDodge);
|
aiNewState(actor, &spidDodge);
|
||||||
break;
|
break;
|
||||||
case kDudeSpiderMother:
|
case kDudeSpiderMother:
|
||||||
aiPlay3DSound(pSprite, 1851+Random(1), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 1851+Random(1), AI_SFX_PRIORITY_2, -1);
|
||||||
aiNewState(actor, &spidDodge);
|
aiNewState(actor, &spidDodge);
|
||||||
break;
|
break;
|
||||||
case kDudeInnocent:
|
case kDudeInnocent:
|
||||||
aiPlay3DSound(pSprite, 7007+Random(2), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 7007+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
if (pDudeExtra->teslaHit)
|
if (pDudeExtra->teslaHit)
|
||||||
aiNewState(actor, &innocentTeslaRecoil);
|
aiNewState(actor, &innocentTeslaRecoil);
|
||||||
else
|
else
|
||||||
|
@ -1469,7 +1469,7 @@ void RecoilDude(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kDudeBeast:
|
case kDudeBeast:
|
||||||
aiPlay3DSound(pSprite, 9004+Random(2), AI_SFX_PRIORITY_2, -1);
|
aiPlay3DSound(actor, 9004+Random(2), AI_SFX_PRIORITY_2, -1);
|
||||||
if (pXSprite->medium == kMediumNormal)
|
if (pXSprite->medium == kMediumNormal)
|
||||||
{
|
{
|
||||||
if (pDudeExtra->teslaHit)
|
if (pDudeExtra->teslaHit)
|
||||||
|
|
|
@ -97,7 +97,6 @@ void aiInitSprite(spritetype *pSprite);
|
||||||
bool CanMove(DBloodActor* pSprite, int a2, int nAngle, int nRange);
|
bool CanMove(DBloodActor* pSprite, int a2, int nAngle, int nRange);
|
||||||
|
|
||||||
bool dudeIsPlayingSeq(spritetype* pSprite, int nSeq); // deprecated
|
bool dudeIsPlayingSeq(spritetype* pSprite, int nSeq); // deprecated
|
||||||
void aiPlay3DSound(spritetype* pSprite, int a2, AI_SFX_PRIORITY a3, int a4);
|
|
||||||
void aiSetTarget_(XSPRITE* pXSprite, int x, int y, int z);
|
void aiSetTarget_(XSPRITE* pXSprite, int x, int y, int z);
|
||||||
void aiSetTarget_(XSPRITE* pXSprite, int nTarget);
|
void aiSetTarget_(XSPRITE* pXSprite, int nTarget);
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ static void beastThinkSwimChase(DBloodActor* actor)
|
||||||
aiNewState(actor, &beastSwimSlash);
|
aiNewState(actor, &beastSwimSlash);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 9009+Random(2), AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 9009+Random(2), AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &beast138FD0);
|
aiNewState(actor, &beast138FD0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ static void calebThinkChase(DBloodActor* actor)
|
||||||
aiNewState(actor, &tinycalebSwimSearch);
|
aiNewState(actor, &tinycalebSwimSearch);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 11000+Random(4), AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 11000+Random(4), AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &tinycalebSearch);
|
aiNewState(actor, &tinycalebSearch);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -264,9 +264,9 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
case kMediumNormal:
|
case kMediumNormal:
|
||||||
aiNewState(actor, &cultistSearch);
|
aiNewState(actor, &cultistSearch);
|
||||||
if (pSprite->type == kDudeCultistTommy)
|
if (pSprite->type == kDudeCultistTommy)
|
||||||
aiPlay3DSound(pSprite, 4021+Random(4), AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 4021+Random(4), AI_SFX_PRIORITY_1, -1);
|
||||||
else
|
else
|
||||||
aiPlay3DSound(pSprite, 1021+Random(4), AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1021+Random(4), AI_SFX_PRIORITY_1, -1);
|
||||||
break;
|
break;
|
||||||
case kMediumWater:
|
case kMediumWater:
|
||||||
case kMediumGoo:
|
case kMediumGoo:
|
||||||
|
|
|
@ -74,7 +74,7 @@ AISTATE statueSBreakSEQ = { kAiStateOther, 5, -1, 0, entrySStatue, NULL, playSta
|
||||||
static void playStatueBreakSnd(DBloodActor* actor) {
|
static void playStatueBreakSnd(DBloodActor* actor) {
|
||||||
auto pXSprite = &actor->x();
|
auto pXSprite = &actor->x();
|
||||||
auto pSprite = &actor->s();
|
auto pSprite = &actor->s();
|
||||||
aiPlay3DSound(pSprite, 313, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 313, AI_SFX_PRIORITY_1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlashFSeqCallback(int, DBloodActor* actor)
|
void SlashFSeqCallback(int, DBloodActor* actor)
|
||||||
|
@ -452,11 +452,11 @@ static void gargThinkChase(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
else if ((height2-height > 0x2000 || floorZ-bottom > 0x2000) && nDist < 0x1400 && nDist > 0xa00)
|
else if ((height2-height > 0x2000 || floorZ-bottom > 0x2000) && nDist < 0x1400 && nDist > 0xa00)
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 1400, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1400, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &gargoyleSwoop);
|
aiNewState(actor, &gargoyleSwoop);
|
||||||
}
|
}
|
||||||
else if ((height2-height < 0x2000 || floorZ-bottom < 0x2000) && abs(nDeltaAngle) < 85)
|
else if ((height2-height < 0x2000 || floorZ-bottom < 0x2000) && abs(nDeltaAngle) < 85)
|
||||||
aiPlay3DSound(pSprite, 1400, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1400, AI_SFX_PRIORITY_1, -1);
|
||||||
break;
|
break;
|
||||||
case kDudeGargoyleStone:
|
case kDudeGargoyleStone:
|
||||||
if (nDist < 0x1800 && nDist > 0xc00 && abs(nDeltaAngle) < 85)
|
if (nDist < 0x1800 && nDist > 0xc00 && abs(nDeltaAngle) < 85)
|
||||||
|
@ -507,13 +507,13 @@ static void gargThinkChase(DBloodActor* actor)
|
||||||
else if ((height2-height > 0x2000 || floorZ-bottom > 0x2000) && nDist < 0x1400 && nDist > 0x800)
|
else if ((height2-height > 0x2000 || floorZ-bottom > 0x2000) && nDist < 0x1400 && nDist > 0x800)
|
||||||
{
|
{
|
||||||
if (pSprite->type == kDudeGargoyleFlesh)
|
if (pSprite->type == kDudeGargoyleFlesh)
|
||||||
aiPlay3DSound(pSprite, 1400, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1400, AI_SFX_PRIORITY_1, -1);
|
||||||
else
|
else
|
||||||
aiPlay3DSound(pSprite, 1450, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1450, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &gargoyleSwoop);
|
aiNewState(actor, &gargoyleSwoop);
|
||||||
}
|
}
|
||||||
else if ((height2-height < 0x2000 || floorZ-bottom < 0x2000) && abs(nDeltaAngle) < 85)
|
else if ((height2-height < 0x2000 || floorZ-bottom < 0x2000) && abs(nDeltaAngle) < 85)
|
||||||
aiPlay3DSound(pSprite, 1450, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1450, AI_SFX_PRIORITY_1, -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,11 +419,11 @@ static void ghostThinkChase(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
else if ((height2-height > 0x2000 || floorZ-bottom > 0x2000) && nDist < 0x1400 && nDist > 0x800)
|
else if ((height2-height > 0x2000 || floorZ-bottom > 0x2000) && nDist < 0x1400 && nDist > 0x800)
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 1600, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1600, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &ghostSwoop);
|
aiNewState(actor, &ghostSwoop);
|
||||||
}
|
}
|
||||||
else if ((height2-height < 0x2000 || floorZ-bottom < 0x2000) && abs(nDeltaAngle) < 85)
|
else if ((height2-height < 0x2000 || floorZ-bottom < 0x2000) && abs(nDeltaAngle) < 85)
|
||||||
aiPlay3DSound(pSprite, 1600, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1600, AI_SFX_PRIORITY_1, -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ static void gillThinkSwimChase(DBloodActor* actor)
|
||||||
aiNewState(actor, &gillBeastSwimBite);
|
aiNewState(actor, &gillBeastSwimBite);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aiPlay3DSound(pSprite, 1700, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 1700, AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &gillBeast13A154);
|
aiNewState(actor, &gillBeast13A154);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ static void innocThinkChase(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aiPlay3DSound(pSprite, 7000+Random(6), AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(actor, 7000+Random(6), AI_SFX_PRIORITY_1, -1);
|
||||||
aiNewState(actor, &innocentGoto);
|
aiNewState(actor, &innocentGoto);
|
||||||
actor->SetTarget(nullptr);
|
actor->SetTarget(nullptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1132,6 +1132,7 @@ void aiGenDudeNewState(spritetype* pSprite, AISTATE* pAIState) {
|
||||||
bool playGenDudeSound(spritetype* pSprite, int mode) {
|
bool playGenDudeSound(spritetype* pSprite, int mode) {
|
||||||
|
|
||||||
if (mode < kGenDudeSndTargetSpot || mode >= kGenDudeSndMax) return false;
|
if (mode < kGenDudeSndTargetSpot || mode >= kGenDudeSndMax) return false;
|
||||||
|
auto actor = &bloodActors[pSprite->index];
|
||||||
const GENDUDESND* sndInfo =& gCustomDudeSnd[mode]; bool gotSnd = false;
|
const GENDUDESND* sndInfo =& gCustomDudeSnd[mode]; bool gotSnd = false;
|
||||||
short sndStartId = xsprite[pSprite->extra].sysData1; int rand = sndInfo->randomRange;
|
short sndStartId = xsprite[pSprite->extra].sysData1; int rand = sndInfo->randomRange;
|
||||||
int sndId = (sndStartId <= 0) ? sndInfo->defaultSndId : sndStartId + sndInfo->sndIdOffset;
|
int sndId = (sndStartId <= 0) ? sndInfo->defaultSndId : sndStartId + sndInfo->sndIdOffset;
|
||||||
|
@ -1186,7 +1187,7 @@ bool playGenDudeSound(spritetype* pSprite, int mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gotSnd == false) return false;
|
if (gotSnd == false) return false;
|
||||||
else if (sndInfo->aiPlaySound) aiPlay3DSound(pSprite, sndId, AI_SFX_PRIORITY_2, -1);
|
else if (sndInfo->aiPlaySound) aiPlay3DSound(actor, sndId, AI_SFX_PRIORITY_2, -1);
|
||||||
else sfxPlay3DSound(pSprite, sndId, -1, 0);
|
else sfxPlay3DSound(pSprite, sndId, -1, 0);
|
||||||
|
|
||||||
pExtra->sndPlaying = true;
|
pExtra->sndPlaying = true;
|
||||||
|
|
Loading…
Reference in a new issue