- changed SW's PlaySound interface to take pointers to objects instead of pointers to coordinates.

With pointers to coordinates the sound engine cannot work, so this had to be changed globally.
This commit is contained in:
Christoph Oelckers 2019-12-18 11:09:01 +01:00
parent a7075bc1b0
commit 75c76ccf66
35 changed files with 1076 additions and 1332 deletions

View file

@ -42,7 +42,7 @@ BEGIN_BLD_NS
class BloodSoundEngine : public SoundEngine
{
// client specific parts of the sound engine go in this class.
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel) override;
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan *channel) override;
TArray<uint8_t> ReadSound(int lumpnum);
public:
@ -75,7 +75,7 @@ TArray<uint8_t> BloodSoundEngine::ReadSound(int lumpnum)
return wlump.Read();
}
void BloodSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel)
void BloodSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan *)
{
if (pos != nullptr && type != SOURCE_None)
{

View file

@ -335,7 +335,7 @@ FString SoundEngine::ListSoundChannels()
void SoundEngine::CalcPosVel(FSoundChan *chan, FVector3 *pos, FVector3 *vel)
{
CalcPosVel(chan->SourceType, chan->Source, chan->Point, chan->EntChannel, chan->ChanFlags, chan->OrgID, pos, vel);
CalcPosVel(chan->SourceType, chan->Source, chan->Point, chan->EntChannel, chan->ChanFlags, chan->OrgID, pos, vel, chan);
}
bool SoundEngine::ValidatePosVel(const FSoundChan* const chan, const FVector3& pos, const FVector3& vel)
@ -397,7 +397,7 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source,
org_id = sound_id;
CalcPosVel(type, source, &pt->X, channel, chanflags, sound_id, &pos, &vel);
CalcPosVel(type, source, &pt->X, channel, chanflags, sound_id, &pos, &vel, nullptr);
if (!ValidatePosVel(type, source, pos, vel))
{

View file

@ -257,7 +257,7 @@ private:
bool IsChannelUsed(int sourcetype, const void* actor, int channel, int* seen);
// This is the actual sound positioning logic which needs to be provided by the client.
virtual void CalcPosVel(int type, const void* source, const float pt[3], int channel, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel) = 0;
virtual void CalcPosVel(int type, const void* source, const float pt[3], int channel, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan *chan) = 0;
// This can be overridden by the clent to provide some diagnostics. The default lets everything pass.
virtual bool ValidatePosVel(int sourcetype, const void* source, const FVector3& pos, const FVector3& vel) { return true; }

View file

@ -34,7 +34,7 @@ BEGIN_DUKE_NS
class DukeSoundEngine : public SoundEngine
{
// client specific parts of the sound engine go in this class.
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel) override;
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan *chan) override;
TArray<uint8_t> ReadSound(int lumpnum);
public:
@ -262,7 +262,7 @@ void S_GetCamera(vec3_t** c, int32_t* ca, int32_t* cs)
//
//=========================================================================
void DukeSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel)
void DukeSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan* )
{
if (pos != nullptr)
{

View file

@ -33,7 +33,7 @@ BEGIN_RR_NS
class DukeSoundEngine : public SoundEngine
{
// client specific parts of the sound engine go in this class.
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel) override;
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan* chan) override;
TArray<uint8_t> ReadSound(int lumpnum);
public:
@ -261,7 +261,7 @@ void S_GetCamera(vec3_t** c, int32_t* ca, int32_t* cs)
//
//=========================================================================
void DukeSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel)
void DukeSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan* chan)
{
if (pos != nullptr)
{

View file

@ -152,7 +152,7 @@ DoActorDie(short SpriteNum, short weapon)
SpawnBlood(SpriteNum, SpriteNum, -1, -1, -1, -1);
InitPlasmaFountain(wp, sp);
InitPlasmaFountain(wp, sp);
PlaySound(DIGI_NINJAINHALF,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_NINJAINHALF, sp, v3df_none);
if (sw_ninjahack)
ChangeState(SpriteNum, &s_NinjaDieSlicedHack[5]);
else
@ -830,11 +830,11 @@ DoActorStopFall(short SpriteNum)
if (TEST(u->Flags, SPR_DEAD))
{
NewStateGroup(SpriteNum, u->ActorActionSet->Dead);
PlaySound(DIGI_ACTORBODYFALL1,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_ACTORBODYFALL1, sp, v3df_none);
}
else
{
PlaySound(DIGI_ACTORHITGROUND,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_ACTORHITGROUND, sp, v3df_none);
NewStateGroup(SpriteNum, u->ActorActionSet->Run);

View file

@ -77,7 +77,7 @@ void AnimShareIntro(int frame, int numframes)
ototalclock += 120;
else if (frame == 1)
{
PlaySound(DIGI_NOMESSWITHWANG,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_NOMESSWITHWANG, v3df_none);
ototalclock += 120*3;
}
else
@ -85,11 +85,11 @@ void AnimShareIntro(int frame, int numframes)
if (frame == 5)
{
PlaySound(DIGI_INTRO_SLASH,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_INTRO_SLASH, v3df_none);
}
else if (frame == 15)
{
PlaySound(DIGI_INTRO_WHIRL,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_INTRO_WHIRL, v3df_none);
}
}
@ -103,26 +103,26 @@ void AnimSerp(int frame, int numframes)
if (frame == 1)
{
PlaySound(DIGI_SERPTAUNTWANG,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_SERPTAUNTWANG, v3df_none);
}
else if (frame == 16)
{
PlaySound(DIGI_SHAREND_TELEPORT,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_SHAREND_TELEPORT, v3df_none);
}
else if (frame == 35)
{
SoundState++;
PlaySound(DIGI_WANGTAUNTSERP1,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_WANGTAUNTSERP1, v3df_none);
}
else if (frame == 51)
{
SoundState++;
PlaySound(DIGI_SHAREND_UGLY1,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_SHAREND_UGLY1, v3df_none);
}
else if (frame == 64)
{
SoundState++;
PlaySound(DIGI_SHAREND_UGLY2,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_SHAREND_UGLY2, v3df_none);
}
}
@ -140,19 +140,19 @@ void AnimSumo(int frame, int numframes)
if (frame == 2)
{
// hungry
PlaySound(DIGI_JG41012,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_JG41012, v3df_none);
}
else if (frame == 30)
{
PlaySound(DIGI_HOTHEADSWITCH,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_HOTHEADSWITCH, v3df_none);
}
else if (frame == 42)
{
PlaySound(DIGI_HOTHEADSWITCH,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_HOTHEADSWITCH, v3df_none);
}
else if (frame == 59)
{
PlaySound(DIGI_JG41028,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_JG41028, v3df_none);
}
}
@ -166,61 +166,61 @@ void AnimZilla(int frame, int numframes)
if (frame == 1)
{
PlaySound(DIGI_ZC1,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC1, v3df_none);
}
else if (frame == 5)
{
PlaySound(DIGI_JG94024,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_JG94024, v3df_none);
}
else if (frame == 14)
{
PlaySound(DIGI_ZC2,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC2, v3df_none);
}
else if (frame == 30)
{
PlaySound(DIGI_ZC3,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC3, v3df_none);
}
else if (frame == 32)
{
PlaySound(DIGI_ZC4,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC4, v3df_none);
}
else if (frame == 37)
{
PlaySound(DIGI_ZC5,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC5, v3df_none);
}
else if (frame == 63)
{
PlaySound(DIGI_Z16043,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC6,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC7,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_Z16043, v3df_none);
PlaySound(DIGI_ZC6, v3df_none);
PlaySound(DIGI_ZC7, v3df_none);
}
else if (frame == 72)
{
PlaySound(DIGI_ZC7,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC7, v3df_none);
}
else if (frame == 73)
{
PlaySound(DIGI_ZC4,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC4, v3df_none);
}
else if (frame == 77)
{
PlaySound(DIGI_ZC5,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC5, v3df_none);
}
else if (frame == 87)
{
PlaySound(DIGI_ZC8,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC8, v3df_none);
}
else if (frame == 103)
{
PlaySound(DIGI_ZC7,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC7, v3df_none);
}
else if (frame == 108)
{
PlaySound(DIGI_ZC9,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_ZC9, v3df_none);
}
else if (frame == 120)
{
PlaySound(DIGI_JG94039,&zero,&zero,&zero,v3df_none);
PlaySound(DIGI_JG94039, v3df_none);
}
}

View file

