From cb074f4549a46d11acb22f237686dc265b978e6a Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Mon, 26 Apr 2021 17:59:51 +0000 Subject: [PATCH] Fix for various crashing and merc placement issues when getting ambushed (by Shadooow). git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8981 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/Tactical Placement GUI.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TileEngine/Tactical Placement GUI.cpp b/TileEngine/Tactical Placement GUI.cpp index e5fc0a8a..ea459a83 100644 --- a/TileEngine/Tactical Placement GUI.cpp +++ b/TileEngine/Tactical Placement GUI.cpp @@ -1800,11 +1800,11 @@ void PutDownMercPiece( INT32 iPlacement ) if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE ) { - ubDirection = (UINT8)GetDirectionToGridNoFromGridNo( gMapInformation.sCenterGridNo, sGridNo ) + 100; + ubDirection = (UINT8)GetDirectionToGridNoFromGridNo( gMapInformation.sCenterGridNo, sGridNo ); } - pSoldier->EVENT_SetSoldierDirection( ubDirection ); - pSoldier->ubInsertionDirection = pSoldier->ubDirection; + ubDirection += 100; + pSoldier->ubInsertionDirection = ubDirection; gMercPlacement[ iPlacement ].fPlaced = TRUE; gMercPlacement[ iPlacement ].pSoldier->bInSector = TRUE;