Skip to content

Commit

Permalink
Fix division by 0 crash in QuantizeFacing.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Dec 8, 2024
1 parent 5faff48 commit 4bf7c7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions OpenRA.Mods.Common/Traits/BodyOrientation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public WRot QuantizeOrientation(in WRot orientation, int facings)

public virtual WAngle QuantizeFacing(WAngle facing, int facings)
{
// Quantization disabled
if (facings == 0)
return facing;

return Util.QuantizeFacing(facing, facings);
}

Expand Down

0 comments on commit 4bf7c7f

Please sign in to comment.