mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: pows received wrong poison values. Those values were inconsistent and caused odd displays.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6528 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -125,7 +125,7 @@ enum{
|
||||
MOVEITEM_MENU_1 = 0,
|
||||
MOVEITEM_MENU_2,
|
||||
MOVEITEM_MENU_3,
|
||||
MOVEITEM_MENU_4, // WANNE: Allow up to 6 vehicles
|
||||
MOVEITEM_MENU_4,
|
||||
MOVEITEM_MENU_5,
|
||||
MOVEITEM_MENU_6,
|
||||
MOVEITEM_MENU_7,
|
||||
|
||||
@@ -2255,11 +2255,18 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
// adjust poison points
|
||||
INT8 lifechanged = oldlife - pSoldier->stats.bLife;
|
||||
INT8 lifechanged = pSoldier->stats.bLife - oldlife;
|
||||
if ( lifechanged < 0 )
|
||||
pSoldier->bPoisonLife = max(0, pSoldier->bPoisonLife - lifechanged);
|
||||
{
|
||||
// add a bit of poisoning...
|
||||
pSoldier->bPoisonSum = min(pSoldier->bPoisonSum + 10, pSoldier->stats.bLifeMax);
|
||||
|
||||
pSoldier->bPoisonLife = min(pSoldier->bPoisonSum, pSoldier->stats.bLife);
|
||||
}
|
||||
else if ( lifechanged > 0)
|
||||
pSoldier->bPoisonLife = max(pSoldier->bPoisonSum, pSoldier->bPoisonLife + lifechanged);
|
||||
{
|
||||
pSoldier->bPoisonLife = min(pSoldier->bPoisonSum, pSoldier->stats.bLife);
|
||||
}
|
||||
|
||||
// SANDRO - make the lost life insta-healable
|
||||
pSoldier->iHealableInjury = ((pSoldier->stats.bLifeMax - pSoldier->stats.bLife) * 100);
|
||||
|
||||
@@ -16888,6 +16888,11 @@ void SOLDIERTYPE::SoldierPropertyUpkeep()
|
||||
|
||||
if ( HasBackgroundFlag( BACKGROUND_EXP_UNDERGROUND ) && this->bSectorZ )
|
||||
++bExtraExpLevel;
|
||||
|
||||
// Flugente: as pows received faulty poison values, we apply a very simple fix:
|
||||
// remove in a few revisions - the code has already been fixed, so this won't be necessary anymore soon^^
|
||||
this->bPoisonLife = min(this->bPoisonLife, this->bPoisonSum );
|
||||
this->bPoisonBleeding = min(this->bPoisonBleeding, this->bBleeding);
|
||||
}
|
||||
|
||||
INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
|
||||
|
||||
Reference in New Issue
Block a user