From ba3e89665534d5ab6a38e9a86e1874631e4a1fe8 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 28 Nov 2021 20:15:42 +0000 Subject: [PATCH 1/3] Make the game loading-bar miniwindow do OS polling, to allow you to tab back into it without it being considered frozen by the OS. --- src/console.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/console.c b/src/console.c index 5eda4f7fa..4d71e74d3 100644 --- a/src/console.c +++ b/src/console.c @@ -1916,6 +1916,8 @@ void CON_SetLoadingProgress(con_loadprogress_t newStep) if (con_startup_loadprogress < LOADED_ISTARTUPGRAPHICS) // rendering not possible? return; CON_DrawLoadBar(); // here we display the console text + I_OsPolling(); + I_UpdateNoBlit(); I_FinishUpdate(); // page flip or blit buffer } From 15741da0a486b4724cca4eb19acf15c3d26275d6 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 28 Nov 2021 20:18:41 +0000 Subject: [PATCH 2/3] Improve some of the efficiency loss in F_DoWipe compared to K.S.'s 2.1 code by seperating out some of the loops. --- src/f_wipe.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/f_wipe.c b/src/f_wipe.c index ddc719e6d..db343d050 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -299,16 +299,23 @@ static void F_DoWipe(fademask_t *fademask, lighttable_t *fadecolormap, boolean r e = e_base + relativepos; draw_rowstogo = draw_rowend - draw_rowstart; - while (draw_rowstogo--) + if (fadecolormap) { - if (fadecolormap != NULL) + if (reverse) + s = e; + while (draw_rowstogo--) + *w++ = fadecolormap[ ( m << 8 ) + *s++ ]; + } + else while (draw_rowstogo--) + { + /*if (fadecolormap != NULL) { if (reverse) *w++ = fadecolormap[ ( m << 8 ) + *e++ ]; else *w++ = fadecolormap[ ( m << 8 ) + *s++ ]; } - else + else*/ *w++ = transtbl[ ( *e++ << 8 ) + *s++ ]; } From 88528744650482f469488b3bf80716a95e6a222b Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 28 Nov 2021 20:27:32 +0000 Subject: [PATCH 3/3] KHUD NOT NETSYNCED, hyuu cannot safely use it as a reference point --- src/d_player.h | 2 +- src/k_kart.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index 3d9ac11dc..94310f06e 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -202,7 +202,7 @@ typedef enum { // Unsynced, HUD or clientsided effects // Item box - khud_itemblink, // Item flashing after roulette, prevents Hyudoro stealing AND serves as a mashing indicator + khud_itemblink, // Item flashing after roulette, serves as a mashing indicator khud_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items) // Rings diff --git a/src/k_kart.c b/src/k_kart.c index 4ab844c2d..e702be207 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4885,8 +4885,7 @@ static void K_DoHyudoroSteal(player_t *player) // Has an item && (players[i].itemtype && players[i].itemamount - && !(players[i].pflags & PF_ITEMOUT) - && !players[i].karthud[khud_itemblink])) + && !(players[i].pflags & PF_ITEMOUT)) { playerswappable[numplayers] = i; numplayers++; @@ -6355,6 +6354,12 @@ void K_KartPlayerHUDUpdate(player_t *player) else if (player->karthud[khud_fault] > 0 && player->karthud[khud_fault] < 2*TICRATE) player->karthud[khud_fault]++; + if (player->karthud[khud_itemblink] && player->karthud[khud_itemblink]-- <= 0) + { + player->karthud[khud_itemblinkmode] = 0; + player->karthud[khud_itemblink] = 0; + } + if (gametype == GT_RACE) { // 0 is the fast spin animation, set at 30 tics of ring boost or higher! @@ -6873,13 +6878,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) K_HandleTumbleBounce(player); } - // This doesn't go in HUD update because it has potential gameplay ramifications - if (player->karthud[khud_itemblink] && player->karthud[khud_itemblink]-- <= 0) - { - player->karthud[khud_itemblinkmode] = 0; - player->karthud[khud_itemblink] = 0; - } - K_KartPlayerHUDUpdate(player); if (battleovertime.enabled && !(player->pflags & PF_ELIMINATED) && player->bumpers <= 0 && player->karmadelay <= 0)