mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Fix for AI seeking climb point in toxic gas
Fix for civilians trying to climb the roof to seek noise Fix for punching and stabbing Transparent change: Gave names to anonymous structs in OBJECTTYPE git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -178,12 +178,12 @@ BOOLEAN ApplyDrugs( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObject )
|
||||
if ( ubDrugType == DRUG_TYPE_REGENERATION )
|
||||
{
|
||||
// each use of a regen booster over 1, each day, reduces the effect
|
||||
bRegenPointsGained = REGEN_POINTS_PER_BOOSTER * pObject->bStatus[0] / 100;
|
||||
bRegenPointsGained = REGEN_POINTS_PER_BOOSTER * pObject->ItemData.Generic.bStatus[0] / 100;
|
||||
// are there fractional %s left over?
|
||||
if ( ( pObject->bStatus[0] % (100 / REGEN_POINTS_PER_BOOSTER ) ) != 0 )
|
||||
if ( ( pObject->ItemData.Generic.bStatus[0] % (100 / REGEN_POINTS_PER_BOOSTER ) ) != 0 )
|
||||
{
|
||||
// chance of an extra point
|
||||
if ( PreRandom( 100 / REGEN_POINTS_PER_BOOSTER ) < (UINT32) ( pObject->bStatus[0] % (100 / REGEN_POINTS_PER_BOOSTER ) ) )
|
||||
if ( PreRandom( 100 / REGEN_POINTS_PER_BOOSTER ) < (UINT32) ( pObject->ItemData.Generic.bStatus[0] % (100 / REGEN_POINTS_PER_BOOSTER ) ) )
|
||||
{
|
||||
bRegenPointsGained++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user