summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-08 23:57:18 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-08 23:57:18 +0200
commit4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64 (patch)
tree0762a5e6d4e3effe8a22c1fafa69e7ba6eabe868 /src/control/CarCtrl.cpp
parentMerge branch 'miami' into lcs (diff)
downloadre3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.tar
re3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.tar.gz
re3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.tar.bz2
re3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.tar.lz
re3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.tar.xz
re3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.tar.zst
re3-4b7dc08bf5aece0ca238edbb0a99e1f6550f9f64.zip
Diffstat (limited to '')
-rw-r--r--src/control/CarCtrl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 29200d0a..0221a5eb 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -3442,10 +3442,12 @@ void CCarCtrl::RenderDebugInfo(CVehicle* pVehicle)
CVector vCurPos(vCurNodePos);
CVector vCurDir(0.0f, 0.0f, 1.0f);
for (int i = 0; i < 10; i++) {
- CVector vNextPos = vCurPos;
+ CVector vPrevPos = vCurPos;
CCurves::CalcCurvePoint(&vCurNodePos, &vNextNodePos, &vCurLinkDir, &vNextLinkDir, i * 0.1f, pVehicle->AutoPilot.m_nTimeToSpendOnCurrentCurve, &vCurPos, &vCurDir);
// Render3DLine(&vCurPos, &vNextPos, CVector(255.0f, 255.0f, 0.0f, 255.0f)); // <- originally this is called, let's reuse stuff we have
- CLines::RenderLineWithClipping(vCurPos.x, vCurPos.y, vCurPos.z, vNextPos.x, vNextPos.y, vNextPos.z, 0xFF0000FF, 0xFF0000FF);
+ // TODO: not drawing :(
+ CLines::RenderLineWithClipping(vPrevPos.x, vPrevPos.y, vCurNodePos.z, vCurPos.x, vCurPos.y, vNextNodePos.z, 0xFFFF00FF, 0xFFFF00FF); // using NodePos for Z coord cause Curves set it to 0
}
+ DefinedState();
}
}