Readme cleanup.

+ Replace an old crash sfx
+ Detect VKDoom to customize crash handler text
This commit is contained in:
Mari the Deer 2023-11-19 16:35:26 +01:00
commit e802327ca5
7 changed files with 35 additions and 17 deletions

View file

@ -12,6 +12,7 @@ Class SWWMStaticHandler : StaticEventHandler
// crash handler
ui bool wasinmap;
ui int timer, msgpick;
bool isvkdoom;
// broccoli doccoli
bool isbd;
String bdname;
@ -168,6 +169,9 @@ Class SWWMStaticHandler : StaticEventHandler
}
}
foreach ( f:fonts ) Font.GetFont(f);
// detect vkdoom (naive, may find a better method later)
lmp = Wads.FindLumpFullName("graphics/bootlogo.png",0,false);
isvkdoom = (lmp != -1);
// warn: mp no longer officially maintained
if ( multiplayer )
{
@ -679,7 +683,9 @@ Class SWWMStaticHandler : StaticEventHandler
if ( timer == 1 )
{
msgpick = Random[UIStuff](1,8);
Console.Printf("\cf%s\c-",StringTable.Localize("$CRASHMSG"..msgpick.."A"));
String str = StringTable.Localize("$CRASHMSG"..msgpick.."A");
if ( isvkdoom ) str.Replace("GZDoom","VKDoom");
Console.Printf("\cf%s\c-",str);
let hnd = SWWMBrutalHandler(StaticEventHandler.Find("SWWMBrutalHandler"));
if ( hnd && hnd.detected )
{
@ -690,7 +696,9 @@ Class SWWMStaticHandler : StaticEventHandler
}
else if ( timer == 70 )
{
Console.Printf("\cf%s\c-",StringTable.Localize("$CRASHMSG"..msgpick.."B"));
String str = StringTable.Localize("$CRASHMSG"..msgpick.."B");
if ( isvkdoom ) str.Replace("GZDoom","VKDoom");
Console.Printf("\cf%s\c-",str);
S_StartSound("crash/curb",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
}
else if ( timer == 140 )