mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Fix (by Sevenfm): Corrected mixed suppression parameters MAX_CTH_PENALTY_FOR_TARGET_SHOCK and MAX_CTH_PENALTY_FROM_SHOCK and also fixed suppression calculation.
http://www.ja-galaxy-forum.com/ubbthreads.php/topics/337412/Re:_Code_Snippets#Post337412 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7621 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1351,10 +1351,10 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
|
||||
IS_MERC_BODY_TYPE(pSoldier) && (pSoldier->bTeam == ENEMY_TEAM || pSoldier->bTeam == MILITIA_TEAM || pSoldier->bTeam == gbPlayerNum) &&
|
||||
gGameExternalOptions.ubMaxSuppressionShock > 0 && sDistVisible > 0 )
|
||||
{
|
||||
INT8 bTolerance = CalcSuppressionTolerance( pSoldier );
|
||||
|
||||
|
||||
// Make sure character is cowering.
|
||||
if ( pSoldier->aiData.bShock >= bTolerance )
|
||||
if ( CoweringShockLevel(pSoldier) )
|
||||
{
|
||||
sDistVisible = __max(1,(sDistVisible * (gGameExternalOptions.ubMaxSuppressionShock - pSoldier->aiData.bShock)) / gGameExternalOptions.ubMaxSuppressionShock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user