HomeWildfire Games

Fix missing parentheses in formation turning angle calculation

Description

Fix missing parentheses in formation turning angle calculation

The function that is calculating the difference between the two angles is missing some parentheses.

Didn't notice it sooner as it works in 95% of all cases without them, but sometimes you can see the formation doing a wrong turn.

reviewed by : @Freagarach

Differential revision: https://code.wildfiregames.com/D4626

Event Timeline

Silier added a subscriber: Silier.Wed, May 11, 6:59 PM
Silier added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/Formation.js
889

btw comment is wrong

marder added inline comments.Wed, May 11, 7:20 PM
/ps/trunk/binaries/data/mods/public/simulation/components/Formation.js
889

hm true. should be :
Returns true if the difference between the two given angles (in radians) is smaller than the maximum turning angle of the formation ...