fix wipes sometimes not working
Zzz..... forgor wipes do their own weird loop
This commit is contained in:
1 parent
03751e1b59
commit
6cf86d6cb3
2 files changed
+14
-1
No files matched your search
+4
-1
@@ -98,7 +98,8 @@ static fixed_t paldiv;
|
||||
* \param lump Lump name to get data from
|
||||
* \return fademask_t for lump
|
||||
*/
|
||||
static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum) {
|
||||
static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum)
|
||||
{
|
||||
static char lumpname[9] = "FADEmmss";
|
||||
static fademask_t fm = {NULL,0,0,0,0,0};
|
||||
lumpnum_t lumpnum;
|
||||
@@ -148,6 +149,7 @@ static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum) {
|
||||
case 0: // end marker (not bad!, but still need clearing)
|
||||
goto freemask;
|
||||
}
|
||||
|
||||
if (lsize != fm.size)
|
||||
fm.mask = Z_Realloc(fm.mask, lsize, PU_STATIC, NULL);
|
||||
fm.size = lsize;
|
||||
@@ -361,6 +363,7 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||
{
|
||||
// get fademask first so we can tell if it exists or not
|
||||
fmask = F_GetFadeMask(wipetype, wipeframe++);
|
||||
|
||||
if (!fmask)
|
||||
break;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "m_fixed.h"
|
||||
#include "i_system.h"
|
||||
|
||||
#include "f_finale.h"
|
||||
|
||||
timestate_t g_time;
|
||||
|
||||
static CV_PossibleValue_t timescale_cons_t[] = {{FRACUNIT/20, "MIN"}, {20*FRACUNIT, "MAX"}, {0, NULL}};
|
||||
@@ -51,6 +53,10 @@ static void I_GetTimeAndFrac(tic_t *outtics, fixed_t *outfrac)
|
||||
|
||||
tic_t I_GetTime(void)
|
||||
{
|
||||
// Beware wipes run on their own loop which affects global time state!
|
||||
if (WipeInAction)
|
||||
return g_time.time;
|
||||
|
||||
tic_t tic;
|
||||
I_GetTimeAndFrac(&tic, NULL);
|
||||
return tic;
|
||||
@@ -58,6 +64,10 @@ tic_t I_GetTime(void)
|
||||
|
||||
fixed_t I_GetTimeFrac(void)
|
||||
{
|
||||
// Beware wipes run on their own loop which affects global time state!
|
||||
if (WipeInAction)
|
||||
return g_time.timefrac;
|
||||
|
||||
fixed_t frac;
|
||||
I_GetTimeAndFrac(NULL, &frac);
|
||||
return frac;
|
||||
|
||||
Reference in new issue
Block a user