aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter/llstatemachine.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:56 -0500
committerJacek Antonelli2008-08-15 23:44:56 -0500
commitc07901e29ed545bbb02e3bddf148fe1104b94e9f (patch)
treef1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/llcharacter/llstatemachine.cpp
parentSecond Life viewer sources 1.15.0.2 (diff)
downloadmeta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/llcharacter/llstatemachine.cpp')
-rw-r--r--linden/indra/llcharacter/llstatemachine.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/linden/indra/llcharacter/llstatemachine.cpp b/linden/indra/llcharacter/llstatemachine.cpp
index 1ad81be..d7ecae4 100644
--- a/linden/indra/llcharacter/llstatemachine.cpp
+++ b/linden/indra/llcharacter/llstatemachine.cpp
@@ -362,28 +362,28 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d
362{ 362{
363 llassert(mStateDiagram); 363 llassert(mStateDiagram);
364 364
365 if (NULL == mCurrentState)
366 {
367 llwarns << "mCurrentState == NULL; aborting processTransition()" << llendl;
368 return;
369 }
370
365 LLFSMState* new_state = mStateDiagram->processTransition(*mCurrentState, transition); 371 LLFSMState* new_state = mStateDiagram->processTransition(*mCurrentState, transition);
366 372
373 if (NULL == new_state)
374 {
375 llwarns << "new_state == NULL; aborting processTransition()" << llendl;
376 return;
377 }
378
367 mLastTransition = &transition; 379 mLastTransition = &transition;
368 mLastState = mCurrentState; 380 mLastState = mCurrentState;
369 381
370 if (*mCurrentState != *new_state) 382 if (*mCurrentState != *new_state)
371 { 383 {
372 if (mCurrentState && new_state && *mCurrentState != *new_state) 384 mCurrentState->onExit(user_data);
373 { 385 mCurrentState = new_state;
374 mCurrentState->onExit(user_data); 386 mCurrentState->onEntry(user_data);
375 }
376 if (new_state)
377 {
378 if (!mCurrentState || *mCurrentState != *new_state)
379 {
380 mCurrentState = new_state;
381 if (mCurrentState)
382 {
383 mCurrentState->onEntry(user_data);
384 }
385 }
386 }
387#if FSM_PRINT_STATE_TRANSITIONS 387#if FSM_PRINT_STATE_TRANSITIONS
388 llinfos << "Entering state " << mCurrentState->getName() << 388 llinfos << "Entering state " << mCurrentState->getName() <<
389 " on transition " << transition.getName() << " from state " << 389 " on transition " << transition.getName() << " from state " <<