- Fixed: The HIRESTEX parser didn't check if a graphic specified in a remap

command actually existed.
- Fixed: My $Limit fix from yesterday didn't work because NearLimit was
  an unsigned byte and the comparisons with -1 didn't work. Made it a
  signed word instead.
- Made sfxinfo_t::Link an unsigned int because it limited the amount of 
  usable sounds to 65535. 

SVN r869 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-30 08:32:44 +00:00
commit 868782a843
5 changed files with 25 additions and 8 deletions

View file

@ -535,7 +535,7 @@ static int S_AddSound (const char *logicalname, int lumpnum, FScanner *sc)
sfx->bRandomHeader = false;
sfx->link = sfxinfo_t::NO_LINK;
sfx->bTentative = false;
if (sfx->NearLimit == (BYTE)-1) sfx->NearLimit = 2;
if (sfx->NearLimit == -1) sfx->NearLimit = 2;
//sfx->PitchMask = CurrentPitchMask;
}
else
@ -1579,7 +1579,7 @@ static int S_LookupPlayerSound (int classidx, int gender, int refid)
// If we're not done parsing SNDINFO yet, assume that the target sound is valid
if (PlayerClassesIsSorted &&
(sndnum == 0 ||
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) && S_sfx[sndnum].link == 0xffff)))
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) && S_sfx[sndnum].link == sfxinfo_t::NO_LINK)))
{ // This sound is unavailable.
if (ingender != 0)
{ // Try "male"