mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-03 22:50:47 +00:00
- lots of PlaySound calls migrated to actors.
This commit is contained in:
parent
e6c625f6e8
commit
e32a1af7b2
14 changed files with 131 additions and 129 deletions
|
@ -148,7 +148,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
SpawnBlood(actor, actor, -1, -1, -1, -1);
|
||||
InitPlasmaFountain(wp, sp);
|
||||
InitPlasmaFountain(wp, sp);
|
||||
PlaySound(DIGI_NINJAINHALF, sp, v3df_none);
|
||||
PlaySound(DIGI_NINJAINHALF, actor, v3df_none);
|
||||
if (sw_ninjahack)
|
||||
ChangeState(actor, &s_NinjaDieSlicedHack[5]);
|
||||
else
|
||||
|
@ -795,11 +795,11 @@ int DoActorStopFall(DSWActor* actor)
|
|||
if (TEST(u->Flags, SPR_DEAD))
|
||||
{
|
||||
NewStateGroup(actor, u->ActorActionSet->Dead);
|
||||
PlaySound(DIGI_ACTORBODYFALL1, sp, v3df_none);
|
||||
PlaySound(DIGI_ACTORBODYFALL1, actor, v3df_none);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySound(DIGI_ACTORHITGROUND, sp, v3df_none);
|
||||
PlaySound(DIGI_ACTORHITGROUND, actor, v3df_none);
|
||||
|
||||
NewStateGroup(actor, u->ActorActionSet->Run);
|
||||
|
||||
|
|
|
@ -980,8 +980,8 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
{
|
||||
if (u->spal == PALETTE_PLAYER8 && tu->spal == PALETTE_PLAYER8)
|
||||
{
|
||||
PlaySound(DIGI_BUNNYATTACK, sp, v3df_follow);
|
||||
PlaySound(DIGI_BUNNYDIE2, tsp, v3df_follow);
|
||||
PlaySound(DIGI_BUNNYATTACK, actor, v3df_follow);
|
||||
PlaySound(DIGI_BUNNYDIE2, hitActor, v3df_follow);
|
||||
tu->Health = 0;
|
||||
|
||||
// Blood fountains
|
||||
|
@ -1138,13 +1138,12 @@ int DoBunnyRipHeart(DSWActor* actor)
|
|||
int DoBunnyStandKill(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
NullBunny(actor);
|
||||
|
||||
// Growl like the bad ass bunny you are!
|
||||
if (RandomRange(1000) > 800)
|
||||
PlaySound(DIGI_BUNNYATTACK, sp, v3df_none);
|
||||
PlaySound(DIGI_BUNNYATTACK, actor, v3df_none);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
NewStateGroup(actor, sg_BunnyRun);
|
||||
|
@ -1450,7 +1449,7 @@ int DoBunnyScrew(DSWActor* actor)
|
|||
|
||||
if (RandomRange(1000) > 990) // Bunny sex sounds
|
||||
{
|
||||
PlaySound(DIGI_BUNNYATTACK, sp, v3df_follow);
|
||||
PlaySound(DIGI_BUNNYATTACK, actor, v3df_follow);
|
||||
}
|
||||
|
||||
u->WaitTics -= ACTORMOVETICS;
|
||||
|
@ -1499,7 +1498,7 @@ int DoBunnyGrowUp(DSWActor* actor)
|
|||
{
|
||||
if (Bunny_Count < 20)
|
||||
{
|
||||
PlaySound(DIGI_BUNNYDIE2, sp, v3df_follow);
|
||||
PlaySound(DIGI_BUNNYDIE2, actor, v3df_follow);
|
||||
BunnyHatch(actor); // Baby time
|
||||
}
|
||||
u->ShellNum = 0; // Not pregnent anymore
|
||||
|
|
|
@ -829,7 +829,7 @@ int DoCoolgMove(DSWActor* actor)
|
|||
u->ShellNum = SEC(2);
|
||||
break;
|
||||
case 1:
|
||||
PlaySound(DIGI_VOID3, sp, v3df_follow);
|
||||
PlaySound(DIGI_VOID3, actor, v3df_follow);
|
||||
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||
SET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||
u->ShellNum = SEC(1) + SEC(RandomRange(2));
|
||||
|
@ -840,7 +840,7 @@ int DoCoolgMove(DSWActor* actor)
|
|||
u->ShellNum = SEC(2);
|
||||
break;
|
||||
case 3:
|
||||
PlaySound(DIGI_VOID3, sp, v3df_follow);
|
||||
PlaySound(DIGI_VOID3, actor, v3df_follow);
|
||||
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||
u->ShellNum = SEC(2) + SEC(RandomRange(3));
|
||||
|
|
|
@ -639,7 +639,7 @@ int InitCoolieCharge(DSWActor* actor)
|
|||
SPRITEp sp = &actor->s();
|
||||
|
||||
if (RANDOM_P2(1024) > 950)
|
||||
PlaySound(DIGI_COOLIESCREAM, sp, v3df_follow);
|
||||
PlaySound(DIGI_COOLIESCREAM, actor, v3df_follow);
|
||||
|
||||
DoActorSetSpeed(actor, FAST_SPEED);
|
||||
|
||||
|
|
|
@ -1882,7 +1882,7 @@ short SoundDist(int x, int y, int z, int basedist);
|
|||
short SoundAngle(int x, int y);
|
||||
//void PlaySound(int num, short angle, short vol);
|
||||
int _PlaySound(int num, SPRITEp sprite, PLAYERp player, vec3_t *pos, Voc3D_Flags flags, int channel, EChanFlags sndflags);
|
||||
void InitAmbient(int num, SPRITEp sprite);
|
||||
void InitAmbient(int num, DSWActor* actor);
|
||||
inline void PlaySound(int num, SPRITEp sprite, Voc3D_Flags flags, int channel = 8, EChanFlags sndflags = CHANF_NONE)
|
||||
{
|
||||
_PlaySound(num, sprite, nullptr, nullptr, flags, channel, sndflags);
|
||||
|
@ -2277,6 +2277,11 @@ inline bool PLAYER_MOVING(PLAYERp pp)
|
|||
return (pp->xvect | pp->yvect);
|
||||
}
|
||||
|
||||
inline void PlaySound(int num, DSWActor* actor, Voc3D_Flags flags, int channel = 8, EChanFlags sndflags = CHANF_NONE)
|
||||
{
|
||||
_PlaySound(num, &actor->s(), nullptr, nullptr, flags, channel, sndflags);
|
||||
}
|
||||
|
||||
struct ANIMstruct
|
||||
{
|
||||
int animtype, animindex;
|
||||
|
|
|
@ -228,14 +228,14 @@ JS_SpriteSetup(void)
|
|||
case 2720:
|
||||
case 3143:
|
||||
case 3157:
|
||||
PlaySound(DIGI_FIRE1, sp, v3df_follow|v3df_dontpan|v3df_doppler);
|
||||
PlaySound(DIGI_FIRE1, actor, v3df_follow|v3df_dontpan|v3df_doppler);
|
||||
break;
|
||||
case 795:
|
||||
case 880:
|
||||
PlaySound(DIGI_WATERFLOW1, sp, v3df_follow|v3df_dontpan|v3df_doppler);
|
||||
PlaySound(DIGI_WATERFLOW1, actor, v3df_follow|v3df_dontpan|v3df_doppler);
|
||||
break;
|
||||
case 460: // Wind Chimes
|
||||
InitAmbient(79, sp);
|
||||
InitAmbient(79, actor);
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -968,7 +968,7 @@ void UnlockKeyLock(short key_num, DSWActor* hitActor)
|
|||
case SKEL_LOCKED:
|
||||
if (sp->pal == color)
|
||||
{
|
||||
PlaySound(DIGI_UNLOCK, sp, v3df_doppler | v3df_dontpan);
|
||||
PlaySound(DIGI_UNLOCK, itActor, v3df_doppler | v3df_dontpan);
|
||||
if (itActor == hitActor)
|
||||
sp->picnum = SKEL_UNLOCKED;
|
||||
}
|
||||
|
@ -976,14 +976,14 @@ void UnlockKeyLock(short key_num, DSWActor* hitActor)
|
|||
case RAMCARD_LOCKED:
|
||||
if (sp->pal == color)
|
||||
{
|
||||
PlaySound(DIGI_CARDUNLOCK, sp, v3df_doppler | v3df_dontpan);
|
||||
PlaySound(DIGI_CARDUNLOCK, itActor, v3df_doppler | v3df_dontpan);
|
||||
sp->picnum = RAMCARD_UNLOCKED;
|
||||
}
|
||||
break;
|
||||
case CARD_LOCKED:
|
||||
if (sp->pal == color)
|
||||
{
|
||||
PlaySound(DIGI_RAMUNLOCK, sp, v3df_doppler | v3df_dontpan);
|
||||
PlaySound(DIGI_RAMUNLOCK, itActor, v3df_doppler | v3df_dontpan);
|
||||
if (itActor == hitActor)
|
||||
sp->picnum = CARD_UNLOCKED;
|
||||
else
|
||||
|
|
|
@ -837,7 +837,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
SPRITEp hsp;
|
||||
|
||||
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
|
||||
|
||||
hsp = &actor->s();
|
||||
|
||||
|
@ -852,8 +852,8 @@ int DoChemBomb(DSWActor* actor)
|
|||
// Canister pops when first smoke starts out
|
||||
if (u->WaitTics == CHEMTICS && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_CHEMGAS, actor, v3df_dontpan | v3df_doppler);
|
||||
Set3DSoundOwner(actor->GetSpriteIndex());
|
||||
}
|
||||
u->xchange = u->ychange = 0;
|
||||
|
@ -883,7 +883,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
}
|
||||
|
||||
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
|
||||
|
||||
nw = wall[hit_wall].point2;
|
||||
wall_ang = NORM_ANGLE(getangle(wall[nw].x - wph->x, wall[nw].y - wph->y) + 512);
|
||||
|
@ -915,7 +915,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
if (!TEST(u->Flags, SPR_BOUNCE))
|
||||
{
|
||||
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
|
||||
SET(u->Flags, SPR_BOUNCE);
|
||||
ScaleSpriteVector(actor, 32000); // was 18000
|
||||
u->zchange /= 6;
|
||||
|
@ -927,8 +927,8 @@ int DoChemBomb(DSWActor* actor)
|
|||
// Canister pops when first smoke starts out
|
||||
if (u->WaitTics == CHEMTICS && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_CHEMGAS, actor, v3df_dontpan | v3df_doppler);
|
||||
Set3DSoundOwner(actor->GetSpriteIndex());
|
||||
}
|
||||
SpawnRadiationCloud(actor);
|
||||
|
@ -962,7 +962,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
if (!TEST(u->Flags, SPR_BOUNCE))
|
||||
{
|
||||
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
|
||||
SET(u->Flags, SPR_BOUNCE);
|
||||
SetCollision(u, 0);
|
||||
u->Counter = 0;
|
||||
|
@ -975,8 +975,8 @@ int DoChemBomb(DSWActor* actor)
|
|||
// Canister pops when first smoke starts out
|
||||
if (u->WaitTics == CHEMTICS && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_CHEMGAS, actor, v3df_dontpan | v3df_doppler);
|
||||
Set3DSoundOwner(actor->GetSpriteIndex());
|
||||
}
|
||||
SpawnRadiationCloud(actor);
|
||||
|
@ -1078,7 +1078,7 @@ int DoCaltrops(DSWActor* actor)
|
|||
{
|
||||
short wall_ang;
|
||||
|
||||
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CALTROPS, actor, v3df_dontpan);
|
||||
|
||||
auto hitActor = u->coll.actor;
|
||||
auto hsp = &hitActor->s();
|
||||
|
@ -1111,7 +1111,7 @@ int DoCaltrops(DSWActor* actor)
|
|||
break;
|
||||
}
|
||||
|
||||
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CALTROPS, actor, v3df_dontpan);
|
||||
|
||||
int nw = wall[hit_wall].point2;
|
||||
int wall_ang = NORM_ANGLE(getangle(wall[nw].x - wph->x, wall[nw].y - wph->y) + 512);
|
||||
|
@ -1142,7 +1142,7 @@ int DoCaltrops(DSWActor* actor)
|
|||
// hit a floor
|
||||
if (!TEST(u->Flags, SPR_BOUNCE))
|
||||
{
|
||||
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CALTROPS, actor, v3df_dontpan);
|
||||
SET(u->Flags, SPR_BOUNCE);
|
||||
ScaleSpriteVector(actor, 1000); // was 18000
|
||||
SetCollision(u, 0);
|
||||
|
@ -1179,7 +1179,7 @@ int DoCaltrops(DSWActor* actor)
|
|||
|
||||
if (!TEST(u->Flags, SPR_BOUNCE))
|
||||
{
|
||||
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_CALTROPS, actor, v3df_dontpan);
|
||||
SET(u->Flags, SPR_BOUNCE);
|
||||
SetCollision(u, 0);
|
||||
u->Counter = 0;
|
||||
|
@ -1408,7 +1408,7 @@ int InitSpriteChemBomb(DSWActor* actor)
|
|||
int nx, ny, nz;
|
||||
|
||||
|
||||
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_THROW, actor, v3df_dontpan | v3df_doppler);
|
||||
|
||||
nx = sp->x;
|
||||
ny = sp->y;
|
||||
|
@ -1603,7 +1603,7 @@ InitFlashBomb(DSWActor* actor)
|
|||
USERp hu;
|
||||
PLAYERp pp = Player + screenpeek;
|
||||
|
||||
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler);
|
||||
|
||||
for (stat = 0; stat < SIZ(StatDamageList); stat++)
|
||||
{
|
||||
|
@ -1823,7 +1823,7 @@ int InitCaltrops(DSWActor* actor)
|
|||
int nx, ny, nz;
|
||||
|
||||
|
||||
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
|
||||
PlaySound(DIGI_THROW, actor, v3df_dontpan | v3df_doppler);
|
||||
|
||||
nx = sp->x;
|
||||
ny = sp->y;
|
||||
|
@ -1873,7 +1873,7 @@ int InitPhosphorus(DSWActor* actor)
|
|||
short daang;
|
||||
|
||||
|
||||
PlaySound(DIGI_FIREBALL1, sp, v3df_follow);
|
||||
PlaySound(DIGI_FIREBALL1, actor, v3df_follow);
|
||||
|
||||
nx = sp->x;
|
||||
ny = sp->y;
|
||||
|
@ -1938,11 +1938,11 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
|
|||
// {
|
||||
rnd = RandomRange(1000);
|
||||
if (rnd > 650)
|
||||
PlaySound(DIGI_GIBS1, sp, v3df_none);
|
||||
PlaySound(DIGI_GIBS1, actor, v3df_none);
|
||||
else if (rnd > 350)
|
||||
PlaySound(DIGI_GIBS2, sp, v3df_none);
|
||||
PlaySound(DIGI_GIBS2, actor, v3df_none);
|
||||
else
|
||||
PlaySound(DIGI_GIBS3, sp, v3df_none);
|
||||
PlaySound(DIGI_GIBS3, actor, v3df_none);
|
||||
// }
|
||||
|
||||
ang = sp->ang;
|
||||
|
@ -2148,7 +2148,7 @@ int DoCarryFlag(DSWActor* actor)
|
|||
}
|
||||
if (!TEST_BOOL1(fp))
|
||||
{
|
||||
PlaySound(DIGI_BIGITEM, ap, v3df_none);
|
||||
PlaySound(DIGI_BIGITEM, u->attachActor, v3df_none);
|
||||
DoFlagScore(ap->pal);
|
||||
if (SP_TAG5(fp) > 0)
|
||||
{
|
||||
|
@ -2179,55 +2179,55 @@ int DoCarryFlag(DSWActor* actor)
|
|||
case 0:
|
||||
if (u->WaitTics < SEC(30))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (u->WaitTics < SEC(20))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (u->WaitTics < SEC(10))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (u->WaitTics < SEC(5))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (u->WaitTics < SEC(4))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (u->WaitTics < SEC(3))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (u->WaitTics < SEC(2))
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2 = FLAG_DETONATE_STATE;
|
||||
}
|
||||
break;
|
||||
case FLAG_DETONATE_STATE:
|
||||
// start frantic beeping
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_dontpan);
|
||||
u->Counter2++;
|
||||
break;
|
||||
case FLAG_DETONATE_STATE + 1:
|
||||
|
@ -2288,7 +2288,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
|
|||
}
|
||||
if (!TEST_BOOL1(fp))
|
||||
{
|
||||
PlaySound(DIGI_BIGITEM, ap, v3df_none);
|
||||
PlaySound(DIGI_BIGITEM, u->attachActor, v3df_none);
|
||||
DoFlagScore(ap->pal);
|
||||
if (SP_TAG5(fp) > 0)
|
||||
{
|
||||
|
|
|
@ -168,11 +168,11 @@ int DoToiletGirl(DSWActor* actor)
|
|||
if (!SoundValidAndActive(sp, CHAN_ToiletFart))
|
||||
{
|
||||
if (choose_snd > 750)
|
||||
PlaySound(DIGI_TOILETGIRLFART1, sp, v3df_dontpan, CHAN_ToiletFart);
|
||||
PlaySound(DIGI_TOILETGIRLFART1, actor, v3df_dontpan, CHAN_ToiletFart);
|
||||
else if (choose_snd > 350)
|
||||
PlaySound(DIGI_TOILETGIRLFART2, sp, v3df_dontpan, CHAN_ToiletFart);
|
||||
PlaySound(DIGI_TOILETGIRLFART2, actor, v3df_dontpan, CHAN_ToiletFart);
|
||||
else
|
||||
PlaySound(DIGI_TOILETGIRLFART3, sp, v3df_dontpan, CHAN_ToiletFart);
|
||||
PlaySound(DIGI_TOILETGIRLFART3, actor, v3df_dontpan, CHAN_ToiletFart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -181,9 +181,9 @@ int DoToiletGirl(DSWActor* actor)
|
|||
if (!SoundValidAndActive(sp, CHAN_AnimeMad))
|
||||
{
|
||||
if (RandomRange(1000<<8)>>8 > 500)
|
||||
PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD1, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_ToiletGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
|
@ -226,9 +226,9 @@ int NullToiletGirl(DSWActor* actor)
|
|||
if (!SoundValidAndActive(sp, CHAN_AnimeMad))
|
||||
{
|
||||
if (RandomRange(1000<<8)>>8 > 500)
|
||||
PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD1, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_ToiletGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
|
@ -400,9 +400,9 @@ int DoWashGirl(DSWActor* actor)
|
|||
if (!SoundValidAndActive(sp, CHAN_AnimeSing))
|
||||
{
|
||||
if (RANDOM_P2(1024<<4)>>4 > 500)
|
||||
PlaySound(DIGI_ANIMESING1, sp, v3df_dontpan, CHAN_AnimeSing);
|
||||
PlaySound(DIGI_ANIMESING1, actor, v3df_dontpan, CHAN_AnimeSing);
|
||||
else
|
||||
PlaySound(DIGI_ANIMESING2, sp, v3df_dontpan, CHAN_AnimeSing);
|
||||
PlaySound(DIGI_ANIMESING2, actor, v3df_dontpan, CHAN_AnimeSing);
|
||||
}
|
||||
|
||||
ChangeState(actor,s_WashGirlStandScrub);
|
||||
|
@ -428,9 +428,9 @@ int DoWashGirl(DSWActor* actor)
|
|||
if (!SoundValidAndActive(sp, CHAN_AnimeMad))
|
||||
{
|
||||
if (RandomRange(1000<<8)>>8 > 500)
|
||||
PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD1, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_WashGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
|
@ -470,9 +470,9 @@ int NullWashGirl(DSWActor* actor)
|
|||
if (!SoundValidAndActive(sp, CHAN_AnimeMad))
|
||||
{
|
||||
if (RandomRange(1000<<8)>>8 > 500)
|
||||
PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD1, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_WashGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
|
@ -827,7 +827,7 @@ int PachinkoCheckWin(DSWActor* actor)
|
|||
}
|
||||
|
||||
ActorCoughItem(actor->GetSpriteIndex()); // I WON! I WON!
|
||||
PlaySound(DIGI_PALARM, sp, v3df_none);
|
||||
PlaySound(DIGI_PALARM, actor, v3df_none);
|
||||
|
||||
// Can't win any more now!
|
||||
SET_BOOL1(sp);
|
||||
|
@ -877,11 +877,11 @@ int Pachinko1Operate(DSWActor* actor)
|
|||
{
|
||||
rnd = RandomRange(1000); // TEMP SOUNDS: Need pachinko sounds!
|
||||
if (rnd > 700)
|
||||
PlaySound(DIGI_PROLL1, sp, v3df_none);
|
||||
PlaySound(DIGI_PROLL1, actor, v3df_none);
|
||||
else if (rnd > 400)
|
||||
PlaySound(DIGI_PROLL2, sp, v3df_none);
|
||||
PlaySound(DIGI_PROLL2, actor, v3df_none);
|
||||
else
|
||||
PlaySound(DIGI_PROLL3, sp, v3df_none);
|
||||
PlaySound(DIGI_PROLL3, actor, v3df_none);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1276,13 +1276,13 @@ int DoCarGirl(DSWActor* actor)
|
|||
choose = RandomRange(1000);
|
||||
|
||||
if (choose > 750)
|
||||
PlaySound(DIGI_LANI049, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI049, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI051, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI051, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI052, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI052, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI054, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI054, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_CarGirlUzi);
|
||||
u->WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8);
|
||||
|
@ -1329,13 +1329,13 @@ int NullCarGirl(DSWActor* actor)
|
|||
choose = RandomRange(1000);
|
||||
|
||||
if (choose > 750)
|
||||
PlaySound(DIGI_LANI049, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI049, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI051, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI051, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI052, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI052, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI054, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI054, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_CarGirlUzi);
|
||||
u->WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8);
|
||||
|
@ -1494,13 +1494,13 @@ int DoMechanicGirl(DSWActor* actor)
|
|||
choose = RandomRange(1000);
|
||||
|
||||
if (choose > 750)
|
||||
PlaySound(DIGI_LANI073, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI073, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI075, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI075, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI077, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI077, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI079, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI079, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_MechanicGirlDrill);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8);
|
||||
|
@ -1547,13 +1547,13 @@ int NullMechanicGirl(DSWActor* actor)
|
|||
choose = RandomRange(1000);
|
||||
|
||||
if (choose > 750)
|
||||
PlaySound(DIGI_LANI073, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI073, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI075, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI075, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI077, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI077, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI079, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI079, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_MechanicGirlDrill);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8);
|
||||
|
@ -1716,14 +1716,14 @@ int DoSailorGirl(DSWActor* actor)
|
|||
{
|
||||
ActorCoughItem(actor->GetSpriteIndex());
|
||||
alreadythrew++;
|
||||
PlaySound(DIGI_LANI060, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI060, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI063, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI063, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI065, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI065, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI066, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI066, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_SailorGirlThrow);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
|
@ -1774,14 +1774,14 @@ int NullSailorGirl(DSWActor* actor)
|
|||
{
|
||||
ActorCoughItem(actor->GetSpriteIndex());
|
||||
alreadythrew++;
|
||||
PlaySound(DIGI_LANI060, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI060, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI063, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI063, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI065, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI065, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI066, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI066, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_SailorGirlThrow);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
|
@ -1924,13 +1924,13 @@ int DoPruneGirl(DSWActor* actor)
|
|||
choose = STD_RANDOM_RANGE(1000);
|
||||
|
||||
if (choose > 750)
|
||||
PlaySound(DIGI_LANI089, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI089, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI091, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI091, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI093, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI093, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI095, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI095, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
|
@ -1944,13 +1944,13 @@ int DoPruneGirl(DSWActor* actor)
|
|||
choose = STD_RANDOM_RANGE(1000);
|
||||
|
||||
if (choose > 990)
|
||||
PlaySound(DIGI_PRUNECACKLE, sp, v3df_dontpan, CHAN_CoyHandle);
|
||||
PlaySound(DIGI_PRUNECACKLE, actor, v3df_dontpan, CHAN_CoyHandle);
|
||||
else if (choose > 985)
|
||||
PlaySound(DIGI_PRUNECACKLE2, sp, v3df_dontpan, CHAN_CoyHandle);
|
||||
PlaySound(DIGI_PRUNECACKLE2, actor, v3df_dontpan, CHAN_CoyHandle);
|
||||
else if (choose > 980)
|
||||
PlaySound(DIGI_PRUNECACKLE3, sp, v3df_dontpan, CHAN_CoyHandle);
|
||||
PlaySound(DIGI_PRUNECACKLE3, actor, v3df_dontpan, CHAN_CoyHandle);
|
||||
else if (choose > 975)
|
||||
PlaySound(DIGI_LANI091, sp, v3df_dontpan, CHAN_CoyHandle);
|
||||
PlaySound(DIGI_LANI091, actor, v3df_dontpan, CHAN_CoyHandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1993,13 +1993,13 @@ int NullPruneGirl(DSWActor* actor)
|
|||
choose = RandomRange(1000);
|
||||
|
||||
if (choose > 750)
|
||||
PlaySound(DIGI_LANI089, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI089, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 500)
|
||||
PlaySound(DIGI_LANI091, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI091, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else if (choose > 250)
|
||||
PlaySound(DIGI_LANI093, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI093, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
else
|
||||
PlaySound(DIGI_LANI095, sp, v3df_dontpan, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_LANI095, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
|
|
|
@ -1954,7 +1954,7 @@ int DoNinjaHariKari(DSWActor* actor)
|
|||
SET(sp->extra, SPRX_BREAKABLE);
|
||||
SET(sp->cstat, CSTAT_SPRITE_BREAKABLE);
|
||||
|
||||
PlaySound(DIGI_NINJAUZIATTACK, sp, v3df_follow);
|
||||
PlaySound(DIGI_NINJAUZIATTACK, actor, v3df_follow);
|
||||
|
||||
SpawnBlood(actor, actor, -1, -1, -1, -1);
|
||||
|
||||
|
@ -1991,7 +1991,7 @@ int DoNinjaGrabThroat(DSWActor* actor)
|
|||
sp->xvel = 0;
|
||||
//u->jump_speed = -300;
|
||||
//DoActorBeginJump(actor);
|
||||
PlaySound(DIGI_NINJASCREAM, sp, v3df_follow);
|
||||
PlaySound(DIGI_NINJASCREAM, actor, v3df_follow);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -258,7 +258,7 @@ int SpawnQuake(short sectnum, int x, int y, int z,
|
|||
QUAKE_AngAmt(sp) = 8;
|
||||
QUAKE_PosAmt(sp) = 0;
|
||||
|
||||
PlaySound(DIGI_ERUPTION, sp, v3df_follow|v3df_dontpan);
|
||||
PlaySound(DIGI_ERUPTION, actorNew, v3df_follow|v3df_dontpan);
|
||||
Set3DSoundOwner(actorNew->GetSpriteIndex());
|
||||
|
||||
return actorNew->GetSpriteIndex();
|
||||
|
|
|
@ -1219,7 +1219,7 @@ int DoRipper2StandHeart(DSWActor* actor)
|
|||
NullRipper2(actor);
|
||||
|
||||
if (!SoundValidAndActive(sp, CHAN_RipHeart))
|
||||
PlaySound(DIGI_RIPPER2HEARTOUT, sp, v3df_none, CHAN_RipHeart);
|
||||
PlaySound(DIGI_RIPPER2HEARTOUT, actor, v3df_none, CHAN_RipHeart);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
NewStateGroup(actor, sg_Ripper2Run);
|
||||
|
@ -1337,7 +1337,7 @@ int ChestRipper2(DSWActor* actor)
|
|||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
PlaySound(DIGI_RIPPER2CHEST, sp, v3df_follow);
|
||||
PlaySound(DIGI_RIPPER2CHEST, actor, v3df_follow);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1201,7 +1201,7 @@ void DoSoundSpotMatch(short match, short sound_num, short sound_type)
|
|||
}
|
||||
else
|
||||
{
|
||||
PlaySound(snd2play, sp, flags);
|
||||
PlaySound(snd2play, actor, flags);
|
||||
|
||||
Set3DSoundOwner(actor->GetSpriteIndex());
|
||||
}
|
||||
|
@ -1680,7 +1680,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
// Don't mess with it if it's already going
|
||||
if (u->WaitTics > 0) return true;
|
||||
|
||||
PlaySound(DIGI_PFLIP, sp, v3df_none);
|
||||
PlaySound(DIGI_PFLIP, actor, v3df_none);
|
||||
u->WaitTics = SEC(3) + SEC(RandomRange(10));
|
||||
ChangeState(actor,s_Pachinko1Operate);
|
||||
|
||||
|
@ -1691,7 +1691,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
// Don't mess with it if it's already going
|
||||
if (u->WaitTics > 0) return true;
|
||||
|
||||
PlaySound(DIGI_PFLIP, sp, v3df_none);
|
||||
PlaySound(DIGI_PFLIP, actor, v3df_none);
|
||||
u->WaitTics = SEC(3) + SEC(RandomRange(10));
|
||||
ChangeState(actor,s_Pachinko2Operate);
|
||||
|
||||
|
@ -1702,7 +1702,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
// Don't mess with it if it's already going
|
||||
if (u->WaitTics > 0) return true;
|
||||
|
||||
PlaySound(DIGI_PFLIP, sp, v3df_none);
|
||||
PlaySound(DIGI_PFLIP, actor, v3df_none);
|
||||
u->WaitTics = SEC(3) + SEC(RandomRange(10));
|
||||
ChangeState(actor,s_Pachinko3Operate);
|
||||
|
||||
|
@ -1713,7 +1713,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
// Don't mess with it if it's already going
|
||||
if (u->WaitTics > 0) return true;
|
||||
|
||||
PlaySound(DIGI_PFLIP, sp, v3df_none);
|
||||
PlaySound(DIGI_PFLIP, actor, v3df_none);
|
||||
u->WaitTics = SEC(3) + SEC(RandomRange(10));
|
||||
ChangeState(actor,s_Pachinko4Operate);
|
||||
|
||||
|
@ -1738,7 +1738,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
|
||||
// change the switch state
|
||||
AnimateSwitch(sp, -1);
|
||||
PlaySound(DIGI_REGULARSWITCH, sp, v3df_none);
|
||||
PlaySound(DIGI_REGULARSWITCH, actor, v3df_none);
|
||||
|
||||
if (ComboSwitchTest(TAG_COMBO_SWITCH_EVERYTHING, sp->hitag))
|
||||
{
|
||||
|
@ -1751,7 +1751,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
|
||||
// change the switch state
|
||||
AnimateSwitch(sp, -1);
|
||||
PlaySound(DIGI_REGULARSWITCH, sp, v3df_none);
|
||||
PlaySound(DIGI_REGULARSWITCH, actor, v3df_none);
|
||||
|
||||
if (ComboSwitchTest(TAG_COMBO_SWITCH_EVERYTHING, sp->hitag))
|
||||
{
|
||||
|
@ -1803,7 +1803,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
{
|
||||
AnimateSwitch(sp, -1);
|
||||
|
||||
PlaySound(DIGI_BIGSWITCH, sp, v3df_none);
|
||||
PlaySound(DIGI_BIGSWITCH, actor, v3df_none);
|
||||
|
||||
MapRecord *map;
|
||||
if (sp->hitag)
|
||||
|
@ -1852,7 +1852,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
sp->hitag = 0;
|
||||
sp->lotag = 0;
|
||||
|
||||
PlaySound(DIGI_REGULARSWITCH, sp, v3df_none);
|
||||
PlaySound(DIGI_REGULARSWITCH, actor, v3df_none);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1872,7 +1872,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
|
||||
sop->ang_tgt = NORM_ANGLE(sop->ang_tgt + 512);
|
||||
|
||||
PlaySound(DIGI_BIGSWITCH, sp, v3df_none);
|
||||
PlaySound(DIGI_BIGSWITCH, actor, v3df_none);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -2371,7 +2371,7 @@ int DoPlayerGrabStar(PLAYERp pp)
|
|||
{
|
||||
// Pull a star out of wall and up your ammo
|
||||
PlayerUpdateAmmo(pp, WPN_STAR, 1);
|
||||
PlaySound(DIGI_ITEM, sp, v3df_none);
|
||||
PlaySound(DIGI_ITEM, StarQueue[i], v3df_none);
|
||||
KillActor(StarQueue[i]);
|
||||
StarQueue[i] = nullptr;
|
||||
if (TEST(pp->WpnFlags, BIT(WPN_STAR)))
|
||||
|
|
|
@ -462,7 +462,7 @@ int DoSkullWait(DSWActor* actor)
|
|||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
PlaySound(DIGI_AHSCREAM, sp, v3df_none);
|
||||
PlaySound(DIGI_AHSCREAM, actor, v3df_none);
|
||||
u->WaitTics = SEC(3) + RandomRange(360);
|
||||
}
|
||||
|
||||
|
@ -864,7 +864,7 @@ int DoBettyWait(DSWActor* actor)
|
|||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
PlaySound(DIGI_MINEBEEP, sp, v3df_none);
|
||||
PlaySound(DIGI_MINEBEEP, actor, v3df_none);
|
||||
u->WaitTics = SEC(3);
|
||||
}
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ void StopAmbientSound(void)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void InitAmbient(int num, SPRITEp sp)
|
||||
void InitAmbient(int num, DSWActor* actor)
|
||||
{
|
||||
VOC_INFOp vp;
|
||||
int pitch = 0;
|
||||
|
@ -265,7 +265,7 @@ void InitAmbient(int num, SPRITEp sp)
|
|||
}
|
||||
|
||||
auto amb = new AmbientSound;
|
||||
amb->sp = sp;
|
||||
amb->sp = &actor->s();
|
||||
amb->ambIndex = num;
|
||||
amb->vocIndex = vnum;
|
||||
amb->ChanFlags = CHANF_TRANSIENT;
|
||||
|
@ -285,15 +285,13 @@ void InitAmbient(int num, SPRITEp sp)
|
|||
|
||||
void StartAmbientSound(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!SoundEnabled()) return;
|
||||
|
||||
StatIterator it(STAT_AMBIENT);
|
||||
while ((i = it.NextIndex()) >= 0)
|
||||
SWStatIterator it(STAT_AMBIENT);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
SPRITEp sp = &sprite[i];
|
||||
InitAmbient(sp->lotag, sp);
|
||||
SPRITEp sp = &actor->s();
|
||||
InitAmbient(sp->lotag, actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue