Browse Source

Fix stupid in plAvBrainCritter::GoToGoal

Changing the next behavior to running on every goal update causes the quabs
to skitter about one inch every five seconds. Obviously, we do not need to
start running if we are already running, so let's check that.
Adam Johnson 13 years ago
parent
commit
2813aaa467
  1. 10
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp

10
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp

@ -317,9 +317,13 @@ std::string plAvBrainCritter::RunBehaviorName() const
void plAvBrainCritter::GoToGoal(hsPoint3 newGoal, bool avoidingAvatars /* = false */)
{
fFinalGoalPos = newGoal;
fAvoidingAvatars = avoidingAvatars;
fNextMode = IPickBehavior(kRun);
// TODO: Pathfinding here!
fAvoidingAvatars = avoidingAvatars; // TODO: make this do something?
// Only play the run behavior if it's not already activated
// Why? This might just be an update to a preexisting goal.
if(!RunningBehavior(RunBehaviorName()))
fNextMode = IPickBehavior(kRun);
// Missing TODO Turd: Pathfinding.
}
bool plAvBrainCritter::AtGoal() const

Loading…
Cancel
Save