Butterflies Unchained additions, added an Is3DLoaded() check to WarpToNewPlant() in crittermoth
This commit is contained in:
parent
ad5d716e41
commit
ead0fa21b8
BIN
Skyrim.esm
BIN
Skyrim.esm
Binary file not shown.
Binary file not shown.
@ -476,16 +476,17 @@ Function WarpToNewPlant()
|
|||||||
if (newPlant != none)
|
if (newPlant != none)
|
||||||
; Update the current plant to the new one
|
; Update the current plant to the new one
|
||||||
currentPlant = newPlant
|
currentPlant = newPlant
|
||||||
|
bool bIsLoaded = newPlant.Is3DLoaded()
|
||||||
|
|
||||||
; Pick random landing node
|
; Pick random landing node
|
||||||
; And start moving towards it
|
; And start moving towards it
|
||||||
string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3)
|
string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3)
|
||||||
if (newPlant.HasNode(landingMarkerName))
|
if (bIsLoaded && newPlant.HasNode(landingMarkerName))
|
||||||
WarpToRefNodeAndGotoState(CurrentPlant, landingMarkerName, "AtPlant")
|
WarpToRefNodeAndGotoState(CurrentPlant, landingMarkerName, "AtPlant")
|
||||||
else
|
else
|
||||||
; traceConditional(self + " could not find landing marker " + landingMarkerName + " on plant " + newPlant, bCritterDebug)
|
; traceConditional(self + " could not find landing marker " + landingMarkerName + " on plant " + newPlant, bCritterDebug)
|
||||||
string firstMarkerName = LandingMarkerPrefix + 1
|
string firstMarkerName = LandingMarkerPrefix + 1
|
||||||
if (newPlant.HasNode(firstMarkerName))
|
if (bIsLoaded && newPlant.HasNode(firstMarkerName))
|
||||||
WarpToRefNodeAndGotoState(CurrentPlant, firstMarkerName, "AtPlant")
|
WarpToRefNodeAndGotoState(CurrentPlant, firstMarkerName, "AtPlant")
|
||||||
else
|
else
|
||||||
; traceConditional(self + " could not find landing marker " + firstMarkerName + " on plant " + newPlant, bCritterDebug)
|
; traceConditional(self + " could not find landing marker " + firstMarkerName + " on plant " + newPlant, bCritterDebug)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user