diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index 065d90257..945bd027d 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -1713,8 +1713,10 @@ UINT32 VirtualSoldierDressWound( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pVictim, OB bPtsLeft = 0; } } + + //CHRISL: If by some chance ubPtsLeft ends up being higher then uiActual, we'll end up with a huge value since uiActual is an unsigned variable. // if there are any ptsLeft now, then we didn't actually get to use them - uiActual = max(0, (uiActual - bPtsLeft)); + uiActual = max(0, (INT32)(uiActual - bPtsLeft)); // usedAPs equals (actionPts) * (%of possible points actually used) uiUsedAPs = ( uiActual * uiAvailAPs ) / uiPossible; diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index 502d3c89e..7cd17eac5 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -1782,8 +1782,12 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe // award life 'experience' for travelling, based on travel time! if ( !pGroup->fVehicle ) { - // gotta be walking to get tougher - AwardExperienceForTravelling( pGroup ); + // Flugente: do not award experience gain if we never left + if ( !fNeverLeft ) + { + // gotta be walking to get tougher + AwardExperienceForTravelling( pGroup ); + } } else if( !IsGroupTheHelicopterGroup( pGroup ) ) { diff --git a/Tactical/LOS.cpp b/Tactical/LOS.cpp index 7371b46e1..48bf1f333 100644 --- a/Tactical/LOS.cpp +++ b/Tactical/LOS.cpp @@ -50,6 +50,7 @@ #include "Campaign Types.h" #include "soldier tile.h" // added by Flugente #include "Sound Control.h" // added by Flugente +#include "Soldier Functions.h" // added by Flugente for DoesSoldierWearGasMask(...) //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -2555,7 +2556,7 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend } } - if ( ( AmmoTypes[ubAmmoType].monsterSpit || ( AmmoTypes[ubAmmoType].ammoflag & AMMO_BLIND ) ) && (ubHitLocation == AIM_SHOT_HEAD) && ( ! (pTarget->flags.uiStatusFlags & SOLDIER_MONSTER) ) ) + if ( ( AmmoTypes[ubAmmoType].monsterSpit || ( !DoesSoldierWearGasMask(pTarget) && AmmoTypes[ubAmmoType].ammoflag & AMMO_BLIND ) ) && (ubHitLocation == AIM_SHOT_HEAD) && ( ! (pTarget->flags.uiStatusFlags & SOLDIER_MONSTER) ) ) { UINT8 ubOppositeDirection;