Combat code, some scripting, broken network, and fixed some bugs.

This was SVN commit r1301.
This commit is contained in:
MarkT
2004-11-11 07:09:32 +00:00
parent 9b47d446d2
commit 793794649f
55 changed files with 1836 additions and 533 deletions
+18
View File
@@ -15,3 +15,21 @@ void CPathfindEngine::requestPath( HEntity entity, const CVector2D& destination
{
pathSparse( entity, destination );
}
void CPathfindEngine::requestMeleeAttackPath( HEntity entity, HEntity target )
{
pathSparse( entity, target->m_position );
// For attack orders, do some additional postprocessing (replace goto/nopathing
// with attack/nopathing, up until the attack order marker)
std::deque<CEntityOrder>::iterator it;
for( it = entity->m_orderQueue.begin(); it != entity->m_orderQueue.end(); it++ )
{
if( it->m_type == CEntityOrder::ORDER_PATH_END_MARKER )
break;
if( it->m_type == CEntityOrder::ORDER_GOTO_NOPATHING )
{
it->m_type = CEntityOrder::ORDER_ATTACK_MELEE_NOPATHING;
it->m_data[0].entity = target;
}
}
}