From 65f372ce35e191ab015426805377fcb9e2d79519 Mon Sep 17 00:00:00 2001 From: mungewell Date: Wed, 11 Apr 2012 06:07:18 +0000 Subject: [PATCH] 672 cross hair steering and braking fixes git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4688 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: cd42c527c1da2b541dea4cb5a6de92aa436e2939 Former-commit-id: 72148949d007db13938f6a82cf3c9ffac7ed0405 --- src/modules/graphic/ssggraph/grboard.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/graphic/ssggraph/grboard.cpp b/src/modules/graphic/ssggraph/grboard.cpp index 7676d912b..cff4ac272 100644 --- a/src/modules/graphic/ssggraph/grboard.cpp +++ b/src/modules/graphic/ssggraph/grboard.cpp @@ -261,7 +261,7 @@ cGrBoard::grDispGGraph(tCarElt *car) // a) Detect wheel blocking, and change current color to red if so. for (int xx = 0; xx < 4; ++xx) { - if (car->_wheelSpinVel(xx) < car->_speed_x - 5.0f) + if (fabs(car->_speed_x) - fabs(car->_wheelSpinVel(xx) * car->_wheelRadius(xx)) > 5.0f) { glColor4f(1.0, 0.0, 0.0, 1.0); break; @@ -282,8 +282,8 @@ cGrBoard::grDispGGraph(tCarElt *car) // length proportional to the steer command). glVertex2f(X1, Y1 - THNSS); glVertex2f(X1, Y1 + THNSS); - glVertex2f(X1 - car->ctrl.steer * 100.0f, Y1 + THNSS); - glVertex2f(X1 - car->ctrl.steer * 100.0f, Y1 - THNSS); + glVertex2f(X1 - car->ctrl.steer * 50.0f, Y1 + THNSS); + glVertex2f(X1 - car->ctrl.steer * 50.0f, Y1 - THNSS); // Draw the clutch gauge (vertical thick segment, starting in xc, yc, // going upwards, length proportional to the clutch command).