Use InterfaceEvents instead of PostUiTick for oneliners, more reliable.
Due to some arbitrary change in GZDoom, which was later merged into VKDoom as well, PostUiTick no longer consistently gets called after WorldTick. This is kind of funny and also disappointing and sad because I intentionally designed that feature this way, on purpose, and now it no longer works as intended. Who knows how many other mods are affected by this now.
This commit is contained in:
parent
8b01bc95fa
commit
cf17e889d8
4 changed files with 22 additions and 21 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1238 \cu(jue 21 ago 2025 01:17:09 CEST)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1238 \cu(2025-08-21 01:17:09)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1239 \cu(jue 21 ago 2025 01:31:55 CEST)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1239 \cu(2025-08-21 01:31:55)\c-";
|
||||
|
|
|
|||
|
|
@ -268,7 +268,6 @@ Class SWWMHandler : EventHandler
|
|||
|
||||
override void PostUiTick()
|
||||
{
|
||||
OnelinerUITick();
|
||||
VanillaBossUITick();
|
||||
// corruption cards dialogue
|
||||
if ( ccloaded && !gdat.ccstartonce && !cardmessaged && (gamestate == GS_LEVEL) )
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ extend Class SWWMHandler
|
|||
if ( loudlv > 2 ) players[consoleplayer].mo.A_StartSound(onelinersnd,CHAN_DEMOVOICEAUX2,CHANF_DEFAULT,1.,ATTN_NONE);
|
||||
if ( loudlv > 3 ) players[consoleplayer].mo.A_StartSound(onelinersnd,CHAN_DEMOVOICEAUX3,CHANF_DEFAULT,1.,ATTN_NONE);
|
||||
}
|
||||
SendInterfaceEvent(consoleplayer,"swwmmessageliner."..oneliner,onelinerlevel,onelinerspan);
|
||||
SendNetworkEvent("swwmremoteliner."..onelinersnd,consoleplayer,onelinerlevel);
|
||||
// hack due to the fact this one can be cancelled early
|
||||
if ( onelinertype == "falling" ) Demolitionist(players[consoleplayer].mo).facegrin = true;
|
||||
|
|
@ -141,22 +142,4 @@ extend Class SWWMHandler
|
|||
onelinertic = 0;
|
||||
onelinerspan = 0;
|
||||
}
|
||||
|
||||
private ui void OnelinerUITick()
|
||||
{
|
||||
if ( (gametic != onelinertic) || (oneliner == "") || (players[consoleplayer].health <= 0) )
|
||||
return;
|
||||
if ( onelinerlevel > swwm_mutevoice )
|
||||
{
|
||||
let l = SWWMOneLiner.Make(oneliner,onelinerspan);
|
||||
StatusBar.AttachMessage(l,-3473);
|
||||
if ( swwm_voicelog )
|
||||
{
|
||||
String txt = StringTable.Localize(oneliner);
|
||||
txt.Replace("\c-","\c*"); // fix color reset escapes
|
||||
Console.PrintfEx(PRINT_CHAT|PRINT_NONOTIFY,"\cd"..(multiplayer?players[consoleplayer].GetUserName():"Demo").."\c*: "..txt.."\c*");
|
||||
}
|
||||
}
|
||||
SendNetworkEvent("swwmremotelinertxt."..oneliner,consoleplayer,onelinerlevel);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,6 +96,25 @@ extend Class SWWMHandler
|
|||
if ( e.IsManual ) return;
|
||||
if ( e.Name.Left(16) ~== "swwmsetdialogue." )
|
||||
SWWMDialogues.StartSeq(e.Name.Mid(16));
|
||||
if ( e.Name.Left(17) ~== "swwmmessageliner." )
|
||||
{
|
||||
String theline = e.Name.Mid(17);
|
||||
int linelevel = e.Args[0];
|
||||
int linespan = e.Args[1];
|
||||
if ( (theline == "") || (players[consoleplayer].health <= 0) ) return;
|
||||
if ( linelevel > swwm_mutevoice )
|
||||
{
|
||||
let l = SWWMOneLiner.Make(theline,linespan);
|
||||
StatusBar.AttachMessage(l,-3473);
|
||||
if ( swwm_voicelog )
|
||||
{
|
||||
String txt = StringTable.Localize(theline);
|
||||
txt.Replace("\c-","\c*"); // fix color reset escapes
|
||||
Console.PrintfEx(PRINT_CHAT|PRINT_NONOTIFY,"\cd"..(multiplayer?players[consoleplayer].GetUserName():"Demo").."\c*: "..txt.."\c*");
|
||||
}
|
||||
}
|
||||
SendNetworkEvent("swwmremotelinertxt."..theline,consoleplayer,linelevel);
|
||||
}
|
||||
else if ( e.Name.Left(11) ~== "swwmkeyget." )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue