# Order queueing for construction.
This was SVN commit r4497.
This commit is contained in:
parent
0df95f3e8f
commit
2337cb203a
@ -1407,6 +1407,11 @@ void CBuildingPlacer::mouseReleased()
|
||||
msg->m_Angle = (u32) (m_angle * 1000);
|
||||
g_Game->GetSimulation()->QueueLocalCommand(msg);
|
||||
}
|
||||
|
||||
if( hotkeys[HOTKEY_ORDER_QUEUE] )
|
||||
{
|
||||
activate( m_templateName ); // reactivate so we can place more buildings of the same type
|
||||
}
|
||||
}
|
||||
|
||||
void CBuildingPlacer::deactivate()
|
||||
|
@ -71,16 +71,6 @@ bool CAStarEngine::findPath(
|
||||
mGoal->setDestination(dest);
|
||||
mGoal->setRadius(radius);
|
||||
|
||||
if( !mGoal->isPassable(src, player) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( radius==0 && !mGoal->isPassable(dest, player) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
AStarNode *start = getFreeASNode();
|
||||
start->coord = mGoal->getTile(src);
|
||||
start->parent = NULL;
|
||||
|
@ -675,6 +675,7 @@ bool CEntity::Initialize()
|
||||
CEventInitialize evt;
|
||||
if( !DispatchEvent( &evt ) )
|
||||
{
|
||||
debug_printf("start construction failed, killing self\n");
|
||||
kill();
|
||||
return false;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
class CEventInitialize : public CScriptEvent
|
||||
{
|
||||
public:
|
||||
CEventInitialize() : CScriptEvent( L"initialize", EVENT_INITIALIZE, false ) {}
|
||||
CEventInitialize() : CScriptEvent( L"initialize", EVENT_INITIALIZE, true ) {}
|
||||
};
|
||||
|
||||
class CEventDeath : public CScriptEvent
|
||||
|
@ -370,7 +370,7 @@ uint CSimulation::TranslateMessage(CNetMessage* pMsg, uint clientMask, void* UNU
|
||||
// Order all the selected units to work on the new object using the given action
|
||||
order.m_type = CEntityOrder::ORDER_START_CONSTRUCTION;
|
||||
order.m_data[0].entity = newObj;
|
||||
QueueOrder(order, msg->m_Entities, false);
|
||||
QueueOrder(order, msg->m_Entities, isQueued);
|
||||
}
|
||||
} while(0)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user