diff --git a/src/console.c b/src/console.c index d02f68bb6..8ca29f901 100644 --- a/src/console.c +++ b/src/console.c @@ -1437,6 +1437,8 @@ void CONS_Error(const char *msg) // dirty quick hack, but for the good cause while (I_GetKey() != KEY_ENTER) { + I_HandleInterrupt(); + // Sleep so we don't take too much of cpu usage I_Sleep(1.f/TICRATE*1000); diff --git a/src/d_clisrv.c b/src/d_clisrv.c index d5f10daa3..7113f6ca9 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2858,10 +2858,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic { INT32 key; - if (I_Interrupted()) - { - I_Quit(); - } + I_HandleInterrupt(); I_OsPolling(); diff --git a/src/d_main.c b/src/d_main.c index c9df6e441..be19da2de 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -726,10 +726,7 @@ void D_SRB2Loop(void) enterprecise = I_GetPreciseTime(); - if (I_Interrupted()) - { - I_Quit(); - } + I_HandleInterrupt(); memset(&g_dc, 0, sizeof(g_dc)); Z_Frame_Reset(); diff --git a/src/f_wipe.c b/src/f_wipe.c index 18100da4c..32b385c9e 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -361,10 +361,7 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) // on for fade-to-black for (;;) { - if (I_Interrupted()) - { - I_Quit(); - } + I_HandleInterrupt(); // get fademask first so we can tell if it exists or not fmask = F_GetFadeMask(wipetype, wipeframe++); diff --git a/src/i_system.h b/src/i_system.h index 9457e9c6d..9e981cf0f 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -203,6 +203,11 @@ void I_ShutdownSystem(void); /** \brief To check if a Interrupt or Terminate Signal was fired */ boolean I_Interrupted(void); +static inline void I_HandleInterrupt(void) +{ + if (I_Interrupted()) + I_Quit(); +} /** \brief The I_GetDiskFreeSpace function diff --git a/src/p_setup.c b/src/p_setup.c index 4423b7d26..0be23b262 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1740,15 +1740,23 @@ static boolean P_LoadRawBlockMap(UINT8 *data, size_t count) bmaporgx = blockmaplump[0]<flags & FF_SOLID) - { - continue; // shortcut since neither mobj can be inside the 3dfloor - } - // Check for blocking floors here. topz2 = P_GetFFloorTopZAt (rover, t2->x, t2->y); @@ -457,6 +452,11 @@ boolean P_CheckSight2(mobj_t *t1, mobj_t *t2, boolean fast) return false; } + if (rover->flags & FF_SOLID) + { + continue; // shortcut since neither mobj can be inside the 3dfloor + } + if (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES)) { if (los.sightzstart >= topz1 && t2->z + t2->height < topz2)