|
|
|
@ -476,16 +476,17 @@ Function WarpToNewPlant() |
|
|
|
|
if (newPlant != none) |
|
|
|
|
; Update the current plant to the new one |
|
|
|
|
currentPlant = newPlant |
|
|
|
|
bool bIsLoaded = newPlant.Is3DLoaded() |
|
|
|
|
|
|
|
|
|
; Pick random landing node |
|
|
|
|
; And start moving towards it |
|
|
|
|
string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3) |
|
|
|
|
if (newPlant.HasNode(landingMarkerName)) |
|
|
|
|
if (bIsLoaded && newPlant.HasNode(landingMarkerName)) |
|
|
|
|
WarpToRefNodeAndGotoState(CurrentPlant, landingMarkerName, "AtPlant") |
|
|
|
|
else |
|
|
|
|
; traceConditional(self + " could not find landing marker " + landingMarkerName + " on plant " + newPlant, bCritterDebug) |
|
|
|
|
string firstMarkerName = LandingMarkerPrefix + 1 |
|
|
|
|
if (newPlant.HasNode(firstMarkerName)) |
|
|
|
|
if (bIsLoaded && newPlant.HasNode(firstMarkerName)) |
|
|
|
|
WarpToRefNodeAndGotoState(CurrentPlant, firstMarkerName, "AtPlant") |
|
|
|
|
else |
|
|
|
|
; traceConditional(self + " could not find landing marker " + firstMarkerName + " on plant " + newPlant, bCritterDebug) |
|
|
|
|