- 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:
Flugente
2013-01-03 18:26:48 +00:00
parent dbdffeaa03
commit 6239438702
3 changed files with 11 additions and 4 deletions
+3 -1
View File
@@ -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;