Mantis: 1050

o An essential byte was being ignored by the SetOrder message handler.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@136 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2005-05-25 20:29:55 +00:00
parent ff914175c0
commit d5b42e9508
2 changed files with 14 additions and 12 deletions

View file

@ -5978,16 +5978,16 @@ void AvHHud::UpdateSelection()
// Change context sensitive cursor depending on current position
//if(this->mSelected.size() > 0)
//{
if(this->mGhostBuilding == MESSAGE_NULL)
{
Vector theCurrentMouseRay;
CreatePickingRay(theCurrentX, theCurrentY, theCurrentMouseRay);
int theTargetIndex;
AvHOrderTargetType theTargetType;
Vector theTargetLocation;
AvHUser3 theUser3 = AVH_USER3_NONE;
AvHOrderType theOrderType = AvHGetDefaultOrderType(this->GetHUDTeam(), this->GetVisualOrigin(), theCurrentMouseRay, theTargetIndex, theTargetLocation, theUser3, theTargetType);
// if(this->mGhostBuilding == MESSAGE_NULL)
// {
// Vector theCurrentMouseRay;
// CreatePickingRay(theCurrentX, theCurrentY, theCurrentMouseRay);
//
// int theTargetIndex;
// AvHOrderTargetType theTargetType;
// Vector theTargetLocation;
// AvHUser3 theUser3 = AVH_USER3_NONE;
// AvHOrderType theOrderType = AvHGetDefaultOrderType(this->GetHUDTeam(), this->GetVisualOrigin(), theCurrentMouseRay, theTargetIndex, theTargetLocation, theUser3, theTargetType);
// Test UI blocking
// theOrderType = ORDERTYPEL_DEFAULT;
// if(!AvHSHUGetIsRegionBlockedByUI((float)theCurrentX/ScreenWidth, (float)theCurrentY/ScreenHeight))
@ -6004,7 +6004,7 @@ void AvHHud::UpdateSelection()
//this->SetCursor(theOrderType);
// }
//}
}
// }
//}
if(this->mLeftMouseEnded)

View file

@ -1513,7 +1513,9 @@ union float_converter
BEGIN_READ( buffer, size );
order.SetReceiver( READ_BYTE() );
order.SetOrderType( (AvHOrderType)READ_BYTE() );
READ_BYTE(); //this is a redundant byte because SetOrderType automatically sets the target type as well.
// puzl: 1050
// 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() )
{
case ORDERTARGETTYPE_LOCATION: