mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
New Feature: scuba gear allows to dive, thereby staying invisible to the enemy as long as you are in deep water. If you are spotted however, the enemy remembers that, and can still see you in deep water.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5718 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -331,6 +331,19 @@ INT16 TerrainBreathPoints(SOLDIERTYPE * pSoldier, INT32 sGridNo, INT8 bDir, UINT
|
||||
iPoints = max(1, (INT16)((iPoints * (100 - gSkillTraitValues.ubATBPsMovementReduction) / 100) + 0.5));
|
||||
}
|
||||
|
||||
// Flugente: scuba fins reduce movement cost in water, but increase cost on land
|
||||
if ( pSoldier->inv[LEGPOS].exists() && HasItemFlag( pSoldier->inv[LEGPOS].usItem, SCUBA_FINS ) )
|
||||
{
|
||||
if ( TERRAIN_IS_HIGH_WATER( ubTerrainID) )
|
||||
{
|
||||
iPoints /= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
iPoints *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
// ATE: Adjust these by realtime movement
|
||||
if (!(gTacticalStatus.uiFlags & TURNBASED) || !(gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
{
|
||||
@@ -443,6 +456,20 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 u
|
||||
{
|
||||
sPoints = max(1, (INT16)((sPoints * (100 - gSkillTraitValues.ubATAPsMovementReduction) / 100) + 0.5));
|
||||
}
|
||||
|
||||
// Flugente: scuba fins reduce movement cost in water, but increase cost on land
|
||||
if ( pSoldier->inv[LEGPOS].exists() && HasItemFlag( pSoldier->inv[LEGPOS].usItem, SCUBA_FINS ) )
|
||||
{
|
||||
if ( TERRAIN_IS_HIGH_WATER( ubTerrainID) )
|
||||
{
|
||||
sPoints /= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sPoints *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if doors if not player's merc (they have to open them manually)
|
||||
if ( sSwitchValue == TRAVELCOST_DOOR && pSoldier->bTeam != gbPlayerNum )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user