X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fbogie.cpp;h=e00e373b57f575c249b8af810d39eee635a16579;hb=54392d65e2053d1eacb4cfcc435f1013993f2973;hp=a36fc9b773c8fb9374b164ffc148c5beb3875ab2;hpb=d15ac13f2e170f155b4bbd124df48400c339b644;p=r2c2.git diff --git a/source/3d/bogie.cpp b/source/3d/bogie.cpp index a36fc9b..e00e373 100644 --- a/source/3d/bogie.cpp +++ b/source/3d/bogie.cpp @@ -26,14 +26,13 @@ void Bogie3D::setup_render(Msp::GL::Renderer &renderer, const GL::Tag &) const { GL::Matrix matrix; - const Vector &pos = vehicle.get_position(); - matrix.translate(pos.x, pos.y, pos.z); - matrix.rotate(vehicle.get_direction(), 0, 0, 1); + matrix.translate(vehicle.get_position()); + matrix.rotate(vehicle.get_rotation(), 0, 0, 1); matrix.translate(bogie.type->position, 0, 0); - float dir = bogie.direction; + Angle dir = bogie.direction; if(bogie.type->rotate_object) - dir += M_PI; + dir += Angle::half_turn(); matrix.rotate(dir, 0, 0, 1); renderer.matrix_stack() *= matrix;