[wpdev-commits] wolfpack/ai ai.cpp,1.37,1.38
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-10-11 19:03:52
|
Update of /cvsroot/wpdev/wolfpack/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3942/ai Modified Files: ai.cpp Log Message: AI Checks Index: ai.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ai.cpp 10 Oct 2004 17:51:24 -0000 1.37 --- ai.cpp 11 Oct 2004 19:03:42 -0000 1.38 *************** *** 164,172 **** #endif // Now we should have a current action set, else do nothing! startProfiling(PF_AICHECKEXECUTEACTION); if ( m_currentAction ) { ! m_currentAction->execute(); // We must check the postcondition now and set the current action to NULL --- 164,178 ---- #endif + m_npc->setAICheckTime(Server::instance()->time() + m_npc->wanderSpeed()); + // Now we should have a current action set, else do nothing! startProfiling(PF_AICHECKEXECUTEACTION); if ( m_currentAction ) { ! if (!m_currentAction->isPassive()) { ! m_npc->setAICheckTime(Server::instance()->time() + m_npc->actionSpeed()); ! } ! ! m_currentAction->execute(); // We must check the postcondition now and set the current action to NULL *************** *** 184,187 **** --- 190,194 ---- } } + stopProfiling(PF_AICHECKEXECUTEACTION); } *************** *** 634,640 **** moveTo( pTarget->pos()); } - - if ( pTarget->dist( m_npc ) > 3 ) - m_npc->setAICheckTime( ( uint )( Server::instance()->time() + ( float ) m_npc->aiCheckInterval() * 0.0005f * MY_CLOCKS_PER_SEC ) ); } } --- 641,644 ---- |