@ -997,8 +997,8 @@ DoBunnyQuickJump(short SpriteNum)
{
if (u->spal == PALETTE_PLAYER8 && tu->spal == PALETTE_PLAYER8)
{
PlaySound(DIGI_BUNNYATTACK, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_BUNNYDIE2, &tsp->x, &tsp->y, &tsp->z, v3df_follow);
PlaySound(DIGI_BUNNYATTACK, sp, v3df_follow);
PlaySound(DIGI_BUNNYDIE2, tsp, v3df_follow);
tu->Health = 0;
// Blood fountains
@ -1060,7 +1060,7 @@ DoBunnyQuickJump(short SpriteNum)
{
choose_snd = STD_RANDOM_RANGE(2<<8)>>8;
if (FAFcansee(sp->x,sp->y,SPRITEp_TOS(sp),sp->sectnum,pp->posx, pp->posy, pp->posz, pp->cursectnum) && FACING(sp, u->tgt_sp))
PlayerSound(fagsnds[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_doppler|v3df_follow|v3df_dontpan,pp);
PlayerSound(fagsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
}
}
}
@ -1076,7 +1076,7 @@ DoBunnyQuickJump(short SpriteNum)
{
choose_snd = STD_RANDOM_RANGE(3<<8)>>8;
if (FAFcansee(sp->x,sp->y,SPRITEp_TOS(sp),sp->sectnum,pp->posx, pp->posy, pp->posz, pp->cursectnum) && FACING(sp, u->tgt_sp))
PlayerSound(straightsnds[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_doppler|v3df_follow|v3df_dontpan,pp);
PlayerSound(straightsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
}
}
}
@ -1171,7 +1171,7 @@ int DoBunnyStandKill(short SpriteNum)
// Growl like the bad ass bunny you are!
if (RANDOM_RANGE(1000) > 800)
PlaySound(DIGI_BUNNYATTACK,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_BUNNYATTACK, sp, v3df_none);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
NewStateGroup(SpriteNum, sg_BunnyRun);
@ -1488,7 +1488,7 @@ DoBunnyScrew(short SpriteNum)
if (RANDOM_RANGE(1000) > 990) // Bunny sex sounds
{
if (!adult_lockout && !Global_PLock)
PlaySound(DIGI_BUNNYATTACK, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_BUNNYATTACK, sp, v3df_follow);
}
u->WaitTics -= ACTORMOVETICS;
@ -1538,7 +1538,7 @@ DoBunnyGrowUp(short SpriteNum)
{
if (Bunny_Count < 20)
{
PlaySound(DIGI_BUNNYDIE2, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_BUNNYDIE2, sp, v3df_follow);
BunnyHatch(SpriteNum); // Baby time
}
u->ShellNum = 0; // Not pregnent anymore

View file

@ -407,11 +407,13 @@ void PreCacheSoundList(short table[], int num)
{
short j;
#if 0
for (j = 0; j < num; j++)
{
CacheSound(table[j], CACHE_SOUND_PRECACHE);
AnimateCacheCursor();
}
#endif
}
void

View file

@ -397,12 +397,12 @@ void EveryCheatToggle(PLAYERp pp, const char *cheat_string)
void GeorgeFunc(PLAYERp pp, char *)
{
PlayerSound(DIGI_TAUNTAI9,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_TAUNTAI9, v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
void BlackburnFunc(PLAYERp pp, char *)
{
PlayerSound(DIGI_TAUNTAI3,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_TAUNTAI3, v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
int cheatcmp(const char *str1, const char *str2, int len)

View file

@ -850,7 +850,7 @@ int DoCoolgMove(short SpriteNum)
u->ShellNum = SEC(2);
break;
case 1:
PlaySound(DIGI_VOID3, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_VOID3, sp, v3df_follow);
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
SET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
u->ShellNum = SEC(1) + SEC(RANDOM_RANGE(2));
@ -861,7 +861,7 @@ int DoCoolgMove(short SpriteNum)
u->ShellNum = SEC(2);
break;
case 3:
PlaySound(DIGI_VOID3, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_VOID3, sp, v3df_follow);
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
u->ShellNum = SEC(2) + SEC(RANDOM_RANGE(3));

View file

@ -662,7 +662,7 @@ int InitCoolieCharge(short SpriteNum)
USERp u = User[SpriteNum];
if (RANDOM_P2(1024) > 950)
PlaySound(DIGI_COOLIESCREAM, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_COOLIESCREAM, sp, v3df_follow);
DoActorSetSpeed(SpriteNum, FAST_SPEED);

View file

@ -108,9 +108,9 @@ public:
DidOrderSound = true;
int choose_snd = STD_RANDOM_RANGE(1000);
if (choose_snd > 500)
PlaySound(DIGI_WANGORDER1, &zero, &zero, &zero, v3df_dontpan);
PlaySound(DIGI_WANGORDER1, v3df_dontpan);
else
PlaySound(DIGI_WANGORDER2, &zero, &zero, &zero, v3df_dontpan);
PlaySound(DIGI_WANGORDER2, v3df_dontpan);
}
}
};
@ -178,15 +178,15 @@ void GameInterface::MenuSound(EMenuSounds snd)
switch (snd)
{
case CursorSound:
PlaySound(DIGI_STAR,&zero,&zero,&zero,v3df_dontpan);
PlaySound(DIGI_STAR, v3df_dontpan);
break;
case AdvanceSound:
PlaySound(DIGI_SWORDSWOOSH,&zero,&zero,&zero,v3df_dontpan);
PlaySound(DIGI_SWORDSWOOSH, v3df_dontpan);
break;
case CloseSound:
PlaySound(DIGI_STARCLINK,&zero,&zero,&zero,v3df_dontpan);
PlaySound(DIGI_STARCLINK, v3df_dontpan);
break;
default:
@ -237,13 +237,13 @@ void GameInterface::StartGame(FGameStartup& gs)
//InitNewGame();
if (Skill == 0)
handle = PlaySound(DIGI_TAUNTAI3,&zero,&zero,&zero,v3df_none);
handle = PlaySound(DIGI_TAUNTAI3, v3df_none);
else if (Skill == 1)
handle = PlaySound(DIGI_NOFEAR,&zero,&zero,&zero,v3df_none);
handle = PlaySound(DIGI_NOFEAR, v3df_none);
else if (Skill == 2)
handle = PlaySound(DIGI_WHOWANTSWANG,&zero,&zero,&zero,v3df_none);
handle = PlaySound(DIGI_WHOWANTSWANG, v3df_none);
else if (Skill == 3)
handle = PlaySound(DIGI_NOPAIN,&zero,&zero,&zero,v3df_none);
handle = PlaySound(DIGI_NOPAIN, v3df_none);
if (handle > FX_Ok)
while (FX_SoundActive(handle))

View file

@ -1604,7 +1604,7 @@ void CreditsLevel(void)
videoNextPage();
// Lo Wang feel like singing!
handle = PlaySound(DIGI_JG95012,&zero,&zero,&zero,v3df_none);
handle = PlaySound(DIGI_JG95012, v3df_none);
if (handle > 0)
while (FX_SoundActive(handle)) ;
@ -1614,7 +1614,7 @@ void CreditsLevel(void)
{
if (!PlaySong(nullptr, nullptr, 2, true))
{
handle = PlaySound(DIGI_NOLIKEMUSIC,&zero,&zero,&zero,v3df_none);
handle = PlaySound(DIGI_NOLIKEMUSIC, v3df_none);
if (handle > 0)
while (FX_SoundActive(handle)) handleevents();
return;
@ -2003,21 +2003,21 @@ void gStateControl(STATEp *State, int *tics)
int BonusPunchSound(short SpriteNum)
{
PLAYERp pp = Player + myconnectindex;
PlaySound(DIGI_PLAYERYELL3, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_PLAYERYELL3, pp, v3df_none);
return 0;
}
int BonusKickSound(short SpriteNum)
{
PLAYERp pp = Player + myconnectindex;
PlaySound(DIGI_PLAYERYELL2, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_PLAYERYELL2, pp, v3df_none);
return 0;
}
int BonusGrabSound(short SpriteNum)
{
PLAYERp pp = Player + myconnectindex;
PlaySound(DIGI_BONUS_GRAB, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_BONUS_GRAB, pp, v3df_none);
return 0;
}

View file

@ -2070,8 +2070,28 @@ SECT_USERp GetSectUser(short sectnum);
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, int *x, int *y, int *z, Voc3D_Flags flags);
void PlayerSound(int num, int *x, int *y, int *z, Voc3D_Flags flags, PLAYERp pp);
int _PlaySound(int num, SPRITEp sprite, PLAYERp player, vec3_t *pos, Voc3D_Flags flags);
inline int PlaySound(int num, SPRITEp sprite, Voc3D_Flags flags)
{
return _PlaySound(num, sprite, nullptr, nullptr, flags);
}
inline int PlaySound(int num, PLAYERp player, Voc3D_Flags flags)
{
return _PlaySound(num, nullptr, player, nullptr, flags);
}
inline int PlaySound(int num, Voc3D_Flags flags)
{
return _PlaySound(num, nullptr, nullptr, nullptr, flags);
}
inline int PlaySound(int num, vec3_t *pos, Voc3D_Flags flags)
{
return _PlaySound(num, nullptr, nullptr, pos, flags);
}
int _PlayerSound(int num, PLAYERp pp);
inline int PlayerSound(int num, int flags, PLAYERp pp) { return _PlayerSound(num, pp); }
void StopPlayerSound(PLAYERp pp);
ANIMATOR DoActorBeginJump,DoActorJump,DoActorBeginFall,DoActorFall,DoActorDeathMove;
@ -2274,9 +2294,6 @@ extern void DoPaletteFlash(PLAYERp pp);
extern unsigned char palette_data[256][3];
extern SWBOOL NightVision;
int _PlayerSound(int num, PLAYERp pp);
inline int PlayerSound(int num, int x, int y, int z, int flags, PLAYERp pp) { return _PlayerSound(num, pp); }
void StopPlayerSound(PLAYERp pp);
#define MAXSO (INT32_MAX)

View file

@ -328,7 +328,7 @@ SetupHornet(short SpriteNum)
sp->yrepeat = 32;
// Special looping buzz sound attached to each hornet spawned
PlaySound(DIGI_HORNETBUZZ,&sp->x,&sp->y,&sp->z,v3df_follow|v3df_init);
PlaySound(DIGI_HORNETBUZZ, sp, v3df_follow|v3df_init);
Set3DSoundOwner(SpriteNum);
return 0;

View file

@ -339,9 +339,9 @@ void UseInventoryMedkit(PLAYERp pp)
if (pp == Player+myconnectindex)
{
if (amt >= 30)
PlayerSound(DIGI_GETMEDKIT,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_GETMEDKIT, v3df_follow|v3df_dontpan,pp);
else
PlayerSound(DIGI_AHH,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_AHH, v3df_follow|v3df_dontpan,pp);
}
}
@ -431,13 +431,13 @@ void UseInventoryRepairKit(PLAYERp pp)
SPRITEp sp = pp->SpriteP;
short inv = INVENTORY_REPAIR_KIT;
//PlaySound(DIGI_TOOLBOX, &pp->posx, &pp->posy, &pp->posz, v3df_none);
//PlaySound(DIGI_TOOLBOX, pp, v3df_none);
if (pp == Player + myconnectindex)
{
if (STD_RANDOM_RANGE(1000) > 500)
PlayerSound(DIGI_NOREPAIRMAN,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_NOREPAIRMAN, v3df_follow|v3df_dontpan,pp);
else
PlayerSound(DIGI_NOREPAIRMAN2,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_NOREPAIRMAN2, v3df_follow|v3df_dontpan,pp);
}
pp->InventoryPercent[inv] = 0;
@ -475,10 +475,10 @@ void UseInventoryCloak(PLAYERp pp)
SET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
sp->shade = 100;
PlaySound(DIGI_GASPOP, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_GASPOP, pp, v3df_none);
//if(RANDOM_RANGE(1000) > 950)
if (pp == Player+myconnectindex)
PlayerSound(DIGI_IAMSHADOW,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_IAMSHADOW, v3df_follow|v3df_dontpan,pp);
}
void StopInventoryCloak(PLAYERp pp, short InventoryNum)
@ -500,7 +500,7 @@ void StopInventoryCloak(PLAYERp pp, short InventoryNum)
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
sp->shade = 0;
PlaySound(DIGI_GASPOP, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_GASPOP, pp, v3df_none);
}
//////////////////////////////////////////////////////////////////////
@ -540,7 +540,7 @@ void StopInventoryEnvironSuit(PLAYERp pp, short InventoryNum)
// on/off
PlayerUpdateInventory(pp, InventoryNum);
PlaySound(DIGI_SWCLOAKUNCLOAK, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_SWCLOAKUNCLOAK, pp, v3df_none);
}
#endif
@ -600,7 +600,7 @@ UseInventoryNightVision(PLAYERp pp)
PlayerUpdateInventory(pp, pp->InventoryNum);
DoPlayerNightVisionPalette(pp);
PlaySound(DIGI_NIGHTON, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow);
PlaySound(DIGI_NIGHTON, pp, v3df_dontpan|v3df_follow);
}
void
@ -624,7 +624,7 @@ StopInventoryNightVision(PLAYERp pp, short InventoryNum)
DoPlayerNightVisionPalette(pp);
DoPlayerDivePalette(pp);
PlaySound(DIGI_NIGHTOFF, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow);
PlaySound(DIGI_NIGHTOFF, pp, v3df_dontpan|v3df_follow);
}
//////////////////////////////////////////////////////////////////////

View file

