mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-17 01:05:32 +08:00
Not rendering selected cargen twice if already rendering cars
This commit is contained in:
+6
-3
@@ -1319,10 +1319,13 @@ namespace CodeWalker
|
|||||||
float arrowrad = arrowlen * 0.066f;
|
float arrowrad = arrowlen * 0.066f;
|
||||||
Renderer.RenderSelectionArrowOutline(cg.Position, Vector3.UnitX, Vector3.UnitY, ori, arrowlen, arrowrad, cgrn);
|
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...
|
if (!Renderer.rendercars)//only render selected car if not already rendering cars..
|
||||||
Quaternion cgori = Quaternion.Multiply(ori, cgtrn);
|
{
|
||||||
|
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)
|
if (selectionItem.PathNode != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user