- Bugfix: CTD when enemies retreat (by Heinz)

- Updated Chinese Text files

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2572 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-02-02 17:55:46 +00:00
parent c23dc27c7b
commit f7de64d294
5 changed files with 16 additions and 3 deletions
+12
View File
@@ -5863,3 +5863,15 @@ void CrippledVersionFailureToLoadMapCallBack( UINT8 bExitValue )
}
}
#endif
BOOLEAN EscapeDirectionIsValid( INT8 * pbDirection )
{
switch( *pbDirection )
{
case NORTHEAST: if( gWorldSectorX + 1 > MAXIMUM_VALID_X_COORDINATE ) *pbDirection = -1; break; // east
case SOUTHEAST: if( gWorldSectorY + 1 > MAXIMUM_VALID_Y_COORDINATE ) *pbDirection = -1; break; // south
case SOUTHWEST: if( gWorldSectorX - 1 < MINIMUM_VALID_X_COORDINATE ) *pbDirection = -1; break; // west
case NORTHWEST: if( gWorldSectorY - 1 < MINIMUM_VALID_Y_COORDINATE ) *pbDirection = -1; break; // north
default: *pbDirection = -1;
}
return( *pbDirection != -1 );
}
+1
View File
@@ -170,6 +170,7 @@ void SetupProfileInsertionDataForSoldier( SOLDIERTYPE *pSoldier );
BOOLEAN HandlePotentialBringUpAutoresolveToFinishBattle( int pSectorX, int pSectorY, int pSectorZ );
BOOLEAN EscapeDirectionIsValid( INT8 * pbDirection );
//Used for determining the type of error message that comes up when you can't traverse to
//an adjacent sector. THESE VALUES DO NOT NEED TO BE SAVED!
extern BOOLEAN gfInvalidTraversal;
+1 -1
View File
@@ -1334,7 +1334,7 @@ INT16 FindSpotMaxDistFromOpponents(SOLDIERTYPE *pSoldier)
iSpotClosestThreatRange = 1500;
if ( pSoldier->bTeam == ENEMY_TEAM && GridNoOnEdgeOfMap( sGridNo, &bEscapeDirection ) )
if ( pSoldier->bTeam == ENEMY_TEAM && GridNoOnEdgeOfMap( sGridNo, &bEscapeDirection ) && EscapeDirectionIsValid( &bEscapeDirection ) )
{
// We can escape! This is better than anything else except a closer spot which we can
// cross over from.
+1 -1
View File
@@ -915,7 +915,7 @@ STR16 gzMercSkillText[] =
L"偷窃", //"Thief",
L"武术", //"Martial Arts",
L"刀技", //"Knifing",
L"神射", //"Sniper",
L"狙击", //"Sniper",
L"伪装", //"Camouflage", //JA25: modified
L"伪装(城市)", //"Camouflage (Urban)",
L"伪装(沙漠)", //"Camouflage (Desert)",
+1 -1
View File
@@ -88,7 +88,7 @@ STR16 gzIMPSkillTraitsText[]=
L"潜行", //"Stealth",
L"双手武器", //"Ambidextrous",
L"刀技", //"Knifing",
L"神射", //"Sniper",
L"狙击", //"Sniper",
L"伪装", //"Camouflage",
L"武术", //"Martial Arts",