mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-26 13:01:52 +00:00
Range check
This commit is contained in:
parent
b7a67bd8ca
commit
a1fb309392
2 changed files with 6 additions and 3 deletions
|
|
@ -8954,8 +8954,8 @@ void A_ChangeColorAbsolute(mobj_t *actor)
|
|||
//
|
||||
// Description: Colorizes an object.
|
||||
//
|
||||
// var1 = if (var1 > 0), dye your target instead of yourself
|
||||
// var2 = if (var1 = 0), color value to dye
|
||||
// var1 = if (var1 != 0), dye your target instead of yourself
|
||||
// var2 = color value to dye
|
||||
//
|
||||
void A_Dye(mobj_t *actor)
|
||||
{
|
||||
|
|
@ -8968,6 +8968,9 @@ void A_Dye(mobj_t *actor)
|
|||
mobj_t *target = ((locvar1 && actor->target) ? actor->target : actor);
|
||||
UINT8 color = (UINT8)locvar2;
|
||||
|
||||
if (color >= MAXTRANSLATIONS)
|
||||
return;
|
||||
|
||||
// What if it's a player?
|
||||
if (target->player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4061,7 +4061,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
|
||||
if (mo)
|
||||
{
|
||||
if (color < 0 || color > MAXSKINCOLORS)
|
||||
if (color < 0 || color >= MAXTRANSLATIONS)
|
||||
return;
|
||||
|
||||
var1 = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue