From ba88a4f2a536e18942eac16780ca20fbd601402c Mon Sep 17 00:00:00 2001 From: dexy Date: Sun, 23 Dec 2018 17:20:49 +1100 Subject: [PATCH] Not rendering selected cargen twice if already rendering cars --- WorldForm.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WorldForm.cs b/WorldForm.cs index f0be335..2b1e2d5 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -1319,10 +1319,13 @@ namespace CodeWalker float arrowrad = arrowlen * 0.066f; Renderer.RenderSelectionArrowOutline(cg.Position, Vector3.UnitX, Vector3.UnitY, ori, arrowlen, arrowrad, cgrn); - Quaternion cgtrn = Quaternion.RotationAxis(Vector3.UnitZ, (float)Math.PI * -0.5f); //car fragments currently need to be rotated 90 deg right... - Quaternion cgori = Quaternion.Multiply(ori, cgtrn); + if (!Renderer.rendercars)//only render selected car if not already rendering cars.. + { + Quaternion cgtrn = Quaternion.RotationAxis(Vector3.UnitZ, (float)Math.PI * -0.5f); //car fragments currently need to be rotated 90 deg right... + Quaternion cgori = Quaternion.Multiply(ori, cgtrn); - Renderer.RenderCar(cg.Position, cgori, cg._CCarGen.carModel, cg._CCarGen.popGroup); + Renderer.RenderCar(cg.Position, cgori, cg._CCarGen.carModel, cg._CCarGen.popGroup); + } } if (selectionItem.PathNode != null) {