Skip to content

Commit

Permalink
Check startPosition coordinates for RTB when no HQ exists in mp
Browse files Browse the repository at this point in the history
Retreats units back to the startPosition area much like campaign does for LZ data.
  • Loading branch information
KJeff01 committed Dec 4, 2023
1 parent 6a6832a commit dfb2aea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1667,12 +1667,18 @@ void orderDroidBase(DROID *psDroid, DROID_ORDER_DATA *psOrder)
// see if the LZ has been set up
int iDX = getLandingX(psDroid->player);
int iDY = getLandingY(psDroid->player);
Vector2i startPos = getPlayerStartPosition(psDroid->player);

if (iDX && iDY)
{
psDroid->order = *psOrder;
actionDroid(psDroid, DACTION_MOVE, iDX, iDY);
}
else if (bMultiPlayer && (startPos.x != 0 && startPos.y != 0))
{
psDroid->order = *psOrder;
actionDroid(psDroid, DACTION_MOVE, startPos.x, startPos.y);
}
else
{
// haven't got an LZ set up so don't do anything
Expand Down

0 comments on commit dfb2aea

Please sign in to comment.