From f05dfc0b1efb454edef4821e66e0a417efd60be5 Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 19 May 2014 18:51:43 +0000 Subject: [PATCH] Merged from revision: 7217 Bugfixes (by anv) - fix: ambient sounds weren't played after loading game in tactical, - fix: AI with a lot of APs would stop moving around during combat. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7218 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- SaveLoadGame.cpp | 3 +++ TacticalAI/Movement.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SaveLoadGame.cpp b/SaveLoadGame.cpp index 38046c72..bdcf669f 100644 --- a/SaveLoadGame.cpp +++ b/SaveLoadGame.cpp @@ -4666,6 +4666,9 @@ BOOLEAN LoadSavedGame( int ubSavedGameID ) LoadGameFilePosition( FileGetPos( hFile ), "Strategic Events" ); #endif + // anv: we need to rebuild ambient sounds now, as those added when loading tileset are removed + // in LoadStrategicEventsFromSavedGame + HandleNewSectorAmbience( gTilesets[ giCurrentTilesetID ].ubAmbientID ); uiRelEndPerc += 0; SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Laptop Info" ); diff --git a/TacticalAI/Movement.cpp b/TacticalAI/Movement.cpp index 0fe33821..441d00c0 100644 --- a/TacticalAI/Movement.cpp +++ b/TacticalAI/Movement.cpp @@ -450,7 +450,8 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN INT32 sOrigin; UINT16 usMaxDist; UINT8 ubDirection,ubDirsLeft,ubDirChecked[8],fFound = FALSE; - INT8 bAPsLeft, fPathFlags; + // anv: changed to INT16 since Soldier->bActionPoints are INT16 too + INT16 bAPsLeft, fPathFlags; //DBrot: More Rooms //UINT8 ubRoomRequired = 0, ubTempRoom; UINT16 usRoomRequired = 0, usTempRoom;