@ -99,7 +99,7 @@ void SpawnWallSound(short sndnum, short i)
setspritez(SpriteNum, &mid);
sp = &sprite[SpriteNum];
handle = PlaySound(sndnum, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
handle = PlaySound(sndnum, sp, v3df_dontpan | v3df_doppler);
if (handle != -1)
Set3DSoundOwner(SpriteNum);
}
@ -217,7 +217,7 @@ JS_SpriteSetup(void)
else if (tag == AMBIENT_SOUND)
{
change_sprite_stat(SpriteNum, STAT_AMBIENT);
// PlaySound(sp->lotag, &sp->x, &sp->y, &sp->z, v3df_ambient
// PlaySound(sp->lotag, sp, v3df_ambient
// | v3df_init | v3df_doppler);
}
else if (tag == TAG_ECHO_SOUND)
@ -250,18 +250,18 @@ JS_SpriteSetup(void)
case 2720:
case 3143:
case 3157:
handle = PlaySound(DIGI_FIRE1, &sp->x, &sp->y, &sp->z, v3df_follow|v3df_dontpan|v3df_doppler);
handle = PlaySound(DIGI_FIRE1, sp, v3df_follow|v3df_dontpan|v3df_doppler);
if (handle != -1)
Set3DSoundOwner(SpriteNum);
break;
case 795:
case 880:
handle = PlaySound(DIGI_WATERFLOW1, &sp->x, &sp->y, &sp->z, v3df_follow|v3df_dontpan|v3df_doppler);
handle = PlaySound(DIGI_WATERFLOW1, sp, v3df_follow|v3df_dontpan|v3df_doppler);
if (handle != -1)
Set3DSoundOwner(SpriteNum);
break;
case 460: // Wind Chimes
handle = PlaySound(79, &sp->x, &sp->y, &sp->z, v3df_ambient | v3df_init
handle = PlaySound(79, sp, v3df_ambient | v3df_init
| v3df_doppler | v3df_follow);
if (handle != -1)
Set3DSoundOwner(SpriteNum);
@ -1353,7 +1353,7 @@ UnlockKeyLock(short key_num, short hit_sprite)
case SKEL_LOCKED:
if (sp->pal == color)
{
PlaySound(DIGI_UNLOCK, &sp->x, &sp->y, &sp->z, v3df_doppler | v3df_dontpan);
PlaySound(DIGI_UNLOCK, sp, v3df_doppler | v3df_dontpan);
if (SpriteNum == hit_sprite)
sp->picnum = SKEL_UNLOCKED;
}
@ -1361,14 +1361,14 @@ UnlockKeyLock(short key_num, short hit_sprite)
case RAMCARD_LOCKED:
if (sp->pal == color)
{
PlaySound(DIGI_CARDUNLOCK, &sp->x, &sp->y, &sp->z, v3df_doppler | v3df_dontpan);
PlaySound(DIGI_CARDUNLOCK, sp, v3df_doppler | v3df_dontpan);
sp->picnum = RAMCARD_UNLOCKED;
}
break;
case CARD_LOCKED:
if (sp->pal == color)
{
PlaySound(DIGI_RAMUNLOCK, &sp->x, &sp->y, &sp->z, v3df_doppler | v3df_dontpan);
PlaySound(DIGI_RAMUNLOCK, sp, v3df_doppler | v3df_dontpan);
if (SpriteNum == hit_sprite)
sp->picnum = CARD_UNLOCKED;
else

View file

@ -874,7 +874,7 @@ DoChemBomb(int16_t Weapon)
SPRITEp hsp;
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
hit_sprite = NORM_SPRITE(u->ret);
hsp = &sprite[hit_sprite];
@ -890,8 +890,8 @@ DoChemBomb(int16_t Weapon)
// Canister pops when first smoke starts out
if (u->WaitTics == CHEMTICS && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
{
PlaySound(DIGI_GASPOP, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_CHEMGAS, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
Set3DSoundOwner(Weapon);
}
u->xchange = u->ychange = 0;
@ -921,7 +921,7 @@ DoChemBomb(int16_t Weapon)
}
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
nw = wall[hit_wall].point2;
wall_ang = NORM_ANGLE(getangle(wall[nw].x - wph->x, wall[nw].y - wph->y) + 512);
@ -953,7 +953,7 @@ DoChemBomb(int16_t Weapon)
if (!TEST(u->Flags, SPR_BOUNCE))
{
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
SET(u->Flags, SPR_BOUNCE);
ScaleSpriteVector(Weapon, 32000); // was 18000
u->zchange /= 6;
@ -965,8 +965,8 @@ DoChemBomb(int16_t Weapon)
// Canister pops when first smoke starts out
if (u->WaitTics == CHEMTICS && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
{
PlaySound(DIGI_GASPOP, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_CHEMGAS, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
Set3DSoundOwner(Weapon);
}
SpawnRadiationCloud(Weapon);
@ -1000,7 +1000,7 @@ DoChemBomb(int16_t Weapon)
if (!TEST(u->Flags, SPR_BOUNCE))
{
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CHEMBOUNCE, sp, v3df_dontpan);
SET(u->Flags, SPR_BOUNCE);
u->ret = 0;
u->Counter = 0;
@ -1013,8 +1013,8 @@ DoChemBomb(int16_t Weapon)
// Canister pops when first smoke starts out
if (u->WaitTics == CHEMTICS && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
{
PlaySound(DIGI_GASPOP, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_CHEMGAS, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
Set3DSoundOwner(Weapon);
}
// WeaponMoveHit(Weapon);
@ -1132,7 +1132,7 @@ DoCaltrops(int16_t Weapon)
short hit_sprite;
SPRITEp hsp;
PlaySound(DIGI_CALTROPS, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
hit_sprite = NORM_SPRITE(u->ret);
hsp = &sprite[hit_sprite];
@ -1168,7 +1168,7 @@ DoCaltrops(int16_t Weapon)
break;
}
PlaySound(DIGI_CALTROPS, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
nw = wall[hit_wall].point2;
wall_ang = NORM_ANGLE(getangle(wall[nw].x - wph->x, wall[nw].y - wph->y) + 512);
@ -1199,7 +1199,7 @@ DoCaltrops(int16_t Weapon)
// hit a floor
if (!TEST(u->Flags, SPR_BOUNCE))
{
PlaySound(DIGI_CALTROPS, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
SET(u->Flags, SPR_BOUNCE);
ScaleSpriteVector(Weapon, 1000); // was 18000
u->ret = 0;
@ -1236,7 +1236,7 @@ DoCaltrops(int16_t Weapon)
if (!TEST(u->Flags, SPR_BOUNCE))
{
PlaySound(DIGI_CALTROPS, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_CALTROPS, sp, v3df_dontpan);
SET(u->Flags, SPR_BOUNCE);
u->ret = 0;
u->Counter = 0;
@ -1387,7 +1387,7 @@ PlayerInitChemBomb(PLAYERp pp)
int dist;
PlaySound(DIGI_THROW, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
if (pp->cursectnum < 0)
return 0;
@ -1474,7 +1474,7 @@ InitSpriteChemBomb(int16_t SpriteNum)
int dist;
PlaySound(DIGI_THROW, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
nx = sp->x;
ny = sp->y;
@ -1606,7 +1606,7 @@ PlayerInitFlashBomb(PLAYERp pp)
SPRITEp sp = pp->SpriteP, hp;
USERp u = User[pp->PlayerSprite], hu;
PlaySound(DIGI_GASPOP, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_GASPOP, pp, v3df_dontpan | v3df_doppler);
// Set it just a little to let player know what he just did
SetFadeAmt(pp, -30, 1); // White flash
@ -1650,8 +1650,7 @@ PlayerInitFlashBomb(PLAYERp pp)
choosesnd = RANDOM_RANGE(MAX_PAIN);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],&pp->posx,
&pp->posy,&pp->posy,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
SetFadeAmt(hu->PlayerP, damage, 1); // White flash
}
@ -1677,7 +1676,7 @@ InitFlashBomb(int16_t SpriteNum)
USERp u = User[SpriteNum], hu;
PLAYERp pp = Player + screenpeek;
PlaySound(DIGI_GASPOP, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
for (stat = 0; stat < SIZ(StatDamageList); stat++)
{
@ -1710,8 +1709,7 @@ InitFlashBomb(int16_t SpriteNum)
choosesnd = RANDOM_RANGE(MAX_PAIN);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],&pp->posx,
&pp->posy,&pp->posy,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
SetFadeAmt(hu->PlayerP, damage, 1); // White flash
}
@ -1835,7 +1833,7 @@ PlayerInitCaltrops(PLAYERp pp)
int dist;
PlaySound(DIGI_THROW, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
if (pp->cursectnum < 0)
return 0;
@ -1920,7 +1918,7 @@ InitCaltrops(int16_t SpriteNum)
int dist;
PlaySound(DIGI_THROW, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
nx = sp->x;
ny = sp->y;
@ -1973,7 +1971,7 @@ InitPhosphorus(int16_t SpriteNum)
int dist;
PlaySound(DIGI_FIREBALL1, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_FIREBALL1, sp, v3df_follow);
nx = sp->x;
ny = sp->y;
@ -2042,11 +2040,11 @@ InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity)
// {
rnd = RANDOM_RANGE(1000);
if (rnd > 650)
PlaySound(DIGI_GIBS1, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_GIBS1, sp, v3df_none);
else if (rnd > 350)
PlaySound(DIGI_GIBS2, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_GIBS2, sp, v3df_none);
else
PlaySound(DIGI_GIBS3, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_GIBS3, sp, v3df_none);
// }
ang = sp->ang;
@ -2265,7 +2263,7 @@ DoCarryFlag(int16_t Weapon)
}
if (!TEST_BOOL1(fp))
{
PlaySound(DIGI_BIGITEM, &ap->x, &ap->y, &ap->z, v3df_none);
PlaySound(DIGI_BIGITEM, ap, v3df_none);
DoFlagScore(ap->pal);
if (SP_TAG5(fp) > 0)
{
@ -2296,55 +2294,55 @@ DoCarryFlag(int16_t Weapon)
case 0:
if (u->WaitTics < SEC(30))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
}
break;
case 1:
if (u->WaitTics < SEC(20))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
}
break;
case 2:
if (u->WaitTics < SEC(10))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
}
break;
case 3:
if (u->WaitTics < SEC(5))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
}
break;
case 4:
if (u->WaitTics < SEC(4))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
}
break;
case 5:
if (u->WaitTics < SEC(3))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
}
break;
case 6:
if (u->WaitTics < SEC(2))
{
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2 = FLAG_DETONATE_STATE;
}
break;
case FLAG_DETONATE_STATE:
// start frantic beeping
PlaySound(DIGI_MINEBEEP, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan);
u->Counter2++;
break;
case FLAG_DETONATE_STATE + 1:
@ -2406,7 +2404,7 @@ DoCarryFlagNoDet(int16_t Weapon)
}
if (!TEST_BOOL1(fp))
{
PlaySound(DIGI_BIGITEM, &ap->x, &ap->y, &ap->z, v3df_none);
PlaySound(DIGI_BIGITEM, ap, v3df_none);
DoFlagScore(ap->pal);
if (SP_TAG5(fp) > 0)
{

View file

@ -176,11 +176,11 @@ int DoToiletGirl(short SpriteNum)
if (!FX_SoundValidAndActive(handle))
{
if (choose_snd > 750)
handle = PlaySound(DIGI_TOILETGIRLFART1,&sp->x,&sp->y,&sp->z,v3df_dontpan);
handle = PlaySound(DIGI_TOILETGIRLFART1, sp, v3df_dontpan);
else if (choose_snd > 350)
handle = PlaySound(DIGI_TOILETGIRLFART2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
handle = PlaySound(DIGI_TOILETGIRLFART2, sp, v3df_dontpan);
else
handle = PlaySound(DIGI_TOILETGIRLFART3,&sp->x,&sp->y,&sp->z,v3df_dontpan);
handle = PlaySound(DIGI_TOILETGIRLFART3, sp, v3df_dontpan);
}
}
}
@ -191,9 +191,9 @@ int DoToiletGirl(short SpriteNum)
if (!FX_SoundValidAndActive(madhandle))
{
if (RANDOM_RANGE(1000<<8)>>8 > 500)
madhandle = PlaySound(DIGI_ANIMEMAD1,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_ANIMEMAD2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_ToiletGirlUzi);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
@ -238,9 +238,9 @@ int NullToiletGirl(short SpriteNum)
if (!FX_SoundValidAndActive(madhandle))
{
if (RANDOM_RANGE(1000<<8)>>8 > 500)
madhandle = PlaySound(DIGI_ANIMEMAD1,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_ANIMEMAD2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_ToiletGirlUzi);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
@ -419,9 +419,9 @@ int DoWashGirl(short SpriteNum)
if (!FX_SoundValidAndActive(handle))
{
if (RANDOM_P2(1024<<4)>>4 > 500)
handle = PlaySound(DIGI_ANIMESING1,&sp->x,&sp->y,&sp->z,v3df_dontpan);
handle = PlaySound(DIGI_ANIMESING1, sp, v3df_dontpan);
else
handle = PlaySound(DIGI_ANIMESING2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
handle = PlaySound(DIGI_ANIMESING2, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_WashGirlStandScrub);
@ -449,9 +449,9 @@ int DoWashGirl(short SpriteNum)
if (!FX_SoundValidAndActive(madhandle))
{
if (RANDOM_RANGE(1000<<8)>>8 > 500)
madhandle = PlaySound(DIGI_ANIMEMAD1,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_ANIMEMAD2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_WashGirlUzi);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
@ -493,9 +493,9 @@ int NullWashGirl(short SpriteNum)
if (!FX_SoundValidAndActive(madhandle))
{
if (RANDOM_RANGE(1000<<8)>>8 > 500)
madhandle = PlaySound(DIGI_ANIMEMAD1,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD1, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_ANIMEMAD2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_WashGirlUzi);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
@ -857,7 +857,7 @@ int PachinkoCheckWin(short SpriteNum)
}
ActorCoughItem(SpriteNum); // I WON! I WON!
PlaySound(DIGI_PALARM,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PALARM, sp, v3df_none);
// Can't win any more now!
SET_BOOL1(sp);
@ -883,13 +883,13 @@ int PachinkoCheckWin(short SpriteNum)
//{
//if(rnd > 950)
// PlayerSound(DIGI_SHISEISI,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
// PlayerSound(DIGI_SHISEISI, pp, v3df_follow|v3df_dontpan,pp);
//else
//if(rnd > 900)
// PlayerSound(DIGI_YOULOOKSTUPID,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
// PlayerSound(DIGI_YOULOOKSTUPID, pp, v3df_follow|v3df_dontpan,pp);
//else
//if(rnd > 850)
// PlayerSound(DIGI_HURTBAD5,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
// PlayerSound(DIGI_HURTBAD5, pp, v3df_follow|v3df_dontpan,pp);
//}
return 0;
@ -907,11 +907,11 @@ int Pachinko1Operate(short SpriteNum)
{
rnd = RANDOM_RANGE(1000); // TEMP SOUNDS: Need pachinko sounds!
if (rnd > 700)
PlaySound(DIGI_PROLL1,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PROLL1, sp, v3df_none);
else if (rnd > 400)
PlaySound(DIGI_PROLL2,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PROLL2, sp, v3df_none);
else
PlaySound(DIGI_PROLL3,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PROLL3, sp, v3df_none);
}
return 0;
@ -1311,13 +1311,13 @@ int DoCarGirl(short SpriteNum)
choose = RANDOM_RANGE(1000);
if (choose > 750)
madhandle = PlaySound(DIGI_LANI049,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI049, sp, v3df_dontpan);
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI051,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI051, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI052,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI052, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI054,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI054, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_CarGirlUzi);
u->WaitTics = SEC(3)+SEC(RANDOM_RANGE(2<<8)>>8);
@ -1366,13 +1366,13 @@ int NullCarGirl(short SpriteNum)
choose = RANDOM_RANGE(1000);
if (choose > 750)
madhandle = PlaySound(DIGI_LANI049,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI049, sp, v3df_dontpan);
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI051,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI051, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI052,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI052, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI054,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI054, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_CarGirlUzi);
u->WaitTics = SEC(3)+SEC(RANDOM_RANGE(2<<8)>>8);
@ -1538,13 +1538,13 @@ int DoMechanicGirl(short SpriteNum)
choose = RANDOM_RANGE(1000);
if (choose > 750)
madhandle = PlaySound(DIGI_LANI073,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI073, sp, v3df_dontpan);
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI075,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI075, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI077,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI077, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI079,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI079, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_MechanicGirlDrill);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(2<<8)>>8);
@ -1593,13 +1593,13 @@ int NullMechanicGirl(short SpriteNum)
choose = RANDOM_RANGE(1000);
if (choose > 750)
madhandle = PlaySound(DIGI_LANI073,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI073, sp, v3df_dontpan);
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI075,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI075, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI077,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI077, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI079,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI079, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_MechanicGirlDrill);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(2<<8)>>8);
@ -1769,14 +1769,14 @@ int DoSailorGirl(short SpriteNum)
{
ActorCoughItem(SpriteNum);
alreadythrew++;
madhandle = PlaySound(DIGI_LANI060,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI060, sp, v3df_dontpan);
}
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI063,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI063, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI065,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI065, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI066,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI066, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_SailorGirlThrow);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
@ -1829,14 +1829,14 @@ int NullSailorGirl(short SpriteNum)
{
ActorCoughItem(SpriteNum);
alreadythrew++;
madhandle = PlaySound(DIGI_LANI060,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI060, sp, v3df_dontpan);
}
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI063,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI063, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI065,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI065, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI066,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI066, sp, v3df_dontpan);
}
ChangeState(SpriteNum,s_SailorGirlThrow);
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
@ -1984,13 +1984,13 @@ int DoPruneGirl(short SpriteNum)
choose = STD_RANDOM_RANGE(1000);
if (choose > 750)
madhandle = PlaySound(DIGI_LANI089,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI089, sp, v3df_dontpan);
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI091,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI091, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI093,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI093, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI095,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI095, sp, v3df_dontpan);
}
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
u->FlagOwner = 0;
@ -2004,13 +2004,13 @@ int DoPruneGirl(short SpriteNum)
choose = STD_RANDOM_RANGE(1000);
if (choose > 990)
coyhandle = PlaySound(DIGI_PRUNECACKLE,&sp->x,&sp->y,&sp->z,v3df_dontpan);
coyhandle = PlaySound(DIGI_PRUNECACKLE, sp, v3df_dontpan);
else if (choose > 985)
coyhandle = PlaySound(DIGI_PRUNECACKLE2,&sp->x,&sp->y,&sp->z,v3df_dontpan);
coyhandle = PlaySound(DIGI_PRUNECACKLE2, sp, v3df_dontpan);
else if (choose > 980)
coyhandle = PlaySound(DIGI_PRUNECACKLE3,&sp->x,&sp->y,&sp->z,v3df_dontpan);
coyhandle = PlaySound(DIGI_PRUNECACKLE3, sp, v3df_dontpan);
else if (choose > 975)
coyhandle = PlaySound(DIGI_LANI091,&sp->x,&sp->y,&sp->z,v3df_dontpan);
coyhandle = PlaySound(DIGI_LANI091, sp, v3df_dontpan);
}
}
@ -2055,13 +2055,13 @@ int NullPruneGirl(short SpriteNum)
choose = RANDOM_RANGE(1000);
if (choose > 750)
madhandle = PlaySound(DIGI_LANI089,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI089, sp, v3df_dontpan);
else if (choose > 500)
madhandle = PlaySound(DIGI_LANI091,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI091, sp, v3df_dontpan);
else if (choose > 250)
madhandle = PlaySound(DIGI_LANI093,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI093, sp, v3df_dontpan);
else
madhandle = PlaySound(DIGI_LANI095,&sp->x,&sp->y,&sp->z,v3df_dontpan);
madhandle = PlaySound(DIGI_LANI095, sp, v3df_dontpan);
}
u->WaitTics = SEC(1)+SEC(RANDOM_RANGE(3<<8)>>8);
u->FlagOwner = 0;

