Skip to content

Commit

Permalink
Add check for bad infighting group
Browse files Browse the repository at this point in the history
  • Loading branch information
kraflab committed Apr 9, 2021
1 parent 21d48bf commit c843037
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion prboom2/src/d_deh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,13 @@ static void setMobjInfoValue(int mobjInfoIndex, int keyIndex, uint_64_t value) {
// custom groups count from the end of the vanilla list
// -> no concern for clashes
case 25:
mi->infighting_group = (int)(value) + IG_END;
mi->infighting_group = (int)(value);
if (mi->infighting_group < 0)
{
I_Error("Infighting groups must be >= 0 (check your dehacked)");
return;
}
mi->infighting_group = mi->infighting_group + IG_END;
return;
case 26:
mi->projectile_group = (int)(value);
Expand Down

0 comments on commit c843037

Please sign in to comment.