- Fix: not checking for NOBODY

- Fix: uninitialised variable

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6690 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-12-12 21:20:01 +00:00
parent 534af956c8
commit 9691b728db
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -5999,7 +5999,7 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1
return;
}
INT16 poisondamage;
INT16 poisondamage = 0;
if ( ubAttackerID != NOBODY )
poisondamage = (INT16) ( (sDamage * MercPtrs[ubAttackerID]->GetPoisonDamagePercentage()) / 100 );
+1 -1
View File
@@ -89,7 +89,7 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
GetMouseMapPos( &usSoldierGridNo );
// get the distance to enemy's tile from the selected merc
if ( gusSelectedSoldier != NOBODY )
if ( gusSelectedSoldier != NOBODY && gusUIFullTargetID != NOBODY )
{
//CHRISL: Changed the second parameter to use the same information as the 'F' hotkey uses.
//iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10;