From c5205660419679499cd6c7c89426279290bea5ce Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 16 Jan 2012 01:51:12 +0100 Subject: quick optimisation I noticed --- src/koopatlas/map.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/koopatlas') diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index d78aad4..0334926 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -352,11 +352,13 @@ void dWMMap_c::renderer_c::renderDoodadLayer(dKPLayer_s *layer) { Mtx doodadMtx; MTXTransApply(renderMtx, doodadMtx, effectiveX + halfW, -effectiveY - halfH, 0); - - Mtx rotMtx; - MTXRotDeg(rotMtx, 'z', -effectiveAngle); - MTXConcat(doodadMtx, rotMtx, doodadMtx); + if (effectiveAngle != 0) { + Mtx rotMtx; + MTXRotDeg(rotMtx, 'z', -effectiveAngle); + + MTXConcat(doodadMtx, rotMtx, doodadMtx); + } loadCamera(doodadMtx); loadTexture(doodad->texObj); -- cgit v1.2.3