mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- 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:
@@ -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 );
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user