X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Frod.cpp;h=5ae458484bd171844a1f6480e264c2985410250d;hb=cb4e53ba1b8ea41b978190de6668e9862b9cfea8;hp=86a6a9cf95d434a6873cabb4607c90b65dc1b9c4;hpb=f8a7788cee0261babfc4c804a58515aad6dfbc3d;p=r2c2.git diff --git a/source/3d/rod.cpp b/source/3d/rod.cpp index 86a6a9c..5ae4584 100644 --- a/source/3d/rod.cpp +++ b/source/3d/rod.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2011 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include #include "rod.h" @@ -32,11 +25,10 @@ void Rod3D::render(GL::Renderer &renderer, const GL::Tag &tag) const void Rod3D::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); - matrix.rotate(vehicle.get_direction(), 0, 0, 1); + matrix.translate(vehicle.get_position()); + matrix.rotate(vehicle.get_rotation(), 0, 0, 1); - matrix.translate(rod.position.x, rod.position.y, rod.position.z); + matrix.translate(rod.position); if(rod.type->mirror_object) matrix.scale(1, -1, 1); matrix.rotate(rod.angle, 0, -1, 0);