From 3689380ea9053511f6eb21144095c7dea3ae87ca Mon Sep 17 00:00:00 2001 From: iobyte Date: Sun, 13 Feb 2022 15:51:20 +0000 Subject: [PATCH] use macros for member variable access git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8027 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: b78af64ef18bb6d1fae52e8720e40cbeb262faa6 Former-commit-id: e2e975c477454264f665599b2b103186cc643780 --- src/modules/graphic/osggraph/Viewer/OsgHUD.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp b/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp index 3b48b41b..064ea85d 100644 --- a/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp +++ b/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp @@ -1080,11 +1080,11 @@ void SDHUD::Refresh(tSituation *s, const SDFrameInfo* frameInfo, // Parse control messages if they include ABS / TCS / SPD for (int i = 0; i < 4; i++) { - if (currCar->ctrl.msg[i]) + if (currCar->_msgCmd[i]) { - abs = abs || strstr(currCar->ctrl.msg[i], "ABS"); - tcs = tcs || strstr(currCar->ctrl.msg[i], "TCS"); - spd = spd || strstr(currCar->ctrl.msg[i], "Speed Limiter On"); + abs = abs || strstr(currCar->_msgCmd[i], "ABS"); + tcs = tcs || strstr(currCar->_msgCmd[i], "TCS"); + spd = spd || strstr(currCar->_msgCmd[i], "Speed Limiter On"); } } @@ -1236,14 +1236,14 @@ void SDHUD::Refresh(tSituation *s, const SDFrameInfo* frameInfo, } // driver inputs - changeImageSize(hudImgElements["driverinput-clutch"], currCar->ctrl.clutchCmd, "bottom", hudScale); - changeImageSize(hudImgElements["driverinput-brake"], currCar->ctrl.brakeCmd, "bottom", hudScale); - changeImageSize(hudImgElements["driverinput-throttle"], currCar->ctrl.accelCmd, "bottom", hudScale); + changeImageSize(hudImgElements["driverinput-clutch"], currCar->_clutchCmd, "bottom", hudScale); + changeImageSize(hudImgElements["driverinput-brake"], currCar->_brakeCmd, "bottom", hudScale); + changeImageSize(hudImgElements["driverinput-throttle"], currCar->_accelCmd, "bottom", hudScale); const osg::Vec3d axis(0, 0, 1); //wheel - double angle = currCar->ctrl.steer * 4; + double angle = currCar->_steerCmd * 4; osg::Vec3d center = hudImgRotableElements["driverinput-wheel"]->getBound().center();//Save the center point coordinates of the object first osg::Matrix curMatrix = hudImgRotableElements["driverinput-wheel"]->getMatrix();