Prevent SIM_SUSP_EXT state oscillating

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6020 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f151a86044e3cda07d61c61442235f94aa82a93c
Former-commit-id: 7c4f0465b8ee99d71b9f17ce46428ab85802a8fe
This commit is contained in:
kakukri 2015-06-08 01:59:33 +00:00
parent 8739896e50
commit bbf3acc184

View file

@ -102,7 +102,7 @@ void SimSuspCheckIn(tSuspension *susp)
susp->state = SIM_SUSP_COMP;
}
susp->x *= susp->spring.bellcrank;
if (susp->x > susp->spring.xMax) {
if (susp->x >= susp->spring.xMax) {
susp->x = susp->spring.xMax;
susp->state = SIM_SUSP_EXT;
}