- Small fixes and tweaks (by Sandro)

o Minor feature added: Shift+RMB click on a gun with ammo inside, will now unload its magazine and place it on your cursor (if not holding anything already). You don't have to go to the weapon description box to unload it.
o Added Throwing trait support for NCTH (was left out before) and added a minor tweak to STOMP+NCTH compatibility.
o Fixed a bug in NCTH when aiming levels of very fast-to-aim guns could be lowered below zero during calculation, which resulted in suddenly giving the gun 8 aim levels making it extremely slow to aim instead. This occurs when you use a pistol with reflex sights with a Gunslinger merc. In the "AllowedAimingLevelsNCTH" the value "aimLevels" was defined as UINT8, so when it goes below 0, it becomes 255 and is then capped at 8. Changed it to signed.

- IIS fix (by Sandro)
o Interrupts on hearing now occur only in meaningful situations - either when enemy attacks us or comes very close to us.
o Added some other IIS tweaks and fixes (first of all the top status bar should now work properly).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5289 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-05-20 16:30:14 +00:00
parent 2691c22397
commit eb2ca0ba70
12 changed files with 144 additions and 57 deletions
+6 -4
View File
@@ -4757,7 +4757,7 @@ void SOLDIERTYPE::EVENT_FireSoldierWeapon( INT32 sTargetGridNo )
// "artificially" set lock ui flag
if (this->bTeam == gbPlayerNum)
{
AddTopMessage( COMPUTER_INTERRUPT_MESSAGE, Message[STR_INTERRUPT] );
//AddTopMessage( COMPUTER_INTERRUPT_MESSAGE, Message[STR_INTERRUPT] );
guiPendingOverrideEvent = LU_BEGINUILOCK;
HandleTacticalUI( );
}
@@ -15371,13 +15371,15 @@ BOOLEAN ResolvePendingInterrupt( SOLDIERTYPE * pSoldier, UINT8 ubInterruptType )
/////////////////////////////////////////////////////////////
// set base value ( interrupt per every X APs an enemy uses )
if ( pInterrupter->aiData.bOppList[pSoldier->ubID] == SEEN_CURRENTLY ) // if we see him
// if not seen but just heard... we interrupt only if they attack us (or if they are very close) in that case
if (( pInterrupter->aiData.bOppList[pSoldier->ubID] == SEEN_CURRENTLY ) || ( pInterrupter->aiData.bOppList[pSoldier->ubID] == HEARD_THIS_TURN && (ubInterruptType == AFTERSHOT_INTERRUPT || ubInterruptType == AFTERACTION_INTERRUPT || PythSpacesAway( pInterrupter->sGridNo, pSoldier->sGridNo) < 3) ))
{
uiReactionTime = gGameExternalOptions.ubBasicReactionTimeLengthIIS;
}
else // if not seen the length is higher (we don't want to interrupt in most cases here)
else
{
uiReactionTime = (gGameExternalOptions.ubBasicReactionTimeLengthIIS * 2);
// not seen or not heard anything worth interrupting
continue;
}
uiReactionTime = uiReactionTime * 10; // x10 ... we will divide by 10 after all adjustments done
// adjust based on Agility