1
0
forked from mirrors/0ad

Added production queue system and associated events. It might still need some extra features but it should be functional.

This was SVN commit r3547.
This commit is contained in:
Matei
2006-02-22 22:45:16 +00:00
parent 022c84f43d
commit 7a4aeb69ed
18 changed files with 403 additions and 90 deletions
+11
View File
@@ -212,6 +212,14 @@ uint CSimulation::TranslateMessage(CNetMessage* pMsg, uint clientMask, void* UNU
order.m_data[1].data=msg->m_Action; \
QueueOrder(order, msg->m_Entities, clearQueue); \
} while(0)
#define ENTITY_INT_STRING(_msg, _order) do\
{ \
_msg *msg=(_msg *)pMsg; \
order.m_type=CEntityOrder::_order; \
order.m_data[0].string=msg->m_Name; \
order.m_data[1].data=msg->m_Type; \
QueueOrder(order, msg->m_Entities, clearQueue); \
} while(0)
switch (pMsg->GetType())
{
@@ -260,6 +268,9 @@ uint CSimulation::TranslateMessage(CNetMessage* pMsg, uint clientMask, void* UNU
case NMT_Generic:
ENTITY_ENTITY_INT(CGeneric, ORDER_GENERIC);
break;
case NMT_Produce:
ENTITY_INT_STRING(CProduce, ORDER_PRODUCE);
break;
case NMT_NotifyRequest:
ENTITY_ENTITY_INT(CNotifyRequest, ORDER_NOTIFY_REQUEST);
break;