mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- validate fountaincolor before using it.
This commit is contained in:
parent
3213f046c2
commit
d5888dfa0a
2 changed files with 2 additions and 1 deletions
|
@ -1624,4 +1624,4 @@ DEFINE_ACTION_FUNCTION(_Screen, SetOffset)
|
|||
PARAM_FLOAT(x);
|
||||
PARAM_FLOAT(y);
|
||||
ACTION_RETURN_VEC2(twod->SetOffset(DVector2(x, y)));
|
||||
}
|
||||
}
|
|
@ -440,6 +440,7 @@ void P_RunEffect (AActor *actor, int effects)
|
|||
&grey4, &white
|
||||
};
|
||||
int color = actor->fountaincolor*2;
|
||||
if (color < 0 || color >= 16) color = 0;
|
||||
MakeFountain (actor, *fountainColors[color], *fountainColors[color+1]);
|
||||
}
|
||||
if (effects & FX_RESPAWNINVUL)
|
||||
|
|
Loading…
Reference in a new issue