View file

@ -1425,7 +1425,7 @@ getpackets(void)
break;
}
PlaySound(DIGI_PMESSAGE,&tp->posx,&tp->posy,&tp->posz,v3df_dontpan);
PlaySound(DIGI_PMESSAGE,tp,v3df_dontpan);
memcpy(ds,&packbuf[3],packbufleng-3);
ds[packbufleng-3] = 0;

View file

@ -1965,7 +1965,7 @@ DoNinjaHariKari(short SpriteNum)
SET(sp->extra, SPRX_BREAKABLE);
SET(sp->cstat, CSTAT_SPRITE_BREAKABLE);
PlaySound(DIGI_NINJAUZIATTACK,&sp->x,&sp->y,&sp->z,v3df_follow);
PlaySound(DIGI_NINJAUZIATTACK, sp, v3df_follow);
SpawnBlood(SpriteNum, SpriteNum, -1, -1, -1, -1);
@ -2005,7 +2005,7 @@ DoNinjaGrabThroat(short SpriteNum)
sp->xvel = 0;
//u->jump_speed = -300;
//DoActorBeginJump(SpriteNum);
PlaySound(DIGI_NINJASCREAM,&sp->x,&sp->y,&sp->z,v3df_follow);
PlaySound(DIGI_NINJASCREAM, sp, v3df_follow);
}
return 0;

View file

