1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 10:22:52 +01:00

Add vehicle generators to AI debug view

This commit is contained in:
Daniel Evans 2016-06-26 03:57:19 +01:00
parent 69e7d32f3a
commit 45103c3440

View File

@ -722,6 +722,20 @@ void RWGame::renderDebugPaths(float time)
debug->drawLine(max, max - btVector3(0.f, 0.f, 0.5f), maxColor);
}
// Draw vehicle generators
for(size_t v = 0; v < state->vehicleGenerators.size(); ++v) {
auto& generator = state->vehicleGenerators[v];
btVector3 color(1.f, 0.f, 0.f);
btVector3 position(generator.position.x,generator.position.y,generator.position.z);
float heading = glm::radians(generator.heading);
auto back = btVector3(0.f,-1.f, 0.f).rotate(btVector3(0.f, 0.f, 1.f), heading);
auto right = btVector3(0.15f, -0.15f, 0.f).rotate(btVector3(0.f, 0.f, 1.f), heading);
auto left = btVector3(-0.15f,-0.15f, 0.f).rotate(btVector3(0.f, 0.f, 1.f), heading);
debug->drawLine(position, position+back, color);
debug->drawLine(position, position+right, color);
debug->drawLine(position, position+left, color);
}
debug->flush(renderer);
}