Преглед изворни кода

Merge pull request #2092 from Azaezel/AIAimpoint

adds fallbacks to the aiTurret's scannode to operate similar to the aimNode
Areloch пре 7 година
родитељ
комит
a482977ab8
1 измењених фајлова са 5 додато и 8 уклоњено
  1. 5 8
      Engine/source/T3D/turret/aiTurretShape.cpp

+ 5 - 8
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.
    // We have mShape at this point.  Resolve nodes.
    scanNode = mShape->findNode("scanPoint");
    scanNode = mShape->findNode("scanPoint");
    aimNode = mShape->findNode("aimPoint");
    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
    // Resolve state sequence names & emitter nodes
    isAnimated = false;
    isAnimated = false;