@ -266,7 +266,7 @@ void DoPlayerChooseYell(PLAYERp pp)
choose_snd = STD_RANDOM_RANGE(MAX_YELLSOUNDS);
if (pp == Player+myconnectindex)
PlayerSound(PlayerYellVocs[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(PlayerYellVocs[choose_snd], v3df_follow|v3df_dontpan,pp);
}
void ArmorCalc(int damage_amt, int *armor_damage, int *player_damage)
@ -353,13 +353,11 @@ void PlayerUpdateHealth(PLAYERp pp, short value)
if (u->Health > 50)
{
PlayerSound(PlayerPainVocs[choosesnd],&pp->posx,
&pp->posy,&pp->posy,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(PlayerPainVocs[choosesnd],v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
else
{
PlayerSound(PlayerLowHealthPainVocs[choosesnd],&pp->posx,
&pp->posy,&pp->posy,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
}
@ -884,7 +882,7 @@ int WeaponOperate(PLAYERp pp)
if (TEST(pp->Flags, PF_TWO_UZI))
{
pp->WpnUziType++;
PlaySound(DIGI_UZI_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_UZI_UP, pp, v3df_follow);
if (pp->WpnUziType > 1)
pp->WpnUziType = 0;
}
@ -897,7 +895,7 @@ int WeaponOperate(PLAYERp pp)
if (u->WeaponNum == WPN_MICRO)
{
pp->WpnRocketType++;
PlaySound(DIGI_ROCKET_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_ROCKET_UP, pp, v3df_follow);
if (pp->WpnRocketType > 2)
pp->WpnRocketType = 0;
if (pp->WpnRocketType == 2 && pp->WpnRocketNuke == 0)
@ -915,7 +913,7 @@ int WeaponOperate(PLAYERp pp)
pp->WpnShotgunType++;
if (pp->WpnShotgunType > 1)
pp->WpnShotgunType = 0;
PlaySound(DIGI_SHOTGUN_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_SHOTGUN_UP, pp, v3df_follow);
}
InitWeaponShotgun(pp);
break;
@ -930,7 +928,7 @@ int WeaponOperate(PLAYERp pp)
pp->WpnRailType = 0;
}
if (pp->WpnRailType == 1)
PlaySound(DIGI_RAIL_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_RAIL_UP, pp, v3df_follow);
#endif
InitWeaponRail(pp);
}
@ -951,7 +949,7 @@ int WeaponOperate(PLAYERp pp)
pp->WpnFlameType = 0;
// if(pp->Wpn[WPN_HOTHEAD])
pHotHeadOverlays(pp->Wpn[WPN_HOTHEAD], pp->WpnFlameType);
PlaySound(DIGI_HOTHEADSWITCH, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow);
PlaySound(DIGI_HOTHEADSWITCH, pp, v3df_dontpan|v3df_follow);
}
InitWeaponHothead(pp);
@ -1349,19 +1347,19 @@ InitWeaponSword(PLAYERp pp)
psp->RestState = ps_SwordRest;
pSetState(psp, psp->PresentState);
PlaySound(DIGI_SWORD_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_SWORD_UP, pp, v3df_follow|v3df_dontpan);
if (pp == Player+myconnectindex)
{
rnd_num = STD_RANDOM_RANGE(1024);
if (rnd_num > 900)
PlaySound(DIGI_TAUNTAI2, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_TAUNTAI2, pp, v3df_follow|v3df_dontpan);
else if (rnd_num > 800)
PlaySound(DIGI_PLAYERYELL1, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_PLAYERYELL1, pp, v3df_follow|v3df_dontpan);
else if (rnd_num > 700)
PlaySound(DIGI_PLAYERYELL2, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_PLAYERYELL2, pp, v3df_follow|v3df_dontpan);
else if (rnd_num > 600)
PlayerSound(DIGI_ILIKESWORD,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_ILIKESWORD, v3df_follow|v3df_dontpan,pp);
}
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
@ -1820,11 +1818,11 @@ InitWeaponStar(PLAYERp pp)
//psp->RestState = ps_ThrowStar;
pSetState(psp, psp->PresentState);
PlaySound(DIGI_PULL, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_PULL, pp, v3df_follow|v3df_dontpan);
if (STD_RANDOM_RANGE(1000) > 900 && pp == Player+myconnectindex)
{
if (!sw_darts)
PlayerSound(DIGI_ILIKESHURIKEN,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_ILIKESHURIKEN, v3df_follow|v3df_dontpan,pp);
}
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
@ -2196,8 +2194,7 @@ pSpawnUziClip(PANEL_SPRITEp gun)
{
PANEL_SPRITEp New;
PlaySound(DIGI_REMOVECLIP, &gun->PlayerP->posx, &gun->PlayerP->posy,
&gun->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler|v3df_follow);
PlaySound(DIGI_REMOVECLIP, gun->PlayerP,v3df_follow|v3df_dontpan|v3df_doppler|v3df_follow);
if (TEST(gun->flags, PANF_XFLIP))
{
@ -2279,8 +2276,7 @@ pUziReload(PANEL_SPRITEp nclip)
{
if (nclip->x < gun->x)
{
PlaySound(DIGI_REPLACECLIP, &nclip->PlayerP->posx, &nclip->PlayerP->posy,
&nclip->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler);
PlaySound(DIGI_REPLACECLIP, nclip->PlayerP,v3df_follow|v3df_dontpan|v3df_doppler);
nclip->x = gun->x - UZI_CLIP_XOFF;
nclip->y = gun->y + UZI_CLIP_YOFF;
@ -2294,8 +2290,7 @@ pUziReload(PANEL_SPRITEp nclip)
{
if (nclip->x > gun->x)
{
PlaySound(DIGI_REPLACECLIP, &nclip->PlayerP->posx, &nclip->PlayerP->posy,
&nclip->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler);
PlaySound(DIGI_REPLACECLIP, nclip->PlayerP,v3df_follow|v3df_dontpan|v3df_doppler);
nclip->x = gun->x + UZI_CLIP_XOFF;
nclip->y = gun->y + UZI_CLIP_YOFF;
@ -2523,7 +2518,7 @@ InitWeaponUzi(PLAYERp pp)
InitWeaponUzi2(psp);
}
PlaySound(DIGI_UZI_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_UZI_UP, pp, v3df_follow);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
FLAG_KEY_RESET(psp->PlayerP, SK_SHOOT);
@ -3231,7 +3226,7 @@ InitWeaponShotgun(PLAYERp pp)
psp->RestState = ps_ShotgunRest;
pSetState(psp, psp->PresentState);
PlaySound(DIGI_SHOTGUN_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_SHOTGUN_UP, pp, v3df_follow);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
FLAG_KEY_RESET(psp->PlayerP, SK_SHOOT);
@ -3315,8 +3310,7 @@ pShotgunReloadDown(PANEL_SPRITEp psp)
if (psp->y >= SHOTGUN_YOFF + (tilesiz[picnum].y/2))
{
PlaySound(DIGI_ROCKET_UP, &psp->PlayerP->posx, &psp->PlayerP->posy,
&psp->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler);
PlaySound(DIGI_ROCKET_UP, psp->PlayerP,v3df_follow|v3df_dontpan|v3df_doppler);
psp->y = SHOTGUN_YOFF + (tilesiz[picnum].y/2);
@ -3333,8 +3327,7 @@ pShotgunReloadUp(PANEL_SPRITEp psp)
if (psp->y < SHOTGUN_YOFF)
{
PlaySound(DIGI_SHOTGUN_UP, &psp->PlayerP->posx, &psp->PlayerP->posy,
&psp->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler);
PlaySound(DIGI_SHOTGUN_UP, psp->PlayerP,v3df_follow|v3df_dontpan|v3df_doppler);
psp->y = SHOTGUN_YOFF;
@ -3746,8 +3739,8 @@ InitWeaponRail(PLAYERp pp)
psp->RestState = ps_RailRest;
pSetState(psp, psp->PresentState);
PlaySound(DIGI_RAIL_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
railvochandle = PlaySound(DIGI_RAILREADY, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_RAIL_UP, pp, v3df_follow);
railvochandle = PlaySound(DIGI_RAILREADY, pp, v3df_follow|v3df_dontpan);
Set3DSoundOwner(psp->PlayerP->PlayerSprite);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
@ -4206,7 +4199,7 @@ InitWeaponHothead(PLAYERp pp)
psp->over[0].xoff = HOTHEAD_FINGER_XOFF;
psp->over[0].yoff = HOTHEAD_FINGER_YOFF;
PlaySound(DIGI_GRDALERT, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_GRDALERT, pp, v3df_follow|v3df_dontpan);
}
void
@ -4649,7 +4642,7 @@ InitWeaponMicro(PLAYERp pp)
if (pp->WpnRocketType == 2 && !pp->InitingNuke && !pp->NukeInitialized)
pp->TestNukeInit = pp->InitingNuke = TRUE;
PlaySound(DIGI_ROCKET_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_ROCKET_UP, pp, v3df_follow);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
FLAG_KEY_RESET(psp->PlayerP, SK_SHOOT);
@ -4892,11 +4885,9 @@ pMicroRest(PANEL_SPRITEp psp)
{
choose_voc = STD_RANDOM_RANGE(1024);
if (choose_voc > 600)
PlayerSound(DIGI_TAUNTAI2,&psp->PlayerP->posx,
&psp->PlayerP->posy,&psp->PlayerP->posy,v3df_dontpan|v3df_follow,psp->PlayerP);
PlayerSound(DIGI_TAUNTAI2,v3df_dontpan|v3df_follow,psp->PlayerP);
else if (choose_voc > 300)
PlayerSound(DIGI_TAUNTAI4,&psp->PlayerP->posx,
&psp->PlayerP->posy,&psp->PlayerP->posy,v3df_dontpan|v3df_follow,psp->PlayerP);
PlayerSound(DIGI_TAUNTAI4,v3df_dontpan|v3df_follow,psp->PlayerP);
}
}
@ -4969,7 +4960,7 @@ pMicroFire(PANEL_SPRITEp psp)
InitRocket(psp->PlayerP);
break;
case 2:
PlaySound(DIGI_WARNING,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_dontpan|v3df_follow);
PlaySound(DIGI_WARNING,psp->PlayerP,v3df_dontpan|v3df_follow);
InitNuke(psp->PlayerP);
psp->PlayerP->NukeInitialized = FALSE;
break;
@ -5017,7 +5008,7 @@ pMicroStandBy(PANEL_SPRITEp psp)
pMicroOverlays(psp);
pp->nukevochandle =
PlaySound(DIGI_NUKESTDBY, &psp->PlayerP->posx, &psp->PlayerP->posy, &psp->PlayerP->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_NUKESTDBY, psp->PlayerP, v3df_follow|v3df_dontpan);
}
void
@ -5026,7 +5017,7 @@ pMicroCount(PANEL_SPRITEp psp)
PLAYERp pp = psp->PlayerP;
pp->nukevochandle =
PlaySound(DIGI_NUKECDOWN, &psp->PlayerP->posx, &psp->PlayerP->posy, &psp->PlayerP->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_NUKECDOWN, pp, v3df_follow|v3df_dontpan);
}
void
@ -5035,7 +5026,7 @@ pMicroReady(PANEL_SPRITEp psp)
PLAYERp pp = psp->PlayerP;
pp->nukevochandle =
PlaySound(DIGI_NUKEREADY, &psp->PlayerP->posx, &psp->PlayerP->posy, &psp->PlayerP->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_NUKEREADY, pp, v3df_follow|v3df_dontpan);
pp->NukeInitialized = TRUE;
}
@ -5136,7 +5127,7 @@ InitWeaponHeart(PLAYERp pp)
pp->WpnUziType = 2; // Make uzi's go away!
RetractCurWpn(pp);
PlaySound(DIGI_HEARTBEAT, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan|v3df_doppler);
PlaySound(DIGI_HEARTBEAT, pp, v3df_follow|v3df_dontpan|v3df_doppler);
// Set up the new Weapon variables
psp = pp->CurWpn = pp->Wpn[WPN_HEART];
@ -5281,9 +5272,9 @@ pHeartAttack(PANEL_SPRITEp psp)
//int InitHeartAttack(PLAYERp pp);
// CTW MODIFICATION END
PlaySound(DIGI_HEARTFIRE,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan);
PlaySound(DIGI_HEARTFIRE, pp, v3df_follow|v3df_dontpan);
if (RANDOM_RANGE(1000) > 800)
PlayerSound(DIGI_JG9009,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_JG9009, v3df_follow|v3df_dontpan,pp);
InitHeartAttack(psp->PlayerP);
}
@ -5400,7 +5391,7 @@ SpawnSmallHeartBlood(PANEL_SPRITEp psp)
{0, 0, 0, 0, 0, 0, 0, {0,0}},
};
PlaySound(DIGI_HEARTBEAT, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan|v3df_doppler);
PlaySound(DIGI_HEARTBEAT, pp, v3df_follow|v3df_dontpan|v3df_doppler);
for (hsp = HeartShrap; hsp->lo_jump_speed; hsp++)
{
@ -5645,7 +5636,7 @@ InitWeaponGrenade(PLAYERp pp)
pGrenadePresentSetup(psp);
PlaySound(DIGI_GRENADE_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_GRENADE_UP, pp, v3df_follow);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
FLAG_KEY_RESET(psp->PlayerP, SK_SHOOT);
@ -5931,7 +5922,7 @@ InitWeaponMine(PLAYERp pp)
psp->RestState = ps_MineRest;
pSetState(psp, psp->PresentState);
PlaySound(DIGI_PULL, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_PULL, pp, v3df_follow|v3df_dontpan);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
FLAG_KEY_RESET(psp->PlayerP, SK_SHOOT);
@ -5942,7 +5933,7 @@ pMineUpSound(PANEL_SPRITEp psp)
{
PLAYERp pp = psp->PlayerP;
PlaySound(DIGI_MINE_UP, &pp->posx, &pp->posy, &pp->posz, v3df_follow);
PlaySound(DIGI_MINE_UP, pp, v3df_follow);
}
void
@ -6191,10 +6182,10 @@ InitChops(PLAYERp pp)
psp->RetractState = ps_ChopsRetract;
psp->RestState = ps_ChopsAttack1;
PlaySound(DIGI_BUZZZ,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_none);
PlaySound(DIGI_BUZZZ, psp->PlayerP,v3df_none);
if (RANDOM_RANGE(1000) > 750)
PlayerSound(DIGI_MRFLY,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_follow|v3df_dontpan,psp->PlayerP);
PlayerSound(DIGI_MRFLY,v3df_follow|v3df_dontpan,psp->PlayerP);
}
@ -6202,15 +6193,15 @@ void
pChopsClick(PANEL_SPRITEp psp)
{
int16_t rnd_rng;
PlaySound(DIGI_CHOP_CLICK,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_none);
PlaySound(DIGI_CHOP_CLICK,psp->PlayerP,v3df_none);
rnd_rng = RANDOM_RANGE(1000);
if (rnd_rng > 950)
PlayerSound(DIGI_SEARCHWALL,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_follow|v3df_dontpan,psp->PlayerP);
PlayerSound(DIGI_SEARCHWALL,v3df_follow|v3df_dontpan,psp->PlayerP);
else if (rnd_rng > 900)
PlayerSound(DIGI_EVADEFOREVER,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_follow|v3df_dontpan,psp->PlayerP);
PlayerSound(DIGI_EVADEFOREVER,v3df_follow|v3df_dontpan,psp->PlayerP);
else if (rnd_rng > 800)
PlayerSound(DIGI_SHISEISI,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_follow|v3df_dontpan,psp->PlayerP);
PlayerSound(DIGI_SHISEISI,v3df_follow|v3df_dontpan,psp->PlayerP);
}
void
@ -6273,7 +6264,7 @@ pChopsWait(PANEL_SPRITEp psp)
// do a random attack here
psp->x = CHOPS_XOFF + (RANDOM_P2(128) - 64);
PlaySound(DIGI_BUZZZ,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_none);
PlaySound(DIGI_BUZZZ,psp->PlayerP,v3df_none);
pSetState(psp, psp_ChopsAttack[RANDOM_RANGE(SIZ(psp_ChopsAttack))]);
}
}
@ -6296,7 +6287,7 @@ pChopsRetract(PANEL_SPRITEp psp)
if (psp->y >= CHOPS_YOFF + tilesiz[picnum].y)
{
if (RANDOM_RANGE(1000) > 800)
PlayerSound(DIGI_GETTINGSTIFF,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_follow|v3df_dontpan,psp->PlayerP);
PlayerSound(DIGI_GETTINGSTIFF,v3df_follow|v3df_dontpan,psp->PlayerP);
psp->PlayerP->Chops = NULL;
pKillSprite(psp);
}
@ -6604,11 +6595,11 @@ InitWeaponFist(PLAYERp pp)
rnd_num = RANDOM_P2(1024);
if (rnd_num > 900)
PlaySound(DIGI_TAUNTAI2, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_TAUNTAI2, pp, v3df_follow|v3df_dontpan);
else if (rnd_num > 800)
PlaySound(DIGI_PLAYERYELL1, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_PLAYERYELL1, pp, v3df_follow|v3df_dontpan);
else if (rnd_num > 700)
PlaySound(DIGI_PLAYERYELL2, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_PLAYERYELL2, pp, v3df_follow|v3df_dontpan);
FLAG_KEY_RELEASE(psp->PlayerP, SK_SHOOT);
FLAG_KEY_RESET(psp->PlayerP, SK_SHOOT);

View file

@ -1456,7 +1456,7 @@ DoPlayerWarpTeleporter(PLAYERp pp)
default:
DoPlayerTeleportToSprite(pp, sp_warp);
PlaySound(DIGI_TELEPORT, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_TELEPORT, pp, v3df_none);
DoPlayerResetMovement(pp);
@ -3637,7 +3637,7 @@ void StackedWaterSplash(PLAYERp pp)
if (sectnum >= 0 && SectorIsUnderwaterArea(sectnum))
{
PlaySound(DIGI_SPLASH1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_SPLASH1, pp, v3df_dontpan);
}
}
}
@ -3677,8 +3677,7 @@ DoPlayerFall(PLAYERp pp)
if (pp->jump_speed > 2000)
{
PlayerSound(DIGI_FALLSCREAM, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_FALLSCREAM, v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
else if (pp->jump_speed > 1300)
{
@ -3719,13 +3718,13 @@ DoPlayerFall(PLAYERp pp)
if (sectu && (TEST(sectp->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE))
{
PlaySound(DIGI_SPLASH1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_SPLASH1, pp, v3df_dontpan);
}
else
{
if (pp->jump_speed > 1020)
// Feet hitting ground sound
PlaySound(DIGI_HITGROUND, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
PlaySound(DIGI_HITGROUND, pp, v3df_follow|v3df_dontpan);
}
// i any kind of crawl key get rid of recoil
@ -3748,7 +3747,7 @@ DoPlayerFall(PLAYERp pp)
if (pp->jump_speed > 1700 && depth == 0)
{
PlayerSound(DIGI_PLAYERPAIN2, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_PLAYERPAIN2, v3df_follow|v3df_dontpan,pp);
// PlayerUpdateHealth(pp, -RANDOM_RANGE(PLAYER_FALL_DAMAGE_AMOUNT) - 2);
if (pp->jump_speed > 1700 && pp->jump_speed < 4000)
@ -4686,7 +4685,7 @@ PlayerCanDiveNoWarp(PLAYERp pp)
pp->z_speed = Z(20);
pp->jump_speed = 0;
PlaySound(DIGI_SPLASH1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_SPLASH1, pp, v3df_dontpan);
DoPlayerBeginDiveNoWarp(pp);
return TRUE;
}
@ -5152,7 +5151,7 @@ DoPlayerStopDiveNoWarp(PLAYERp pp)
StopPlayerSound(pp);
// stop diving no warp
PlayerSound(DIGI_SURFACE,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow|v3df_doppler,pp);
PlayerSound(DIGI_SURFACE, v3df_dontpan|v3df_follow|v3df_doppler,pp);
pp->bob_amt = 0;
@ -5183,7 +5182,7 @@ DoPlayerStopDive(PLAYERp pp)
StopPlayerSound(pp);
// stop diving with warp
PlayerSound(DIGI_SURFACE,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow|v3df_doppler,pp);
PlayerSound(DIGI_SURFACE, v3df_dontpan|v3df_follow|v3df_doppler,pp);
pp->bob_amt = 0;
DoPlayerWarpToSurface(pp);
@ -5268,7 +5267,7 @@ DoPlayerDive(PLAYERp pp)
{
pp->DiveDamageTics = PLAYER_DIVE_DAMAGE_TIME;
//PlayerUpdateHealth(pp, PLAYER_DIVE_DAMAGE_AMOUNT);
PlayerSound(DIGI_WANGDROWNING, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow, pp);
PlayerSound(DIGI_WANGDROWNING, v3df_dontpan|v3df_follow, pp);
PlayerUpdateHealth(pp, -3 -(RANDOM_RANGE(7<<8)>>8));
PlayerCheckDeath(pp, -1);
if (TEST(pp->Flags, PF_DEAD))
@ -5407,7 +5406,7 @@ DoPlayerDive(PLAYERp pp)
// Random bubble sounds
// if((RANDOM_RANGE(1000<<5)>>5) < 100)
// PlaySound(DIGI_BUBBLES, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow);
// PlaySound(DIGI_BUBBLES, pp, v3df_dontpan|v3df_follow);
if ((!Prediction && pp->z_speed && ((RANDOM_P2(1024<<5)>>5) < 64)) ||
(PLAYER_MOVING(pp) && (RANDOM_P2(1024<<5)>>5) < 64))
@ -5417,7 +5416,7 @@ DoPlayerDive(PLAYERp pp)
SPRITEp bp;
int nx,ny;
PlaySound(DIGI_BUBBLES, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_BUBBLES, pp, v3df_none);
bubble = SpawnBubble(pp->SpriteP - sprite);
if (bubble >= 0)
{
@ -5871,7 +5870,7 @@ DoPlayerBeginOperate(PLAYERp pp)
}
else
{
PlayerSound(DIGI_USEBROKENVEHICLE, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_USEBROKENVEHICLE, v3df_follow|v3df_dontpan,pp);
return;
}
}
@ -5959,7 +5958,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
}
else
{
PlayerSound(DIGI_USEBROKENVEHICLE, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_USEBROKENVEHICLE, v3df_follow|v3df_dontpan,pp);
return;
}
}
@ -6312,9 +6311,9 @@ DoPlayerDeathFall(PLAYERp pp)
SpawnSplash(pp->PlayerSprite);
if (RANDOM_RANGE(1000) > 500)
PlaySound(DIGI_BODYFALL1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_BODYFALL1, pp, v3df_dontpan);
else
PlaySound(DIGI_BODYFALL2, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_BODYFALL2, pp, v3df_dontpan);
pp->posz = loz - PLAYER_DEATH_HEIGHT;
RESET(pp->Flags, PF_FALLING);
@ -6474,21 +6473,12 @@ DoPlayerBeginDie(PLAYERp pp)
if (GodMode)
return;
// Override any previous talking, death scream has precedance
if (pp->PlayerTalking)
{
if (FX_SoundValidAndActive(pp->TalkVocHandle))
FX_StopSound(pp->TalkVocHandle);
pp->PlayerTalking = FALSE;
pp->TalkVocnum = -1;
pp->TalkVocHandle = -1;
}
StopPlayerSound(pp);
// Do the death scream
choosesnd = RANDOM_RANGE(MAX_PAIN);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],&pp->posx,
&pp->posy,&pp->posy,v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(PlayerLowHealthPainVocs[choosesnd],v3df_dontpan|v3df_doppler|v3df_follow,pp);
#if 0
if (!CommEnabled && numplayers <= 1 && QuickLoadNum >= 0)
@ -6618,7 +6608,7 @@ DoPlayerBeginDie(PLAYERp pp)
case PLAYER_DEATH_FLIP:
case PLAYER_DEATH_RIPPER:
//PlaySound(DIGI_SCREAM1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow);
//PlaySound(DIGI_SCREAM1, pp, v3df_dontpan|v3df_follow);
SET(pp->Flags, PF_JUMPING);
u->ID = NINJA_DEAD;
@ -6636,7 +6626,7 @@ DoPlayerBeginDie(PLAYERp pp)
break;
case PLAYER_DEATH_CRUMBLE:
PlaySound(DIGI_BODYSQUISH1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_BODYSQUISH1, pp, v3df_dontpan);
SET(pp->Flags, PF_DEAD_HEAD | PF_JUMPING);
pp->jump_speed = -300;
@ -6652,7 +6642,7 @@ DoPlayerBeginDie(PLAYERp pp)
break;
case PLAYER_DEATH_EXPLODE:
PlaySound(DIGI_BODYSQUISH1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_BODYSQUISH1, pp, v3df_dontpan);
SET(pp->Flags, PF_DEAD_HEAD | PF_JUMPING);
pp->jump_speed = -650;
@ -6669,7 +6659,7 @@ DoPlayerBeginDie(PLAYERp pp)
break;
case PLAYER_DEATH_SQUISH:
PlaySound(DIGI_BODYCRUSHED1, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
PlaySound(DIGI_BODYCRUSHED1, pp, v3df_dontpan);
SET(pp->Flags, PF_DEAD_HEAD | PF_JUMPING);
pp->jump_speed = 200;
@ -6769,7 +6759,7 @@ void DoPlayerDeathHurl(PLAYERp pp)
{
SpawnShrap(pp->PlayerSprite, -1);
if (RANDOM_RANGE(1000) > 400)
PlayerSound(DIGI_DHVOMIT, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_DHVOMIT, v3df_dontpan|v3df_follow,pp);
}
return;
}
@ -6854,7 +6844,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
pp->SpriteP->ang = pp->pang;
DoSpawnTeleporterEffect(pp->SpriteP);
PlaySound(DIGI_TELEPORT, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_TELEPORT, pp, v3df_none);
DoPlayerZrange(pp);
@ -7006,7 +6996,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp)
short hit_sprite = -2;
SPRITEp hsp;
//PlaySound(DIGI_DHCLUNK, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
//PlaySound(DIGI_DHCLUNK, pp, v3df_dontpan);
hit_sprite = NORM_SPRITE(u->ret);
hsp = &sprite[hit_sprite];
@ -7026,7 +7016,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp)
{
short w,nw,wall_ang,dang;
//PlaySound(DIGI_DHCLUNK, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan);
//PlaySound(DIGI_DHCLUNK, pp, v3df_dontpan);
w = NORM_WALL(u->ret);

View file

@ -273,7 +273,7 @@ int SpawnQuake(short sectnum, int x, int y, int z,
QUAKE_AngAmt(sp) = 8;
QUAKE_PosAmt(sp) = 0;
PlaySound(DIGI_ERUPTION, &sp->x, &sp->y, &sp->z, v3df_follow|v3df_dontpan);
PlaySound(DIGI_ERUPTION, sp, v3df_follow|v3df_dontpan);
Set3DSoundOwner(SpriteNum);
return SpriteNum;

View file

@ -1251,7 +1251,7 @@ int DoRipper2StandHeart(short SpriteNum)
NullRipper2(SpriteNum);
if (!FX_SoundValidAndActive(riphearthandle))
riphearthandle = PlaySound(DIGI_RIPPER2HEARTOUT,&sp->x,&sp->y,&sp->z,v3df_none);
riphearthandle = PlaySound(DIGI_RIPPER2HEARTOUT, sp, v3df_none);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
NewStateGroup(SpriteNum, sg_Ripper2Run);
@ -1375,7 +1375,7 @@ int ChestRipper2(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum];
PlaySound(DIGI_RIPPER2CHEST,&sp->x,&sp->y,&sp->z,v3df_follow);
PlaySound(DIGI_RIPPER2CHEST, sp, v3df_follow);
return 0;
}

View file

@ -1229,9 +1229,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
TRAVERSE_CONNECT(i)
{
Player[i].PlayerTalking = FALSE;
Player[i].TalkVocnum = -1;
Player[i].TalkVocHandle = -1;
Player[i].StartColor = 0;
}

View file

@ -861,7 +861,7 @@ DoSpawnActorTrigger(short match)
if (ActorSpawn(sp))
{
DoSpawnTeleporterEffectPlace(sp);
PlaySound(DIGI_PLAYER_TELEPORT, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_PLAYER_TELEPORT, sp, v3df_none);
spawn_count++;
}
}
@ -1285,12 +1285,12 @@ DoSoundSpotMatch(short match, short sound_num, short sound_type)
if (pp)
{
if (pp == Player+myconnectindex)
PlayerSound(snd2play,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(snd2play, v3df_dontpan|v3df_follow,pp);
}
}
else
{
PlaySound(snd2play, &sp->x, &sp->y, &sp->z, flags);
PlaySound(snd2play, sp, flags);
//if (TEST(flags, v3df_follow)) // Just set it anyway
Set3DSoundOwner(sn);
@ -1724,68 +1724,68 @@ OperateSprite(short SpriteNum, short player_is_operating)
if (sp->lotag == CARGIRL_R0)
{
if (choose_snd > 700)
PlayerSound(DIGI_JG44052,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG44052, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 500)
PlayerSound(DIGI_JG45014,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45014, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 250)
PlayerSound(DIGI_JG44068,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG44068, v3df_dontpan|v3df_follow,pp);
else
PlayerSound(DIGI_JG45010,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45010, v3df_dontpan|v3df_follow,pp);
}
else if (sp->lotag == MECHANICGIRL_R0)
{
if (choose_snd > 700)
PlayerSound(DIGI_JG44027,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG44027, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 500)
PlayerSound(DIGI_JG44038,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG44038, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 250)
PlayerSound(DIGI_JG44039,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG44039, v3df_dontpan|v3df_follow,pp);
else
PlayerSound(DIGI_JG44048,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG44048, v3df_dontpan|v3df_follow,pp);
}
else if (sp->lotag == SAILORGIRL_R0)
{
if (choose_snd > 700)
PlayerSound(DIGI_JG45018,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45018, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 500)
PlayerSound(DIGI_JG45030,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45030, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 250)
PlayerSound(DIGI_JG45033,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45033, v3df_dontpan|v3df_follow,pp);
else
PlayerSound(DIGI_JG45043,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45043, v3df_dontpan|v3df_follow,pp);
}
else if (sp->lotag == PRUNEGIRL_R0)
{
if (choose_snd > 700)
PlayerSound(DIGI_JG45053,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45053, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 500)
PlayerSound(DIGI_JG45067,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG45067, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 250)
PlayerSound(DIGI_JG46005,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG46005, v3df_dontpan|v3df_follow,pp);
else
PlayerSound(DIGI_JG46010,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_JG46010, v3df_dontpan|v3df_follow,pp);
}
else if (sp->lotag == TOILETGIRL_R0)
{
if (choose_snd > 700)
PlayerSound(DIGI_WHATYOUEATBABY,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_WHATYOUEATBABY, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 500)
PlayerSound(DIGI_WHATDIEDUPTHERE,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_WHATDIEDUPTHERE, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 250)
PlayerSound(DIGI_YOUGOPOOPOO,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_YOUGOPOOPOO, v3df_dontpan|v3df_follow,pp);
else
PlayerSound(DIGI_PULLMYFINGER,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_PULLMYFINGER, v3df_dontpan|v3df_follow,pp);
}
else
{
if (choose_snd > 700)
PlayerSound(DIGI_SOAPYOUGOOD,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_SOAPYOUGOOD, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 500)
PlayerSound(DIGI_WASHWANG,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_WASHWANG, v3df_dontpan|v3df_follow,pp);
else if (choose_snd > 250)
PlayerSound(DIGI_DROPSOAP,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_DROPSOAP, v3df_dontpan|v3df_follow,pp);
else
PlayerSound(DIGI_REALTITS,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_follow,pp);
PlayerSound(DIGI_REALTITS, v3df_dontpan|v3df_follow,pp);
}
}
return TRUE;
@ -1795,7 +1795,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
PlaySound(DIGI_PFLIP,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko1Operate);
@ -1806,7 +1806,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
PlaySound(DIGI_PFLIP,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko2Operate);
@ -1817,7 +1817,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
PlaySound(DIGI_PFLIP,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko3Operate);
@ -1828,7 +1828,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
PlaySound(DIGI_PFLIP,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko4Operate);
@ -1853,7 +1853,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
// change the switch state
AnimateSwitch(sp, -1);
PlaySound(DIGI_REGULARSWITCH, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_REGULARSWITCH, sp, v3df_none);
if (ComboSwitchTest(TAG_COMBO_SWITCH_EVERYTHING, sp->hitag))
{
@ -1866,7 +1866,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
// change the switch state
AnimateSwitch(sp, -1);
PlaySound(DIGI_REGULARSWITCH, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_REGULARSWITCH, sp, v3df_none);
if (ComboSwitchTest(TAG_COMBO_SWITCH_EVERYTHING, sp->hitag))
{
@ -1921,7 +1921,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
AnimateSwitch(sp, -1);
PlaySound(DIGI_BIGSWITCH, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_BIGSWITCH, sp, v3df_none);
if (sp->hitag)
Level = sp->hitag;
@ -1970,7 +1970,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
sp->hitag = 0;
sp->lotag = 0;
PlaySound(DIGI_REGULARSWITCH, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_REGULARSWITCH, sp, v3df_none);
break;
}
@ -1990,7 +1990,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
sop->ang_tgt = NORM_ANGLE(sop->ang_tgt + 512);
PlaySound(DIGI_BIGSWITCH, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_BIGSWITCH, sp, v3df_none);
return TRUE;
@ -2140,8 +2140,7 @@ OperateTripTrigger(PLAYERp pp)
case TAG_SECRET_AREA_TRIGGER:
if (pp == Player+myconnectindex)
PlayerSound(DIGI_ANCIENTSECRET, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_ANCIENTSECRET, v3df_dontpan|v3df_doppler|v3df_follow,pp);
sprintf(ds, GStrings("TXTS_SECRET"));
SECRET_Trigger(pp->cursectnum);
@ -2244,7 +2243,7 @@ OperateTripTrigger(PLAYERp pp)
sector[pp->cursectnum].hitag = 0;
sector[pp->cursectnum].lotag = 0;
PlaySound(DIGI_REGULARSWITCH, &pp->posx, &pp->posy, &pp->posz, v3df_none);
PlaySound(DIGI_REGULARSWITCH, pp, v3df_none);
break;
}
}
@ -2351,7 +2350,7 @@ SWBOOL NearThings(PLAYERp pp)
if (sector[pp->cursectnum].hitag == PLAYER_SOUNDEVENT_TAG)
{
if (pp == Player+myconnectindex)
PlayerSound(sector[pp->cursectnum].lotag,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(sector[pp->cursectnum].lotag, v3df_follow|v3df_dontpan,pp);
return FALSE;
}
@ -2370,7 +2369,7 @@ SWBOOL NearThings(PLAYERp pp)
if (sp->hitag == PLAYER_SOUNDEVENT_TAG)
{
if (pp == Player+myconnectindex)
PlayerSound(sp->lotag,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(sp->lotag, v3df_follow|v3df_dontpan,pp);
}
return FALSE; // Return false so he doesn't grunt
}
@ -2381,7 +2380,7 @@ SWBOOL NearThings(PLAYERp pp)
if (wall[neartagwall].hitag == PLAYER_SOUNDEVENT_TAG)
{
if (pp == Player+myconnectindex)
PlayerSound(wall[neartagwall].lotag,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(wall[neartagwall].lotag, v3df_follow|v3df_dontpan,pp);
return FALSE; // We are playing a sound so don't return true
}
return TRUE;
@ -2420,9 +2419,9 @@ SWBOOL NearThings(PLAYERp pp)
if (!TEST(wp->extra, WALLFX_DONT_STICK) && pp == Player+myconnectindex)
{
if (STD_RANDOM_RANGE(1000) > 970)
PlayerSound(DIGI_HITTINGWALLS,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_HITTINGWALLS, v3df_follow|v3df_dontpan,pp);
else
PlayerSound(DIGI_SEARCHWALL,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(DIGI_SEARCHWALL, v3df_follow|v3df_dontpan,pp);
}
return TRUE;
@ -2581,7 +2580,7 @@ int DoPlayerGrabStar(PLAYERp pp)
{
// Pull a star out of wall and up your ammo
PlayerUpdateAmmo(pp, WPN_STAR, 1);
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_ITEM, sp, v3df_none);
KillSprite(StarQueue[i]);
StarQueue[i] = -1;
if (TEST(pp->WpnFlags, BIT(WPN_STAR)))

View file

@ -472,7 +472,7 @@ int DoSkullWait(short SpriteNum)
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
PlaySound(DIGI_AHSCREAM,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_AHSCREAM, sp, v3df_none);
u->WaitTics = SEC(3) + RANDOM_RANGE(360);
}
@ -881,7 +881,7 @@ int DoBettyWait(short SpriteNum)
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
PlaySound(DIGI_MINEBEEP,&sp->x,&sp->y,&sp->z,v3df_none);
PlaySound(DIGI_MINEBEEP, sp, v3df_none);
u->WaitTics = SEC(3);
}

File diff suppressed because it is too large Load diff

View file

@ -57,7 +57,8 @@ enum
v3df_intermit = 32, // 1 = Intermittant sound
v3df_init = 64, // 1 = First pass of sound, don't play it.
// This is mainly used for intermittent sounds
v3df_nolookup = 128 // don't use ambient table lookup
v3df_nolookup = 128, // don't use ambient table lookup
v3df_listenerz = 256 // ignore height when positioning sound (was mostly hacked by providing bad cooordinates to the code before.)
};
typedef int Voc3D_Flags;
@ -80,7 +81,7 @@ void PlaySpriteSound(short spritenum, int attrib_ndx, Voc3D_Flags flags);
void DeleteNoSoundOwner(short spritenum);
void DeleteNoFollowSoundOwner(short spritenum);
SWBOOL CacheSound(int num, int type);
inline SWBOOL CacheSound(int num, int type) { return false; }
void COVER_SetReverb(int amt);
void UnInitSound(void);
void InitFX(void);

