mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: Fix two signed/unsigned comparison warnings in PlayFX2()
.
* Lines in question: ** 606 | if (chan->SoundID == nSound + 1) ** 621 | if (chan->SoundID == nSound + 1) * All data sent to `PlayFX2()` and functions that wrap `PlayFX2()` are signed values, so keep signed all the way through.
This commit is contained in:
parent
a4d165a84e
commit
2f567bdb74
2 changed files with 5 additions and 5 deletions
|
@ -553,7 +553,7 @@ void GameInterface::UpdateSounds()
|
|||
|
||||
int soundx, soundy, soundz;
|
||||
|
||||
void PlayFX2(unsigned int nSound, DExhumedActor* pActor, int sectf, EChanFlags chanflags, int sprflags)
|
||||
void PlayFX2(int nSound, DExhumedActor* pActor, int sectf, EChanFlags chanflags, int sprflags)
|
||||
{
|
||||
if (!SoundEnabled()) return;
|
||||
if ((nSound&0x1ff) >= kMaxSounds || !soundEngine->isValidSoundId((nSound & 0x1ff)+1))
|
||||
|
@ -654,7 +654,7 @@ void PlayFX2(unsigned int nSound, DExhumedActor* pActor, int sectf, EChanFlags c
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void PlayFXAtXYZ(unsigned int ax, int x, int y, int z, EChanFlags chanflags, int sectf)
|
||||
void PlayFXAtXYZ(int ax, int x, int y, int z, EChanFlags chanflags, int sectf)
|
||||
{
|
||||
soundx = x;
|
||||
soundy = y;
|
||||
|
|
|
@ -130,10 +130,10 @@ int LoadSound(const char* sound);
|
|||
void BendAmbientSound();
|
||||
void CheckAmbience(sectortype* pSector);
|
||||
|
||||
void PlayFX2(unsigned int nSound, DExhumedActor* nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE, int sprflags = 0);
|
||||
void PlayFX2(int nSound, DExhumedActor* nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE, int sprflags = 0);
|
||||
|
||||
void PlayFXAtXYZ(unsigned int nSound, int x, int y, int z, EChanFlags chanflags = CHANF_NONE, int sectf = 0);
|
||||
inline void D3PlayFX(unsigned int nSound, DExhumedActor* actor, int flags = 0)
|
||||
void PlayFXAtXYZ(int nSound, int x, int y, int z, EChanFlags chanflags = CHANF_NONE, int sectf = 0);
|
||||
inline void D3PlayFX(int nSound, DExhumedActor* actor, int flags = 0)
|
||||
{
|
||||
PlayFX2(nSound, actor, 0, CHANF_NONE, flags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue