Mantis: 1050

o Orders dissapear upon completion

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@140 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2005-05-27 18:47:32 +00:00
parent 9f70c2dd51
commit 5b2b31d228
1 changed files with 8 additions and 4 deletions

View File

@ -1513,9 +1513,7 @@ union float_converter
BEGIN_READ( buffer, size ); BEGIN_READ( buffer, size );
order.SetReceiver( READ_BYTE() ); order.SetReceiver( READ_BYTE() );
order.SetOrderType( (AvHOrderType)READ_BYTE() ); order.SetOrderType( (AvHOrderType)READ_BYTE() );
// puzl: 1050 //order.SetOrderTargetType((AvHOrderTargetType)READ_BYTE()); //this is a redundant byte because SetOrderType automatically sets the target type as well.
// This byte is needed as SetOrderType isn't the only mechanism for changing it
order.SetOrderTargetType((AvHOrderTargetType)READ_BYTE()); //this is a redundant byte because SetOrderType automatically sets the target type as well.
switch( order.GetOrderTargetType() ) switch( order.GetOrderTargetType() )
{ {
case ORDERTARGETTYPE_LOCATION: case ORDERTARGETTYPE_LOCATION:
@ -1533,6 +1531,9 @@ union float_converter
} }
order.SetUser3TargetType( (AvHUser3)READ_BYTE() ); order.SetUser3TargetType( (AvHUser3)READ_BYTE() );
order.SetOrderCompleted( READ_BYTE() ); order.SetOrderCompleted( READ_BYTE() );
// puzl: 1050
// Need to sync the order status as it is only manipulated by the serverside state machine
order.SetOrderStatus( READ_BYTE() );
END_READ(); END_READ();
} }
#else #else
@ -1541,7 +1542,7 @@ union float_converter
MESSAGE_BEGIN( MSG_ONE, g_msgSetOrder, NULL, pev ); MESSAGE_BEGIN( MSG_ONE, g_msgSetOrder, NULL, pev );
WRITE_BYTE( order.GetReceiver() ); WRITE_BYTE( order.GetReceiver() );
WRITE_BYTE( order.GetOrderType() ); WRITE_BYTE( order.GetOrderType() );
WRITE_BYTE( order.GetOrderTargetType() ); //this is a redundant byte because SetOrderType automatically sets the target type as well. //WRITE_BYTE( order.GetOrderTargetType() ); //this is a redundant byte because SetOrderType automatically sets the target type as well.
switch( order.GetOrderTargetType() ) switch( order.GetOrderTargetType() )
{ {
case ORDERTARGETTYPE_LOCATION: case ORDERTARGETTYPE_LOCATION:
@ -1559,6 +1560,9 @@ union float_converter
} }
WRITE_BYTE( order.GetTargetUser3Type() ); WRITE_BYTE( order.GetTargetUser3Type() );
WRITE_BYTE( order.GetOrderCompleted() ); WRITE_BYTE( order.GetOrderCompleted() );
// puzl: 1050
// Need to sync the order status as it is only manipulated by the serverside state machine
WRITE_BYTE( order.GetOrderStatus() );
MESSAGE_END(); MESSAGE_END();
} }
#endif #endif