View file

@ -5504,7 +5504,7 @@ void ChoosePlayerGetSound(PLAYERp pp)
choose_snd = STD_RANDOM_RANGE((MAX_GETSOUNDS-1)<<8)>>8;
PlayerSound(PlayerGetItemVocs[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
PlayerSound(PlayerGetItemVocs[choose_snd], v3df_follow|v3df_dontpan,pp);
}
SWBOOL CanGetWeapon(PLAYERp pp, short SpriteNum, int WPN)
@ -5584,7 +5584,7 @@ DoGet(short SpriteNum)
u->WaitTics -= ACTORMOVETICS * 2;
if (u->WaitTics <= 0)
{
PlaySound(DIGI_ITEM_SPAWN, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_ITEM_SPAWN, sp, v3df_none);
DoSpawnItemTeleporterEffect(sp);
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
}
@ -5674,7 +5674,7 @@ KeyMain:
pp->HasKey[key_num] = TRUE;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_KEY, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_KEY, sp, v3df_dontpan);
PlayerUpdateKeys(pp);
// don't kill keys in coop
@ -5704,7 +5704,7 @@ KeyMain:
}
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_BIGITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_BIGITEM, sp, v3df_dontpan);
// override for respawn mode
if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.NoRespawn)
@ -5739,7 +5739,7 @@ KeyMain:
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
// override for respawn mode
if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.NoRespawn)
@ -5769,7 +5769,7 @@ KeyMain:
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_BIGITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_BIGITEM, sp, v3df_dontpan);
// override for respawn mode
if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.NoRespawn)
@ -5795,7 +5795,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_MEDKIT);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
// override for respawn mode
if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.NoRespawn)
@ -5818,7 +5818,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_CHEMBOMB);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
}
break;
@ -5833,7 +5833,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_FLASHBOMB);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
}
break;
@ -5850,7 +5850,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_CALTROPS);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
}
break;
@ -5864,7 +5864,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_NIGHT_VISION);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
}
break;
@ -5877,7 +5877,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_REPAIR_KIT);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
// don't kill repair kit in coop
if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
@ -5894,7 +5894,7 @@ KeyMain:
pp->InventoryAmount[INVENTORY_ENVIRON_SUIT] = 1;
PlayerUpdateInventory(pp, INVENTORY_ENVIRON_SUIT);
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
}
break;
@ -5908,7 +5908,7 @@ KeyMain:
PlayerUpdateInventory(pp, INVENTORY_CLOAK);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
}
break;
@ -5929,7 +5929,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_STAR, DamageData[WPN_STAR].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_STAR)))
break;
@ -5956,7 +5956,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_MINE, DamageData[WPN_MINE].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
ChoosePlayerGetSound(pp);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_MINE)))
@ -5986,7 +5986,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_UZI, DamageData[WPN_UZI].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_UZI)) && TEST(pp->Flags, PF_TWO_UZI))
@ -5998,7 +5998,7 @@ KeyMain:
SET(pp->Flags, PF_TWO_UZI);
pp->WpnUziType = 0; // Let it come up
if (pp == Player+myconnectindex)
PlayerSound(DIGI_DOUBLEUZI, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow, pp);
PlayerSound(DIGI_DOUBLEUZI, v3df_dontpan|v3df_follow, pp);
}
else
{
@ -6023,7 +6023,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_UZI, DamageData[WPN_UZI].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6042,7 +6042,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_MICRO, DamageData[WPN_MICRO].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
ChoosePlayerGetSound(pp);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_MICRO)))
@ -6064,7 +6064,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_MICRO, DamageData[WPN_MICRO].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6076,10 +6076,9 @@ KeyMain:
pp->WpnRocketNuke = DamageData[DMG_NUCLEAR_EXP].weapon_pickup;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
if (STD_RANDOM_RANGE(1000) > 800 && pp == Player+myconnectindex)
PlayerSound(DIGI_ILIKENUKES, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_ILIKENUKES, v3df_dontpan|v3df_doppler|v3df_follow,pp);
if (pp->CurWpn == pp->Wpn[WPN_MICRO])
{
if (pp->WpnRocketType != 2)
@ -6110,11 +6109,10 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_GRENADE, DamageData[WPN_GRENADE].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
//ChoosePlayerGetSound(pp);
if (STD_RANDOM_RANGE(1000) > 800 && pp == Player+myconnectindex)
PlayerSound(DIGI_LIKEBIGWEAPONS, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_GRENADE)))
break;
@ -6135,7 +6133,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_GRENADE, DamageData[WPN_GRENADE].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6143,7 +6141,7 @@ KeyMain:
case ICON_ROCKET:
pp->WpnAmmo[WPN_ROCKET] += 15;
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_ROCKET)))
break;
@ -6160,7 +6158,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_ROCKET, 20);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
break;
#endif
@ -6180,15 +6178,13 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_RAIL, DamageData[WPN_RAIL].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
if (pp == Player+myconnectindex)
{
if (STD_RANDOM_RANGE(1000) > 700)
PlayerSound(DIGI_LIKEBIGWEAPONS, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
else
PlayerSound(DIGI_GOTRAILGUN, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_GOTRAILGUN, v3df_dontpan|v3df_doppler|v3df_follow,pp);
}
//ChoosePlayerGetSound(pp);
KillGetWeapon(SpriteNum);
@ -6213,7 +6209,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_RAIL, DamageData[WPN_RAIL].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6231,7 +6227,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_SHOTGUN, DamageData[WPN_SHOTGUN].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
ChoosePlayerGetSound(pp);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_SHOTGUN)))
@ -6253,7 +6249,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_SHOTGUN, DamageData[WPN_SHOTGUN].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6266,7 +6262,7 @@ KeyMain:
pp->WpnShotgunAuto = 50;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
if (pp->CurWpn == pp->Wpn[WPN_SHOTGUN])
{
@ -6297,11 +6293,10 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_HOTHEAD, DamageData[WPN_HOTHEAD].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
//ChoosePlayerGetSound(pp);
if (STD_RANDOM_RANGE(1000) > 800 && pp == Player+myconnectindex)
PlayerSound(DIGI_LIKEBIGWEAPONS, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_HOTHEAD)))
break;
@ -6324,7 +6319,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_HOTHEAD, DamageData[WPN_HOTHEAD].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6343,11 +6338,10 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_HEART, DamageData[WPN_HEART].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
//ChoosePlayerGetSound(pp);
if (STD_RANDOM_RANGE(1000) > 800 && pp == Player+myconnectindex)
PlayerSound(DIGI_LIKEBIGWEAPONS, &pp->posx, &pp->posy, &pp->posz,
v3df_dontpan|v3df_doppler|v3df_follow,pp);
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
KillGetWeapon(SpriteNum);
if (TEST(pp->WpnFlags, BIT(WPN_HEART)))
break;
@ -6372,7 +6366,7 @@ KeyMain:
PlayerUpdateAmmo(pp, WPN_HEART, DamageData[WPN_HEART].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGetAmmo(SpriteNum);
break;
@ -6398,7 +6392,7 @@ KeyMain:
MNU_MeasureString(SpellName[sp->lotag], &w, &h);
PutStringTimer(pp, TEXT_TEST_COL(w), TEXT_SPELL_INFO_LINE, SpellName[sp->lotag], TEXT_TEST_TIME);
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
break;
}
@ -6413,7 +6407,7 @@ KeyMain:
pp->WpnRocketHeat = DamageData[DMG_NUCLEAR_EXP].ammo_pickup;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
KillGet(SpriteNum);
if (pp->CurWpn == pp->Wpn[WPN_MICRO])
@ -6436,7 +6430,7 @@ KeyMain:
case ICON_FLAG:
if (sp->pal == sprite[pp->PlayerSprite].pal) break; // Can't pick up your own flag!
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
PlaySound(DIGI_ITEM, sp, v3df_dontpan);
if (sp->hitag == TAG_NORESPAWN_FLAG)
New = SpawnSprite(STAT_ITEM, ICON_FLAG, s_CarryFlagNoDet, sp->sectnum,
@ -7207,7 +7201,7 @@ void MissileWarpType(SPRITEp sp, SPRITEp sp_warp)
case 1:
break;
default:
PlaySound(DIGI_ITEM_SPAWN, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_ITEM_SPAWN, sp, v3df_none);
//DoSpawnTeleporterEffectPlace(sp);
DoSpawnItemTeleporterEffect(sp);
break;
@ -7221,7 +7215,7 @@ void ActorWarpType(SPRITEp sp, SPRITEp sp_warp)
case 1:
break;
default:
PlaySound(DIGI_ITEM_SPAWN, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_ITEM_SPAWN, sp, v3df_none);
DoSpawnTeleporterEffectPlace(sp);
break;
}

