mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- tick the fortune cookie display within the playsim code to ensure its duration is handled properly.
Fixes #204
This commit is contained in:
parent
f327e3832a
commit
91cc6a657b
3 changed files with 12 additions and 2 deletions
|
@ -7700,6 +7700,16 @@ domovethings(void)
|
|||
pp = Player + pnum;
|
||||
GlobPlayerP = pp;
|
||||
|
||||
if (pp->cookieTime)
|
||||
{
|
||||
pp->cookieTime -= synctics;
|
||||
if (pp->cookieTime <= 0)
|
||||
{
|
||||
memset(pp->cookieQuote, 0, sizeof(pp->cookieQuote));
|
||||
pp->cookieTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// auto tracking mode for single player multi-game
|
||||
if (numplayers <= 1 && PlayerTrackingMode && pnum == screenpeek && screenpeek != myconnectindex)
|
||||
{
|
||||
|
|
|
@ -1003,7 +1003,7 @@ void UpdateStatusBar(ClockTicks arg)
|
|||
|
||||
sbar.UpdateStatusBar(arg);
|
||||
PLAYERp pp = &Player[screenpeek];
|
||||
if (totalclock < pp->cookieTime)
|
||||
if (pp->cookieTime > 0)
|
||||
{
|
||||
const int MESSAGE_LINE = 142; // Used to be 164
|
||||
MNU_DrawSmallString(160, MESSAGE_LINE, pp->cookieQuote, 0, 0, 0, clamp((pp->cookieTime - totalclock) / 60., 0., 1.));
|
||||
|
|
|
@ -5728,7 +5728,7 @@ KeyMain:
|
|||
Printf(TEXTCOLOR_SAPPHIRE "%s\n", msg.GetChars());
|
||||
strncpy(pp->cookieQuote, msg, 255);
|
||||
pp->cookieQuote[255] = 0;
|
||||
pp->cookieTime = totalclock + 540;
|
||||
pp->cookieTime = 540;
|
||||
}
|
||||
|
||||
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
|
||||
|
|
Loading…
Reference in a new issue