// CTOR default plAvBrainClimb::plAvBrainClimb() : fCurMode(kInactive), fNextMode(kInactive), fDesiredDirection(plClimbMsg::kUp), fControlDir(0.0f), fAllowedDirections(plClimbMsg::kUp | plClimbMsg::kDown | plClimbMsg::kLeft | plClimbMsg::kRight), fPhysicallyBlockedDirections(0), fOldPhysicallyBlockedDirections(0), fAllowedDismounts(0), fCurStage(nil), fExitStage(nil), fVerticalProbeLength(0.0f), fHorizontalProbeLength(0.0f), fUp(nil), fDown(nil), fLeft(nil), fRight(nil), fMountUp(nil), fMountDown(nil), fMountLeft(nil), fMountRight(nil), fDismountUp(nil), fDismountDown(nil), fDismountLeft(nil), fDismountRight(nil), fIdle(nil), fRelease(nil), fFallOff(nil) { IInitAnimations(); }
void plAvBrainSwim::Activate(plArmatureModBase* avMod) { plArmatureBrain::Activate(avMod); IInitAnimations(); fSurfaceProbeMsg->SetSender(fAvMod->GetKey()); // turn our underlying brain back on until we're all the way in the water. fAvMod->GetNextBrain(this)->Resume(); }
void plAvBrainRideAnimatedPhysical::Activate(plArmatureModBase *avMod) { plArmatureBrain::Activate(avMod); IInitAnimations(); if (!fCallbackAction) { plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); plPhysicalControllerCore* controller = avMod->GetController(); fCallbackAction = new plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); } }