mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix invalid edgepoint selection
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8589 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3356,9 +3356,18 @@ void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY,
|
||||
pSoldier->aiData.bOrders = STATIONARY;
|
||||
}
|
||||
|
||||
if (pSoldier->ubStrategicInsertionCode == INSERTION_CODE_SECONDARY_EDGEINDEX && (
|
||||
(gubTacticalDirection == NORTH && gus2ndNorthEdgepointArraySize == 0)
|
||||
|| (gubTacticalDirection == EAST && gus2ndEastEdgepointArraySize == 0)
|
||||
|| (gubTacticalDirection == SOUTH && gus2ndSouthEdgepointArraySize == 0)
|
||||
|| (gubTacticalDirection == WEST && gus2ndWestEdgepointArraySize == 0)
|
||||
))
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_PRIMARY_EDGEINDEX;
|
||||
}
|
||||
|
||||
// Use insertion direction from loaded map!
|
||||
switch ( pSoldier->ubStrategicInsertionCode )
|
||||
switch (pSoldier->ubStrategicInsertionCode)
|
||||
{
|
||||
case INSERTION_CODE_NORTH:
|
||||
pSoldier->sInsertionGridNo = gMapInformation.sNorthGridNo;
|
||||
|
||||
Reference in New Issue
Block a user