mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- Bugfix: Fixed CTD when throwing item (grenade, rock, throwing knife, ...) in tactical when item description box is open
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3299 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+11
-2
@@ -1402,9 +1402,18 @@ INT16 BaseAPsToShootOrStab( INT16 bAPs, INT16 bAimSkill, OBJECTTYPE * pObj )
|
||||
//{
|
||||
// Top *= 100;
|
||||
//}
|
||||
Bottom = (INT32)(( 100 + bAimSkill ) * rof);
|
||||
|
||||
// WANNE : Fixed CTD that occurs when trowing item (grenade, throwing knife, ...)
|
||||
// with open description box in tactical
|
||||
INT16 baseAPsToShootOrStab = -1;
|
||||
if (rof > 0)
|
||||
{
|
||||
Bottom = (INT32)(( 100 + bAimSkill ) * rof);
|
||||
baseAPsToShootOrStab = ( Top + Bottom / 2 ) / Bottom;
|
||||
}
|
||||
|
||||
// (this will round to the nearest integer)
|
||||
return ( Top + Bottom / 2 ) / Bottom;
|
||||
return baseAPsToShootOrStab;
|
||||
}
|
||||
|
||||
void GetAPChargeForShootOrStabWRTGunRaises( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 ubAddTurningCost, BOOLEAN *pfChargeTurning, BOOLEAN *pfChargeRaise )
|
||||
|
||||
Reference in New Issue
Block a user