mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
BUGFIX 538 - Added a condition so that if a door is not openable, iChance will be reset to 0 in time for the merc to make the "this is impossible" speech.
2nd correction. My fix left iChance uninitialized when the personality modifiers were being applied, meaning they no longer counted. I've put the iChance initialization back where it was and slightly altered the condition so we simply resent iChance to 0 when the lock is impossible. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4519 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -553,6 +553,8 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod )
|
||||
|
||||
iSkill -= GetSkillCheckPenaltyForFatigue( pSoldier, iSkill );
|
||||
|
||||
iChance = iSkill + bChanceMod;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - STOMP - character traits and disabilities modifiers
|
||||
|
||||
@@ -634,9 +636,7 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod )
|
||||
|
||||
// CHRISL: If lock is flagged OPENING_NOT_POSSIBLE, then reset iChance to 0 regardless of mercs skills. Also, moved this check to after personality and
|
||||
// disability checks since an unopenable door isn't going to suddenly be openable just cause we have some other bonus.
|
||||
if(bChanceMod != -100)
|
||||
iChance = iSkill + bChanceMod;
|
||||
else
|
||||
if(bChanceMod == -100)
|
||||
iChance = 0;
|
||||
|
||||
// silversurfer: moved this down here where it belongs
|
||||
|
||||
Reference in New Issue
Block a user