diff --git a/scripts/crittermoth.pex b/scripts/crittermoth.pex index 2f9631fa..c1f78389 100644 Binary files a/scripts/crittermoth.pex and b/scripts/crittermoth.pex differ diff --git a/source/scripts/crittermoth.psc b/source/scripts/crittermoth.psc index 298ee76d..1c18e88d 100644 --- a/source/scripts/crittermoth.psc +++ b/source/scripts/crittermoth.psc @@ -448,13 +448,15 @@ Function GoToNewPlant(float afSpeed) string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3) float newPlantDistance = Math.sqrt(Math.pow(newPlantX - self.GetPositionX(), 2) + Math.pow(newPlantY - self.GetPositionY(), 2) + Math.pow(newPlantZ - self.GetPositionZ(), 2)) float adjustedBellShapePathHeight = fBellShapePathHeight - (fBellShapePathHeight * (Math.pow(0.995, newPlantDistance))) - if (newPlant.HasNode(landingMarkerName)) + + bool bIsLoaded = newPlant.Is3DLoaded() + if (bIsLoaded && newPlant.HasNode(landingMarkerName)) BellShapeTranslateToRefNodeAtSpeedAndGotoState(CurrentPlant, landingMarkerName, adjustedBellShapePathHeight, afSpeed, fMaxRotationSpeed, "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)) BellShapeTranslateToRefNodeAtSpeedAndGotoState(CurrentPlant, firstMarkerName, adjustedBellShapePathHeight, afSpeed, fMaxRotationSpeed, "AtPlant") else ; traceConditional(self + " could not find landing marker " + firstMarkerName + " on plant " + newPlant, bCritterDebug)