diff --git a/src/sound/s_advsound.cpp b/src/sound/s_advsound.cpp index f508c187f4..2fd7428b3d 100644 --- a/src/sound/s_advsound.cpp +++ b/src/sound/s_advsound.cpp @@ -416,7 +416,7 @@ static int S_AddSound (const char *logicalname, int lumpnum, FScanner *sc) sfxid = soundEngine->FindSoundNoHash (logicalname); - if ((unsigned int)sfxid < S_sfx.Size()) + if (sfxid > 0 && (unsigned int)sfxid < S_sfx.Size()) { // If the sound has already been defined, change the old definition sfxinfo_t *sfx = &S_sfx[sfxid]; @@ -483,7 +483,9 @@ int S_AddPlayerSound (const char *pclass, int gender, int refid, int S_AddPlayerSound (const char *pclass, int gender, int refid, int lumpnum, bool fromskin) { + auto &S_sfx = soundEngine->GetSounds(); + FString fakename; int id; diff --git a/wadsrc/static/dehsupp.txt b/wadsrc/static/dehsupp.txt index 8525d11644..59858975f2 100644 --- a/wadsrc/static/dehsupp.txt +++ b/wadsrc/static/dehsupp.txt @@ -1199,7 +1199,7 @@ Aliases A_MonsterMeleeAttack, MBF21_MonsterMeleeAttack, A_RadiusDamage, A_RadiusDamage, A_HealChase, MBF21_HealChase, - A_SeekTracer, A_SeekerMissile, + A_SeekTracer, MBF21_SeekTracer, A_FindTracer, A_FindTracer, A_JumpIfHealthBelow, MBF21_JumpIfHealthBelow, A_JumpIfTargetInSight, MBF21_JumpIfTargetInSight, diff --git a/wadsrc/static/zscript/actors/mbf21.zs b/wadsrc/static/zscript/actors/mbf21.zs index b6eb4ef892..a8fbd40b3c 100644 --- a/wadsrc/static/zscript/actors/mbf21.zs +++ b/wadsrc/static/zscript/actors/mbf21.zs @@ -503,5 +503,11 @@ extend class Weapon player.SetPsprite(PSP_FLASH, tstate); } + // needed to call A_SeekerMissile with proper defaults. + deprecated("2.3", "for Dehacked use only") + void MBF21_SeekTracer(int threshold, int turnmax) + { + A_SeekerMissile(threshold, turnmax); + } } \ No newline at end of file