Fix movement cost problems in 100AP. Externalized the movement cost modifiers and changed the run modifier from a divisor to a flat modifier like other forms of movement use.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2618 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2009-03-09 23:14:43 +00:00
parent e3303e321c
commit 6be3de2149
6 changed files with 83 additions and 87 deletions
+5
View File
@@ -868,6 +868,11 @@ void LoadGameAPBPConstants()
APBPConstants[AP_MOVEMENT_SHORE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MOVEMENT_SHORE",28),28); APBPConstants[AP_MOVEMENT_SHORE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MOVEMENT_SHORE",28),28);
APBPConstants[AP_MOVEMENT_LAKE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MOVEMENT_LAKE",36),36); APBPConstants[AP_MOVEMENT_LAKE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MOVEMENT_LAKE",36),36);
APBPConstants[AP_MOVEMENT_OCEAN] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MOVEMENT_OCEAN",32),32); APBPConstants[AP_MOVEMENT_OCEAN] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MOVEMENT_OCEAN",32),32);
APBPConstants[AP_MODIFIER_RUN] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MODIFIER_RUN",-8),-8);
APBPConstants[AP_MODIFIER_WALK] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MODIFIER_WALK",-4),-4);
APBPConstants[AP_MODIFIER_SWAT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MODIFIER_SWAT",0),0);
APBPConstants[AP_MODIFIER_CRAWL] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MODIFIER_CRAWL",4),4);
APBPConstants[AP_MODIFIER_PACK] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MODIFIER_PACK",4),4);
APBPConstants[AP_CHANGE_FACING] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_CHANGE_FACING",4),4); APBPConstants[AP_CHANGE_FACING] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_CHANGE_FACING",4),4);
APBPConstants[AP_CHANGE_TARGET] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_CHANGE_TARGET",2),2); APBPConstants[AP_CHANGE_TARGET] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_CHANGE_TARGET",2),2);
APBPConstants[AP_TOSS_ITEM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_TOSS_ITEM",32),32); APBPConstants[AP_TOSS_ITEM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_TOSS_ITEM",32),32);
+5
View File
@@ -32,6 +32,11 @@ AP_MOVEMENT_RUBBLE,
AP_MOVEMENT_SHORE, AP_MOVEMENT_SHORE,
AP_MOVEMENT_LAKE, AP_MOVEMENT_LAKE,
AP_MOVEMENT_OCEAN, AP_MOVEMENT_OCEAN,
AP_MODIFIER_RUN,
AP_MODIFIER_WALK,
AP_MODIFIER_SWAT,
AP_MODIFIER_CRAWL,
AP_MODIFIER_PACK,
AP_CHANGE_FACING, AP_CHANGE_FACING,
AP_CHANGE_TARGET, AP_CHANGE_TARGET,
AP_TOSS_ITEM, AP_TOSS_ITEM,
+51 -57
View File
@@ -1326,18 +1326,19 @@ INT16 AStarPathfinder::CalcAP(int const terrainCost, UINT8 const direction)
case RUNNING: case RUNNING:
case ADULTMONSTER_WALKING: case ADULTMONSTER_WALKING:
// save on casting // save on casting
movementAPCost = (INT16) (movementAPCost * 100 / ( (UINT8) (RUNDIVISOR * 100))); //movementAPCost = (INT16) (movementAPCost * 100 / ( (UINT8) (RUNDIVISOR * 100)));
movementAPCost = (INT16) movementAPCost + APBPConstants[AP_MODIFIER_RUN];
//movementAPCost = (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) ); break; //movementAPCost = (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) ); break;
break; break;
case WALKING: case WALKING:
case ROBOT_WALK: case ROBOT_WALK:
movementAPCost = (movementAPCost + WALKCOST); movementAPCost = (movementAPCost + APBPConstants[AP_MODIFIER_WALK]); //WALKCOST);
break; break;
case SWATTING: case SWATTING:
movementAPCost = (movementAPCost + SWATCOST); movementAPCost = (movementAPCost + APBPConstants[AP_MODIFIER_SWAT]); //SWATCOST);
break; break;
case CRAWLING: case CRAWLING:
movementAPCost = (movementAPCost + CRAWLCOST); movementAPCost = (movementAPCost + APBPConstants[AP_MODIFIER_CRAWL]); //CRAWLCOST);
break; break;
} }
@@ -3354,29 +3355,31 @@ INT32 FindBestPath(SOLDIERTYPE *s , INT16 sDestination, INT8 ubLevel, INT16 usMo
case ADULTMONSTER_WALKING: case ADULTMONSTER_WALKING:
// save on casting // save on casting
if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true)
ubAPCost = ubAPCost * 10 / ( (UINT8) (RUNDIVISORBPACK * 10)); //ubAPCost = ubAPCost * 10 / ( (UINT8) (RUNDIVISORBPACK * 10));
ubAPCost = ubAPCost + APBPConstants[AP_MODIFIER_RUN] + APBPConstants[AP_MODIFIER_PACK];
else else
ubAPCost = (UINT8)(ubAPCost * 10 / ( (UINT8) (RUNDIVISOR * 10))); //ubAPCost = (UINT8)(ubAPCost * 10 / ( (UINT8) (RUNDIVISOR * 10)));
ubAPCost = (UINT8)ubAPCost + APBPConstants[AP_MODIFIER_RUN];
//ubAPCost = (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) ); break; //ubAPCost = (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) ); break;
break; break;
case WALKING: case WALKING:
case ROBOT_WALK: case ROBOT_WALK:
if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true)
ubAPCost = (ubAPCost + WALKCOSTBPACK); ubAPCost = (ubAPCost + APBPConstants[AP_MODIFIER_WALK] + APBPConstants[AP_MODIFIER_PACK]); //WALKCOSTBPACK);
else else
ubAPCost = (ubAPCost + WALKCOST); ubAPCost = (ubAPCost + APBPConstants[AP_MODIFIER_WALK]); //WALKCOST);
break; break;
case SWATTING: case SWATTING:
if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true)
ubAPCost = (ubAPCost + SWATCOSTBPACK); ubAPCost = (ubAPCost + APBPConstants[AP_MODIFIER_SWAT] + APBPConstants[AP_MODIFIER_PACK]); //SWATCOSTBPACK);
else else
ubAPCost = (ubAPCost + SWATCOST); ubAPCost = (ubAPCost + APBPConstants[AP_MODIFIER_SWAT]); //SWATCOST);
break; break;
case CRAWLING: case CRAWLING:
if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && s->inv[BPACKPOCKPOS].exists() == true)
ubAPCost = (ubAPCost + CRAWLCOSTBPACK); ubAPCost = (ubAPCost + APBPConstants[AP_MODIFIER_CRAWL] + APBPConstants[AP_MODIFIER_PACK]); //CRAWLCOSTBPACK);
else else
ubAPCost = (ubAPCost + CRAWLCOST); ubAPCost = (ubAPCost + APBPConstants[AP_MODIFIER_CRAWL]); //CRAWLCOST);
break; break;
} }
@@ -4297,39 +4300,34 @@ INT16 PlotPath( SOLDIERTYPE *pSold, INT16 sDestGridno, INT8 bCopyRoute, INT8 bPl
// so, then we must modify it for other movement styles and accumulate // so, then we must modify it for other movement styles and accumulate
// CHRISL: Force display path to calculate AP cost differently if we're wearing a backpack // CHRISL: Force display path to calculate AP cost differently if we're wearing a backpack
switch( usMovementModeToUseForAPs ) switch( usMovementModeToUseForAPs )
{ {
case RUNNING: case RUNNING:
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) sPoints += sTileCost + sExtraCostStand + APBPConstants[AP_MODIFIER_RUN];
sPoints += (INT16)(DOUBLE)( (sTileCost / RUNDIVISORBPACK) ) + sExtraCostStand; if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
else sPoints += APBPConstants[AP_MODIFIER_PACK];
sPoints += (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) ) + sExtraCostStand; break;
break; case WALKING :
case WALKING : sPoints += sTileCost + sExtraCostStand + APBPConstants[AP_MODIFIER_WALK];
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
sPoints += (sTileCost + WALKCOSTBPACK) + sExtraCostStand; sPoints += APBPConstants[AP_MODIFIER_PACK];
else break;
sPoints += (sTileCost + WALKCOST) + sExtraCostStand; case SWATTING:
break; sPoints += sTileCost + sExtraCostStand + APBPConstants[AP_MODIFIER_SWAT];
case SWATTING: if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) sPoints += APBPConstants[AP_MODIFIER_PACK];
sPoints += (sTileCost + SWATCOSTBPACK) + sExtraCostSwat; break;
else case CRAWLING:
sPoints += (sTileCost + SWATCOST) + sExtraCostSwat; sPoints += sTileCost + sExtraCostStand + APBPConstants[AP_MODIFIER_CRAWL];
break; if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
case CRAWLING: sPoints += APBPConstants[AP_MODIFIER_PACK];
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) break;
sPoints += (sTileCost + CRAWLCOSTBPACK) + sExtraCostCrawl; default :
else sPoints += sPoints + sTileCost;
sPoints += (sTileCost + CRAWLCOST) + sExtraCostCrawl; if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
break; sPoints += APBPConstants[AP_MODIFIER_PACK];
default : break;
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) }
sPoints = sPoints + sTileCost;
else
sPoints = sPoints + sTileCost;
break;
}
} }
} }
@@ -4341,28 +4339,24 @@ INT16 PlotPath( SOLDIERTYPE *pSold, INT16 sDestGridno, INT8 bCopyRoute, INT8 bPl
// CHRISL: Adjusted system to use different move costs while wearing a backpack // CHRISL: Adjusted system to use different move costs while wearing a backpack
// store WALK cost // store WALK cost
sPointsWalk += sTileCost + APBPConstants[AP_MODIFIER_WALK] + sExtraCostStand;
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
sPointsWalk += (sTileCost + WALKCOSTBPACK) + sExtraCostStand; sPointsWalk += APBPConstants[AP_MODIFIER_PACK];
else
sPointsWalk += (sTileCost + WALKCOST) + sExtraCostStand;
// now get cost as if CRAWLING // now get cost as if CRAWLING
sPointsCrawl += sTileCost + APBPConstants[AP_MODIFIER_CRAWL] + sExtraCostCrawl;
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
sPointsCrawl += (sTileCost + CRAWLCOSTBPACK) + sExtraCostCrawl; sPointsCrawl += APBPConstants[AP_MODIFIER_PACK];
else
sPointsCrawl += (sTileCost + CRAWLCOST) + sExtraCostCrawl;
// now get cost as if SWATTING // now get cost as if SWATTING
sPointsSwat += sTileCost + APBPConstants[AP_MODIFIER_SWAT] + sExtraCostSwat;
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
sPointsSwat += (sTileCost + SWATCOSTBPACK) + sExtraCostSwat; sPointsSwat += APBPConstants[AP_MODIFIER_PACK];
else
sPointsSwat += (sTileCost + SWATCOST) + sExtraCostSwat;
// now get cost as if RUNNING // now get cost as if RUNNING
sPointsRun += sTileCost + APBPConstants[AP_MODIFIER_RUN] + sExtraCostStand;
if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSold->inv[BPACKPOCKPOS].exists() == true)
sPointsRun += (INT16)(DOUBLE)( (sTileCost / RUNDIVISORBPACK) ) + sExtraCostStand; sPointsRun += APBPConstants[AP_MODIFIER_PACK];
else
sPointsRun += (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) ) + sExtraCostStand;
} }
if ( iCnt == 0 && bPlot ) if ( iCnt == 0 && bPlot )
+16 -24
View File
@@ -336,10 +336,9 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT16 sGridNo, INT8 bDir, UINT16 u
case ADULTMONSTER_WALKING: case ADULTMONSTER_WALKING:
case BLOODCAT_RUN: case BLOODCAT_RUN:
// CHRISL // CHRISL
sPoints = sTileCost + APBPConstants[AP_MODIFIER_RUN];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (INT16)(DOUBLE)( (sTileCost / RUNDIVISORBPACK) ); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) );
break; break;
case CROW_FLY: case CROW_FLY:
@@ -351,26 +350,23 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT16 sGridNo, INT8 bDir, UINT16 u
case LARVAE_WALK: case LARVAE_WALK:
case WALKING : case WALKING :
// CHRISL // CHRISL
sPoints = sTileCost + APBPConstants[AP_MODIFIER_WALK];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (sTileCost + WALKCOSTBPACK); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (sTileCost + WALKCOST);
break; break;
case START_SWAT: case START_SWAT:
case SWAT_BACKWARDS: case SWAT_BACKWARDS:
// CHRISL // CHRISL
case SWATTING: case SWATTING:
sPoints = sTileCost + APBPConstants[AP_MODIFIER_SWAT];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (sTileCost + SWATCOSTBPACK); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (sTileCost + SWATCOST);
break; break;
case CRAWLING: case CRAWLING:
sPoints = sTileCost + APBPConstants[AP_MODIFIER_CRAWL];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (sTileCost + CRAWLCOSTBPACK); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (sTileCost + CRAWLCOST);
break; break;
default: default:
@@ -426,10 +422,9 @@ INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT16 sGridNo, INT8 bDir,
case ADULTMONSTER_WALKING: case ADULTMONSTER_WALKING:
case BLOODCAT_RUN: case BLOODCAT_RUN:
// CHRISL // CHRISL
sPoints = sTileCost + APBPConstants[AP_MODIFIER_RUN];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (INT16)(DOUBLE)( (sTileCost / RUNDIVISORBPACK) ); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (INT16)(DOUBLE)( (sTileCost / RUNDIVISOR) );
break; break;
case CROW_FLY: case CROW_FLY:
@@ -441,26 +436,23 @@ INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT16 sGridNo, INT8 bDir,
case LARVAE_WALK: case LARVAE_WALK:
// CHRISL // CHRISL
case WALKING : case WALKING :
sPoints = sTileCost + APBPConstants[AP_MODIFIER_WALK];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (sTileCost + WALKCOSTBPACK); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (sTileCost + WALKCOST);
break; break;
case START_SWAT: case START_SWAT:
case SWAT_BACKWARDS: case SWAT_BACKWARDS:
// CHRISL // CHRISL
case SWATTING: case SWATTING:
sPoints = sTileCost + APBPConstants[AP_MODIFIER_SWAT];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (sTileCost + SWATCOSTBPACK); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (sTileCost + SWATCOST);
break; break;
case CRAWLING: case CRAWLING:
sPoints = sTileCost + APBPConstants[AP_MODIFIER_CRAWL];
if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true) if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true)
sPoints = (sTileCost + CRAWLCOSTBPACK); sPoints += APBPConstants[AP_MODIFIER_PACK];
else
sPoints = (sTileCost + CRAWLCOST);
break; break;
default: default:
+4 -4
View File
@@ -1459,13 +1459,13 @@ INT16 EstimatePathCostToLocation( SOLDIERTYPE * pSoldier, INT16 sDestGridNo, INT
// add in cost of later climbing up, too // add in cost of later climbing up, too
sPathCost += APBPConstants[AP_CLIMBOFFROOF] + APBPConstants[AP_CLIMBROOF]; sPathCost += APBPConstants[AP_CLIMBOFFROOF] + APBPConstants[AP_CLIMBROOF];
// add in an estimate of getting there after climbing down // add in an estimate of getting there after climbing down
sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + WALKCOST) * PythSpacesAway( sClimbGridNo, sDestGridNo ); sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + APBPConstants[AP_MODIFIER_WALK]) * PythSpacesAway( sClimbGridNo, sDestGridNo );
} }
else else
{ {
sPathCost += APBPConstants[AP_CLIMBOFFROOF]; sPathCost += APBPConstants[AP_CLIMBOFFROOF];
// add in an estimate of getting there after climbing down, *but not on top of roof* // add in an estimate of getting there after climbing down, *but not on top of roof*
sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + WALKCOST) * PythSpacesAway( sClimbGridNo, sDestGridNo ) / 2; sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + APBPConstants[AP_MODIFIER_WALK]) * PythSpacesAway( sClimbGridNo, sDestGridNo ) / 2;
} }
*pfClimbingNecessary = TRUE; *pfClimbingNecessary = TRUE;
*psClimbGridNo = sClimbGridNo; *psClimbGridNo = sClimbGridNo;
@@ -1505,7 +1505,7 @@ INT16 EstimatePathCostToLocation( SOLDIERTYPE * pSoldier, INT16 sDestGridNo, INT
{ {
// add to path a rough estimate of how far to go from the climb gridno to the friend // add to path a rough estimate of how far to go from the climb gridno to the friend
// estimate walk cost // estimate walk cost
sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + WALKCOST) * PythSpacesAway( sClimbGridNo, sDestGridNo ); sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + APBPConstants[AP_MODIFIER_WALK]) * PythSpacesAway( sClimbGridNo, sDestGridNo );
} }
} }
else else
@@ -1514,7 +1514,7 @@ INT16 EstimatePathCostToLocation( SOLDIERTYPE * pSoldier, INT16 sDestGridNo, INT
sPathCost += APBPConstants[AP_CLIMBOFFROOF]; sPathCost += APBPConstants[AP_CLIMBOFFROOF];
// add to path a rough estimate of how far to go from the climb gridno to the friend // add to path a rough estimate of how far to go from the climb gridno to the friend
// estimate walk cost // estimate walk cost
sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + WALKCOST) * PythSpacesAway( sClimbGridNo, sDestGridNo ); sPathCost += (APBPConstants[AP_MOVEMENT_FLAT] + APBPConstants[AP_MODIFIER_WALK]) * PythSpacesAway( sClimbGridNo, sDestGridNo );
} }
*pfClimbingNecessary = TRUE; *pfClimbingNecessary = TRUE;
*psClimbGridNo = sClimbGridNo; *psClimbGridNo = sClimbGridNo;
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8,00" Version="8.00"
Name="ja2_2005Express" Name="ja2_2005Express"
ProjectGUID="{F44669E7-74AC-444B-B75F-F16F4B9F0265}" ProjectGUID="{F44669E7-74AC-444B-B75F-F16F4B9F0265}"
RootNamespace="ja2_2005Express" RootNamespace="ja2_2005Express"
@@ -17,7 +17,7 @@
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="C:\games\jagged alliance 2 EN" OutputDirectory="\games\jagged alliance 2"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\ja2_2005Express.vsprops;.\ja2_2005ExpressDebug.vsprops" InheritedPropertySheets=".\ja2_2005Express.vsprops;.\ja2_2005ExpressDebug.vsprops"