mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
-fixed percentstatusdrainreduction usage in UseKitPoints
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@489 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.480" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.489" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+7
-5
@@ -4415,12 +4415,14 @@ UINT16 UseKitPoints( OBJECTTYPE * pObj, UINT16 usPoints, SOLDIERTYPE *pSoldier )
|
||||
|
||||
for (bLoop = pObj->ubNumberOfObjects - 1; bLoop >= 0; bLoop--)
|
||||
{
|
||||
if (usPoints < (UINT16) pObj->bStatus[bLoop])
|
||||
if (Item[pObj->usItem].percentstatusdrainreduction > 0 && ((usPoints * (100 - Item[pObj->usItem].percentstatusdrainreduction))/100) < pObj->bStatus[bLoop] )
|
||||
{
|
||||
if ( Item[pObj->usItem].percentstatusdrainreduction > 0 )
|
||||
pObj->bStatus[bLoop] -= (INT8) ((usPoints * (100 - Item[pObj->usItem].percentstatusdrainreduction ) )/100);
|
||||
else
|
||||
pObj->bStatus[bLoop] -= (INT8) usPoints;
|
||||
pObj->bStatus[bLoop] -= (INT8) ((usPoints * (100 - Item[pObj->usItem].percentstatusdrainreduction ) )/100);
|
||||
return( usOriginalPoints );
|
||||
}
|
||||
else if (usPoints < (UINT16) pObj->bStatus[bLoop])
|
||||
{
|
||||
pObj->bStatus[bLoop] -= (INT8) usPoints;
|
||||
return( usOriginalPoints );
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user