Changeset 470
- Timestamp:
- 01/21/12 09:33:03 (4 months ago)
- Files:
-
- 1 modified
-
cafu/trunk/Games/DeathMatch/Code/CompanyBot.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/Games/DeathMatch/Code/CompanyBot.cpp
r469 r470 393 393 394 394 395 #undef min // See http://stackoverflow.com/questions/5004858/stdmin-gives-error 396 #undef max 397 398 395 399 void EntCompanyBotT::AdvanceModelTime(float Time, bool Loop) 396 400 { … … 401 405 else 402 406 { 407 const bool IsAlive=(State.ModelSequNr<18 || State.ModelSequNr>24); 408 float BlendTime=0.3f; 409 410 if (!IsAlive) 411 { 412 BlendTime=0.2f; 413 414 if (State.ModelSequNr>=0 && State.ModelSequNr<int(m_CompanyBotModel->GetAnims().Size())) 415 { 416 const CafuModelT::AnimT& Anim=m_CompanyBotModel->GetAnims()[State.ModelSequNr]; 417 418 if (Anim.Frames.Size() > 0) 419 BlendTime=std::min(BlendTime, (Anim.Frames.Size()-1) * Anim.FPS * 0.5f); 420 } 421 } 422 403 423 m_LastStdAE=m_CompanyBotModel->GetAnimExprPool().GetStandard(State.ModelSequNr, State.ModelFrameNr); 404 m_AnimExpr =m_CompanyBotModel->GetAnimExprPool().GetBlend(m_AnimExpr, m_LastStdAE, 3.0f);424 m_AnimExpr =m_CompanyBotModel->GetAnimExprPool().GetBlend(m_AnimExpr, m_LastStdAE, BlendTime); 405 425 } 406 426