View file

@ -726,7 +726,7 @@ int InitSumoCharge(short SpriteNum)
USERp u = User[SpriteNum];
if (RANDOM_P2(1024) > 950)
PlaySound(DIGI_SUMOALERT, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_SUMOALERT, sp, v3df_follow);
DoActorSetSpeed(SpriteNum, FAST_SPEED);
@ -754,7 +754,7 @@ int InitSumoFart(short SpriteNum)
USERp u = User[SpriteNum];
extern int InitSumoNapalm(short SpriteNum);
PlaySound(DIGI_SUMOFART, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_SUMOFART, sp, v3df_follow);
InitChemBomb(SpriteNum);
@ -770,7 +770,7 @@ int InitSumoStomp(short SpriteNum)
USERp u = User[SpriteNum];
extern int InitSumoStompAttack(short SpriteNum);
PlaySound(DIGI_SUMOSTOMP, &sp->x, &sp->y, &sp->z, v3df_none);
PlaySound(DIGI_SUMOSTOMP, sp, v3df_none);
SetSumoQuake(SpriteNum);
InitSumoStompAttack(SpriteNum);
@ -795,7 +795,7 @@ int DoSumoDeathMelt(short SpriteNum)
SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum];
PlaySound(DIGI_SUMOFART, &sp->x, &sp->y, &sp->z, v3df_follow);
PlaySound(DIGI_SUMOFART, sp, v3df_follow);
u->ID = SUMO_RUN_R0;
InitChemBomb(SpriteNum);

