mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +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
|
#else
|
||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
INT16 zVersionLabel[256] = { L"Release v1.13.480" };
|
INT16 zVersionLabel[256] = { L"Release v1.13.489" };
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+7
-5
@@ -4415,12 +4415,14 @@ UINT16 UseKitPoints( OBJECTTYPE * pObj, UINT16 usPoints, SOLDIERTYPE *pSoldier )
|
|||||||
|
|
||||||
for (bLoop = pObj->ubNumberOfObjects - 1; bLoop >= 0; bLoop--)
|
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);
|
||||||
pObj->bStatus[bLoop] -= (INT8) ((usPoints * (100 - Item[pObj->usItem].percentstatusdrainreduction ) )/100);
|
return( usOriginalPoints );
|
||||||
else
|
}
|
||||||
pObj->bStatus[bLoop] -= (INT8) usPoints;
|
else if (usPoints < (UINT16) pObj->bStatus[bLoop])
|
||||||
|
{
|
||||||
|
pObj->bStatus[bLoop] -= (INT8) usPoints;
|
||||||
return( usOriginalPoints );
|
return( usOriginalPoints );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user