Damage lock with bullets:

- lockBustingPower works as percentage bonus to damage based on bullet impact
- only damage lock if opening possible
- allow damaging lock if ubSmashDifficulty <= lockBustingPower + bullet impact

AttemptToBlowUpLock: make noise when using shaped charge.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2022-05-11 15:23:23 +00:00
parent dc8fffb471
commit 2874a0cb92
2 changed files with 10 additions and 6 deletions
+4
View File
@@ -745,6 +745,7 @@ BOOLEAN AttemptToBlowUpLock(SOLDIERTYPE * pSoldier, DOOR * pDoor)
// sevenfm: remember damage as item will be removed
UINT16 usDamage = Explosive[Item[pSoldier->inv[bSlot].usItem].ubClassIndex].ubDamage;
UINT16 usItem = pSoldier->inv[bSlot].usItem;
UINT8 ubVolume = Explosive[Item[pSoldier->inv[bSlot].usItem].ubClassIndex].ubVolume;
// Remove the explosive.....
pSoldier->inv[bSlot].RemoveObjectsFromStack(1);
@@ -814,6 +815,9 @@ BOOLEAN AttemptToBlowUpLock(SOLDIERTYPE * pSoldier, DOOR * pDoor)
// Flugente: additional dialogue
AdditionalTacticalCharacterDialogue_CallsLua(pSoldier, ADE_LOCKBOMB, 0);
}
// sevenfm: also make noise
MakeNoise(pSoldier->ubID, pSoldier->sGridNo, pSoldier->pathing.bLevel, pSoldier->bOverTerrainType, ubVolume, NOISE_EXPLOSION);
}
else
{