From 8e80a6168a0c99b6fca81cffe3459db8383ef43d Mon Sep 17 00:00:00 2001 From: lalien Date: Tue, 8 May 2007 15:10:29 +0000 Subject: [PATCH] bug fixes from Overhaul: - roof inaccessible tiles problem - AI hang while deciding on an action (fire 0 rounds on auto) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@868 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 2 +- JA2.suo | Bin 197632 -> 197632 bytes JA2.vcproj | 2 +- TacticalAI/DecideAction.cpp | 12 ++++++++++-- TileEngine/worlddef.cpp | 6 +++++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index cf198d5b..ca7b5659 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ wchar_t zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - wchar_t zVersionLabel[256] = { L"Release v1.13.867" }; + wchar_t zVersionLabel[256] = { L"Release v1.13.868" }; #endif diff --git a/JA2.suo b/JA2.suo index c8dbacc8dd89e5a3a6cf59126b0a2725ac531b4d..7bed14d76abf02443183969e4b9fa2d06ae12a15 100644 GIT binary patch delta 500 zcmY+AJxc>Y5Qb-yy?8OZi8=2?jS_=`mQk=Wg`idmWX01~Bxy7OzqZgWsXVY;MC<}- z1PKTyPTyD#04zM; zXlmD9x)&~?>dLCHJkpqlq9Qi7(=pP(ufJQ?G%;df+bL}|B2j9 z#u3cmSy$QgBfXshP;KQ+0(5oh2^_&1#zoCP9y|Gy zh9+EMo^#OoSXmpw8fHx-PrAVl)Ui%CxWL<9SkD~B)mCRUj2uCj-b4!dXd_Cxf+Z2? z5q~gptNMwOo?!G>7>QxziI-uYtocN~`ZhN~gdk%AIq>ZX1BB7Q-?Zlq(wB_9cV<7y cxc{rUQ>*h@oj*7_%i^S-HQvwe^5=N0Kl2Cx zeD(~t%&8mKVmh804o{IX+EbN+wYcto7@JYS691Y|@`7M}L?^-x0e87Zzz9PrT&~_T z!!Qt5EJ|-i9G`p0c(4)%Yw^XF4LIl--4Jc8y8gN3{rC&bDoAutofire--; + if (pSoldier->bDoAutofire > 0) + { ubBurstAPs = CalcAPsToAutofire( CalcActionPoints( pSoldier ), &(pSoldier->inv[BestAttack.bWeaponIn]), pSoldier->bDoAutofire ); if (pSoldier->bActionPoints - (BestAttack.ubAPCost - BestAttack.ubAimTime) >= ubBurstAPs ) @@ -4402,8 +4404,14 @@ bCanAttack = FALSE; BestAttack.ubAPCost = BestAttack.ubAPCost - BestAttack.ubAimTime + CalcAPsToAutofire( CalcActionPoints( pSoldier ), &(pSoldier->inv[BestAttack.bWeaponIn]), pSoldier->bDoAutofire ); } } - - pSoldier->bDoAutofire = 0; + } + else + { + pSoldier->bAimTime = 0; + pSoldier->bDoBurst = 0; + pSoldier->bDoAutofire = 0; + // not enough aps - do somthing else + } } ////////////////////////////////////////////////////////////////////////// diff --git a/TileEngine/worlddef.cpp b/TileEngine/worlddef.cpp index e9e5a7d5..159ff0fe 100644 --- a/TileEngine/worlddef.cpp +++ b/TileEngine/worlddef.cpp @@ -1302,7 +1302,11 @@ void CompileTileMovementCosts( UINT16 usGridNo ) { if (!(pStructure->fFlags & STRUCTURE_PASSABLE || pStructure->fFlags & STRUCTURE_NORMAL_ROOF)) { - fStructuresOnRoof = TRUE; + // DNS: Try a fix to prevent people from "permanently" blocking the roof + if (!(pStructure->fFlags & STRUCTURE_PERSON)) + { + fStructuresOnRoof = TRUE; + } } } pStructure = pStructure->pNext;