mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-08-21 17:39:20 +08:00
Not rendering selected cargen twice if already rendering cars
This commit is contained in:
parent
a7c17f318c
commit
ba88a4f2a5
@ -1319,11 +1319,14 @@ 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);
|
||||||
|
|
||||||
|
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 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);
|
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)
|
||||||
{
|
{
|
||||||
camrel = selectionItem.PathNode.Position - camera.Position;
|
camrel = selectionItem.PathNode.Position - camera.Position;
|
||||||
|
Loading…
Reference in New Issue
Block a user