1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-18 16:32:32 +02:00

Add option to flip vehicle in debug menu

This commit is contained in:
Jannik Vogel 2016-05-29 14:51:37 +02:00
parent 79b7ec2b17
commit 846771aa82

View File

@ -130,6 +130,15 @@ DebugState::DebugState(RWGame* game, const glm::vec3& vp, const glm::quat& vd)
game->getRenderer()->setCullOverride(true, _debugCam);
}, entryHeight));
// Optional block if the player is in a vehicle
auto player = game->getPlayer()->getCharacter();
auto cv = player->getCurrentVehicle();
if(cv) {
m->addEntry(Menu::lambda("Flip vehicle", [=] {
cv->setRotation(cv->getRotation() * glm::quat(glm::vec3(0.f, glm::pi<float>(), 0.f)));
}, entryHeight));
}
this->enterMenu(m);
_debugCam.position = vp;