X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fvehicle.cpp;h=d1e5657a0a9095c277cef53a95255ae7e27afddf;hb=8b7d4054b05002d82338775ac9b4ee764a8560e4;hp=0bd57e95da2b80d276fdf82cef0015649dc1d53d;hpb=a993f204ba2cd282637814caec3ab115040fc0cc;p=r2c2.git diff --git a/source/3d/vehicle.cpp b/source/3d/vehicle.cpp index 0bd57e9..d1e5657 100644 --- a/source/3d/vehicle.cpp +++ b/source/3d/vehicle.cpp @@ -95,10 +95,10 @@ void Vehicle3D::setup_render(GL::Renderer &renderer, const GL::Tag &) const GL::Matrix matrix; const Vector &pos = vehicle.get_position(); matrix.translate(pos.x, pos.y, pos.z); - float dir = vehicle.get_direction(); + float rot = vehicle.get_rotation(); if(vehicle.get_type().get_rotate_object()) - dir += M_PI; - matrix.rotate(dir, 0, 0, 1); + rot += M_PI; + matrix.rotate(rot, 0, 0, 1); renderer.matrix_stack() *= matrix; }