diff --git a/source/blood/src/loadsave.cpp b/source/blood/src/loadsave.cpp index 2fc20e54d..13633402a 100644 --- a/source/blood/src/loadsave.cpp +++ b/source/blood/src/loadsave.cpp @@ -166,6 +166,7 @@ void LoadSave::LoadGame(char *pzFile) gGameMessageMgr.Clear(); viewSetErrorMessage(""); viewResizeView(gViewSize); + viewUpdatePages(); if (!gGameStarted) { netWaitForEveryone(0); diff --git a/source/blood/src/menu.cpp b/source/blood/src/menu.cpp index 0316dd213..7930945f3 100644 --- a/source/blood/src/menu.cpp +++ b/source/blood/src/menu.cpp @@ -2699,6 +2699,7 @@ void SaveGame(CGameMenuItemZEditBitmap *pItem, CGameMenuEvent *event) UpdateSaveGameItemText(nSlot); gGameMenuMgr.Deactivate(); viewSetMessage("Game saved"); + viewUpdatePages(); } void QuickSaveGame(void) @@ -2726,6 +2727,7 @@ void QuickSaveGame(void) UpdateSaveGameItemText(gQuickSaveSlot); gGameMenuMgr.Deactivate(); viewSetMessage("Game saved"); + viewUpdatePages(); } void LoadGame(CGameMenuItemZEditBitmap *pItem, CGameMenuEvent *event) diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 0adf317ed..38a043771 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -1290,7 +1290,7 @@ WEAPONICON gWeaponIconVoxel[] = { { -1, 0 }, }; -int dword_14C508; +int gLastPageTick; void viewDrawStats(PLAYER *pPlayer, int x, int y) { @@ -1316,6 +1316,8 @@ void viewDrawStats(PLAYER *pPlayer, int x, int y) y += nHeight+1; sprintf(buffer, "S:%d/%d", gSecretMgr.nNormalSecretsFound, max(gSecretMgr.nNormalSecretsFound, gSecretMgr.nAllSecrets)); // if we found more than there are, increase the total - some levels have a bugged counter viewDrawText(3, buffer, x, y, 20, 0, 0, true, 256); + if (gViewMode == 3 && gViewSize > 3) // redraw boarders + viewUpdatePages(); } #define kPowerUps 11 @@ -1398,6 +1400,12 @@ void viewDrawPowerUps(PLAYER* pPlayer) DrawStatNumber("%d", nTime, kSBarNumberInv, x + 15, y, 0, nTime > nWarning ? 0 : 2, 256, fix16_from_float(0.5f)); y += 20; } + if (nSortCount && (gViewSize > 3)) + { + if (nSortPower[nSortCount - 1] != gLastPageTick) + viewUpdatePages(); + gLastPageTick = nSortPower[nSortCount - 1]; + } } void viewDrawMapTitle(void) @@ -1474,11 +1482,11 @@ void viewDrawPack(PLAYER *pPlayer, int x, int y) x += tilesiz[gPackIcons[nPack]].x + 1; } } - if (pPlayer->packItemTime != dword_14C508) + if (pPlayer->packItemTime != gLastPageTick) { viewUpdatePages(); } - dword_14C508 = pPlayer->packItemTime; + gLastPageTick = pPlayer->packItemTime; } void DrawPackItemInStatusBar(PLAYER *pPlayer, int x, int y, int x2, int y2, int nStat) @@ -1640,6 +1648,9 @@ void viewDrawCtfHud(ClockTicks arg) else if (redFlagTaken) DrawStatMaskedSprite(4097, 307, 111, 0, redFlagCarrierColor ? 2 : 10, 512, 65536); flashTeamScore(arg, 1, true); + + if ((gViewSize > 3) && (blueFlagTaken || redFlagTaken || gPlayerScoreTicks[0] > 0 || gPlayerScoreTicks[1] > 0)) + viewUpdatePages(); } void UpdateStatusBar(ClockTicks arg) @@ -2068,7 +2079,8 @@ void UpdateFrame(void) void viewDrawInterface(ClockTicks arg) { - if (gViewMode == 3/* && gViewSize >= 3*/ && (pcBackground != 0 || videoGetRenderMode() >= REND_POLYMOST)) + const char bDrawFragsBg = (gGameOptions.nGameType != kGameTypeSinglePlayer) && (!VanillaMode() || gGameOptions.nGameType != kGameTypeTeams); + if (gViewMode == 3 && (gViewSize >= 3 || bDrawFragsBg) && (pcBackground != 0 || videoGetRenderMode() >= REND_POLYMOST)) { UpdateFrame(); pcBackground--;