From 6a740eb82b8d20c189f62e409000208d28eac504 Mon Sep 17 00:00:00 2001 From: lalien Date: Sat, 28 Mar 2009 00:28:54 +0000 Subject: [PATCH] Temporary fix for game freeze when a path contains duplicate tiles git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2637 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 6 +++--- Tactical/PATHAI.cpp | 6 +++++- ja2_2005Express.vcproj | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 2d7e8d48..c92be839 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -18,7 +18,7 @@ CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.2389" }; #elif defined JA2BETAVERSION //BETA/TEST BUILD VERSION -CHAR16 zVersionLabel[256] = { L"Debug v1.13.2633" }; +CHAR16 zVersionLabel[256] = { L"Debug v1.13.2637" }; #elif defined CRIPPLED_VERSION @@ -28,11 +28,11 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - CHAR16 zVersionLabel[256] = { L"Release v1.13.2633" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.2637" }; #endif -CHAR8 czVersionNumber[16] = { "Build 09.03.24" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 09.03.28" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; diff --git a/Tactical/PATHAI.cpp b/Tactical/PATHAI.cpp index 506011b8..61feaa34 100644 --- a/Tactical/PATHAI.cpp +++ b/Tactical/PATHAI.cpp @@ -813,7 +813,11 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s , //CHAR8 str[128]; //sprintf( str, "Duplicate GridNo found during pathfinding" ); //AssertMsg( 0, str ); - AssertMsg( FALSE, String( "Duplicate GridNo found during pathfinding at %d. Related to soldier %d at GridNo %d.", current, s->ubID, s->sGridNo ) ); + //AssertMsg( FALSE, String( "Duplicate GridNo found during pathfinding at %d. Related to soldier %d at GridNo %d.", current, s->ubID, s->sGridNo ) ); + + // lalien: hack to avoid freezing, return 0 if the path is bad. + // Probably it will make trouble, need to check this + return 0; } } trackNode.push_back(current); diff --git a/ja2_2005Express.vcproj b/ja2_2005Express.vcproj index a2acdd5b..68aa9519 100644 --- a/ja2_2005Express.vcproj +++ b/ja2_2005Express.vcproj @@ -66,7 +66,7 @@