| 376 | } |
| 377 | |
| 378 | void MovableGameEntity::restoreEntityState() |
| 379 | { |
| 380 | GameEntity::restoreEntityState(); |
| 381 | if(!mPrevAnimationState.empty()) |
| 382 | { |
| 383 | RenderManager::getSingleton().rrSetObjectAnimationState(this, mPrevAnimationState, mPrevAnimationStateLoop); |
| 384 | |
| 385 | if(mWalkDirection != Ogre::Vector3::ZERO) |
| 386 | RenderManager::getSingleton().rrOrientEntityToward(this, mWalkDirection); |
| 387 | |
| 388 | // If the mesh has no skeleton, getAnimationState() could return null |
| 389 | if(getAnimationState() != nullptr) |
| 390 | getAnimationState()->addTime(mAnimationTime); |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | void MovableGameEntity::correctDropPosition(Ogre::Vector3& position) |
| 395 | { |
nothing calls this directly
no test coverage detected