[wpdev-commits] wolfpack/ai ai_mage.cpp,1.5,1.6
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-10-17 15:49:06
|
Update of /cvsroot/wpdev/wolfpack/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22651/ai Modified Files: ai_mage.cpp Log Message: speed fix Index: ai_mage.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai_mage.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ai_mage.cpp 16 Oct 2004 20:01:39 -0000 1.5 --- ai_mage.cpp 17 Oct 2004 15:48:56 -0000 1.6 *************** *** 306,309 **** --- 306,313 ---- virtual float preCondition() { + if (m_npc->nextMoveTime() > Server::instance()->time()) { + return 0.0f; // We can't move yet. + } + Monster_Aggressive *ai = static_cast<Monster_Aggressive*>(m_ai); *************** *** 321,324 **** --- 325,330 ---- return; + m_npc->setNextMoveTime(); + // If we're not casting a spell and waiting for a new one, move toward the target if (!m_npc->hasScript("magic")) { |