unhack the animated votescreen a little

also make it pause when the game is paused like it was intended originally
This commit is contained in:
Alug committed 2024-05-20 17:18:06 +02:00
1 parent 78bcfa8cfa
commit b9653b4ff8
1 file changed
+6 -7
+6 -7
View File
@@ -163,7 +163,6 @@ typedef struct
static y_votelvlinfo levelinfo[5];
static y_voteclient voteclient;
static INT32 votetic;
static INT32 lastvotetic;
static INT32 voteendtic = -1;
static patch_t *cursor = NULL;
static patch_t *cursor1 = NULL;
@@ -1016,11 +1015,13 @@ static inline void Y_DrawAnimatedVoteScreenPatch(boolean widePatch)
currentAnimFrame = 0;
}
patch_t *background = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_CACHE);
V_DrawScaledPatch(160 - (background->width / 2), (200 - (background->height)), V_SNAPTOBOTTOM|V_SNAPTOTOP, background);
patch_t *background = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_CACHE);
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(background->width)/2), // Keep the width/height adjustments, for screens that are less wide than 320(?)
(vid.height / vid.dupy) - SHORT(background->height),
V_SNAPTOTOP|V_SNAPTOLEFT, background);
if (lastvotetic != votetic && lastvotetic % 2 == 0)
currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames - 1) ? 0 : currentAnimFrame + 1; // jeez no fucking idea how to make this shit not go nuts with interpolation
if (renderisnewtic && votetic % 2 == 0 && !paused)
currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames - 1) ? 0 : currentAnimFrame + 1;
}
//
@@ -1287,8 +1288,6 @@ void Y_VoteDrawer(void)
V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol,
va("Vote ends in %d", tickdown));
}
lastvotetic = votetic;
if (renderisnewtic)
{