From: Mikko Rasa Date: Sun, 13 Feb 2011 20:51:28 +0000 (+0000) Subject: Use the rotate_object flag of Bogie when rendering X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=895f5a36ee5a4fcba95ad88b7a197bf61f1f501d;p=r2c2.git Use the rotate_object flag of Bogie when rendering --- diff --git a/source/3d/bogie.cpp b/source/3d/bogie.cpp index de7d1bb..234bd88 100644 --- a/source/3d/bogie.cpp +++ b/source/3d/bogie.cpp @@ -38,7 +38,10 @@ void Bogie3D::setup_render(Msp::GL::Renderer &renderer, const GL::Tag &) const matrix.rotate(vehicle.get_direction(), 0, 0, 1); matrix.translate(bogie.type->position, 0, 0); - matrix.rotate(bogie.direction, 0, 0, 1); + float dir = bogie.direction; + if(bogie.type->rotate_object) + dir += M_PI; + matrix.rotate(dir, 0, 0, 1); renderer.matrix_stack() *= matrix; }