File diff suppressed because it is too large Load diff

View file

@ -729,13 +729,13 @@ int DoZillaMove(short SpriteNum)
{
choose = STD_RANDOM_RANGE(1000);
if (choose > 990)
handle = PlaySound(DIGI_Z16004,&sp->x,&sp->y,&sp->z,v3df_none);
handle = PlaySound(DIGI_Z16004, sp, v3df_none);
else if (choose > 985)
handle = PlaySound(DIGI_Z16004,&sp->x,&sp->y,&sp->z,v3df_none);
handle = PlaySound(DIGI_Z16004, sp, v3df_none);
else if (choose > 980)
handle = PlaySound(DIGI_Z16004,&sp->x,&sp->y,&sp->z,v3df_none);
handle = PlaySound(DIGI_Z16004, sp, v3df_none);
else if (choose > 975)
handle = PlaySound(DIGI_Z16004,&sp->x,&sp->y,&sp->z,v3df_none);
handle = PlaySound(DIGI_Z16004, sp, v3df_none);
}
@ -758,7 +758,7 @@ int DoZillaStomp(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum];
PlaySound(DIGI_ZILLASTOMP,&sp->x,&sp->y,&sp->z,v3df_follow);
PlaySound(DIGI_ZILLASTOMP, sp, v3df_follow);
return 0;
}