- SW: silence an apparently misplaced ambient sound in level 9.

This commit is contained in:
Christoph Oelckers 2020-11-24 22:39:35 +01:00
parent 73df144f65
commit 6549f05127
2 changed files with 10 additions and 2 deletions

View file

@ -370,6 +370,11 @@ void InitLevel(MapRecord *maprec)
// clear accidental one-sided flag off yet another key card.
if (sprite[333].picnum == 1774 && sprite[333].cstat == 81) sprite[333].cstat &= ~64;
}
if (!maprec->labelName.CompareNoCase("$outpost") && !maprec->name.CompareNoCase("$TXTS_MAP09"))
{
// clear accidental one-sided flag off yet another key card.
if (sprite[442].picnum == ST1 && sprite[442].hitag == 1002 && sprite[442].lotag == 31) sprite[442].lotag = -1;
}
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
STAT_NewLevel(currentLevel->fileName);
Player[0].angle.ang = buildang(ang);

View file

@ -249,8 +249,11 @@ void InitAmbient(int num, SPRITEp sp)
// Ambient sounds need special treatment
if (num < 0 || num > MAX_AMBIENT_SOUNDS)
{
sprintf(ds, "Invalid or out of range ambient sound number %d\n", num);
PutStringInfo(Player + screenpeek, ds);
if (num != -1) // skip message for -1 to allow using it for silencing buggy ambient sound sprites (there is one in SW level 9.)
{
sprintf(ds, "Invalid or out of range ambient sound number %d\n", num);
PutStringInfo(Player + screenpeek, ds);
}
return;
}
auto vnum = ambarray[num].diginame;