mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- Fix: moving strategically and then cancelling that order no longer awards stat gains.
- Fix: On rare occasions, huge stat gains were possible when doing surgery after autoresolve. - pepper spray does not work on soldiers wearing a gas mask git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5760 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1713,8 +1713,10 @@ UINT32 VirtualSoldierDressWound( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pVictim, OB
|
|||||||
bPtsLeft = 0;
|
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
|
// 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)
|
// usedAPs equals (actionPts) * (%of possible points actually used)
|
||||||
uiUsedAPs = ( uiActual * uiAvailAPs ) / uiPossible;
|
uiUsedAPs = ( uiActual * uiAvailAPs ) / uiPossible;
|
||||||
|
|||||||
@@ -1782,8 +1782,12 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
|||||||
// award life 'experience' for travelling, based on travel time!
|
// award life 'experience' for travelling, based on travel time!
|
||||||
if ( !pGroup->fVehicle )
|
if ( !pGroup->fVehicle )
|
||||||
{
|
{
|
||||||
// gotta be walking to get tougher
|
// Flugente: do not award experience gain if we never left
|
||||||
AwardExperienceForTravelling( pGroup );
|
if ( !fNeverLeft )
|
||||||
|
{
|
||||||
|
// gotta be walking to get tougher
|
||||||
|
AwardExperienceForTravelling( pGroup );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( !IsGroupTheHelicopterGroup( pGroup ) )
|
else if( !IsGroupTheHelicopterGroup( pGroup ) )
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-1
@@ -50,6 +50,7 @@
|
|||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
#include "soldier tile.h" // added by Flugente
|
#include "soldier tile.h" // added by Flugente
|
||||||
#include "Sound Control.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
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
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;
|
UINT8 ubOppositeDirection;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user