mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
More NULL failsafes
This commit is contained in:
parent
fd5a8d9fb5
commit
caefcb1edc
1 changed files with 13 additions and 1 deletions
14
src/p_spec.c
14
src/p_spec.c
|
|
@ -3396,9 +3396,11 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
}
|
||||
else
|
||||
Z_Free(exc);
|
||||
|
||||
sectors[secnum].extra_colormap = source_exc;
|
||||
}
|
||||
else
|
||||
source_exc = exc;
|
||||
source_exc = exc ? exc : R_GetDefaultColormap();
|
||||
|
||||
if (line->flags & ML_EFFECT3) // relative calc
|
||||
{
|
||||
|
|
@ -7510,6 +7512,16 @@ void T_FadeColormap(fadecolormap_t *d)
|
|||
INT16 cr, cg, cb, ca, fadestart, fadeend, fog;
|
||||
INT32 rgba, fadergba;
|
||||
|
||||
// NULL failsafes (or intentionally set to signify default)
|
||||
if (!d->sector->extra_colormap)
|
||||
d->sector->extra_colormap = R_GetDefaultColormap();
|
||||
|
||||
if (!d->source_exc)
|
||||
d->source_exc = R_GetDefaultColormap();
|
||||
|
||||
if (!d->dest_exc)
|
||||
d->dest_exc = R_GetDefaultColormap();
|
||||
|
||||
// For each var (rgba + fadergba + params = 11 vars), we apply
|
||||
// percentage fading: currentval = sourceval + (delta * percent of duration elapsed)
|
||||
// delta is negative when fading out (destval is lower)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue