From b63d07616ef9add6e0d29be4850e575805693499 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Fri, 29 Sep 2017 15:54:55 -0500 Subject: [PATCH] adds fallbacks to the aiTurret's scannode to operate similar to the aimNode, letting folks skip out on adding either and just using pitch (or failing that, heading) --- Engine/source/T3D/turret/aiTurretShape.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Engine/source/T3D/turret/aiTurretShape.cpp b/Engine/source/T3D/turret/aiTurretShape.cpp index b0c903950..d4bbd70eb 100644 --- a/Engine/source/T3D/turret/aiTurretShape.cpp +++ b/Engine/source/T3D/turret/aiTurretShape.cpp @@ -249,14 +249,11 @@ bool AITurretShapeData::preload(bool server, String &errorStr) // We have mShape at this point. Resolve nodes. scanNode = mShape->findNode("scanPoint"); aimNode = mShape->findNode("aimPoint"); - if (aimNode == -1) - { - aimNode = pitchNode; - } - if (aimNode == -1) - { - aimNode = headingNode; - } + + if (scanNode == -1) scanNode = pitchNode; + if (scanNode == -1) scanNode = headingNode; + if (aimNode == -1) aimNode = pitchNode; + if (aimNode == -1) aimNode = headingNode; // Resolve state sequence names & emitter nodes isAnimated = false;