- New command: On [Alt] + [N], all team members in the sector try to put on gas masks

- Fix: gasmask status was not always evaluated correctly

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8315 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-10-14 21:07:49 +00:00
parent a0c2b0a39a
commit 68294910b8
7 changed files with 45 additions and 69 deletions
+2 -1
View File
@@ -27,6 +27,7 @@
#include "Reinforcement.h" // added by Flugente
#include "Town Militia.h" // added by Flugente
#include "Queen Command.h" // added by Flugente
#include "Explosion Control.h" // added by Flugente for GASMASK_MIN_STATUS
#endif
// anv: for enemy taunts
@@ -2161,7 +2162,7 @@ INT32 EstimateThrowDamage( SOLDIERTYPE *pSoldier, UINT8 ubItemPos, SOLDIERTYPE *
iBreathDamage /= 2; // reduce effective breath damage by 1/2
bSlot = FindGasMask(pOpponent); //FindObj( pOpponent, GASMASK );
if ((bSlot == HEAD1POS || bSlot == HEAD2POS || bSlot == HELMETPOS) && pSoldier->inv[bSlot][0]->data.objectStatus >= 70)
if ( (bSlot == HEAD1POS || bSlot == HEAD2POS || bSlot == HELMETPOS) && pSoldier->inv[bSlot][0]->data.objectStatus >= GASMASK_MIN_STATUS )
{
// take condition of the gas mask into account - it could be leaking
iBreathDamage = (iBreathDamage * (100 - pOpponent->inv[bSlot][0]->data.objectStatus)) / 100;