EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

[#1933] Validate impulse_request values

Open oznogon opened this issue 1 year ago • 0 comments

#1933 shows that directly setting impulse_request on a SpaceShip can result in unusable or poorly defined values, such as infinity/-infinity from dividing by 0 impulse speed on Odins and Defense Platforms.

Add a setImpulseRequest() function that clamps the passed value and replace direct modifications of impulse_request with it.

Fixes #1933.

oznogon avatar Mar 04 '23 02:03 oznogon