diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 50570618fd..4bd7df6a91 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5683,6 +5683,7 @@ scriptwait: float x = FIXED2FLOAT(Stack[optstart-3]); float y = FIXED2FLOAT(Stack[optstart-2]); float holdTime = FIXED2FLOAT(Stack[optstart-1]); + fixed_t alpha; DHUDMessage *msg; if (type & HUDMSG_COLORSTRING) @@ -5697,11 +5698,13 @@ scriptwait: switch (type & 0xFF) { default: // normal + alpha = (optstart < sp) ? Stack[optstart] : FRACUNIT; msg = new DHUDMessage (activefont, work, x, y, hudwidth, hudheight, color, holdTime); break; case 1: // fade out { float fadeTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.5f; + alpha = (optstart < sp-1) ? Stack[optstart+1] : FRACUNIT; msg = new DHUDMessageFadeOut (activefont, work, x, y, hudwidth, hudheight, color, holdTime, fadeTime); } break; @@ -5709,6 +5712,7 @@ scriptwait: { float typeTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.05f; float fadeTime = (optstart < sp-1) ? FIXED2FLOAT(Stack[optstart+1]) : 0.5f; + alpha = (optstart < sp-2) ? Stack[optstart+2] : FRACUNIT; msg = new DHUDMessageTypeOnFadeOut (activefont, work, x, y, hudwidth, hudheight, color, typeTime, holdTime, fadeTime); } break; @@ -5716,11 +5720,13 @@ scriptwait: { float inTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.5f; float outTime = (optstart < sp-1) ? FIXED2FLOAT(Stack[optstart+1]) : 0.5f; + alpha = (optstart < sp-2) ? Stack[optstart+2] : FRACUNIT; msg = new DHUDMessageFadeInOut (activefont, work, x, y, hudwidth, hudheight, color, holdTime, inTime, outTime); } break; } msg->SetVisibility((type & HUDMSG_VISIBILITY_MASK) >> HUDMSG_VISIBILITY_SHIFT); + msg->SetAlpha(alpha); if (type & HUDMSG_ADDBLEND) { msg->SetRenderStyle(STYLE_Add);