Merged from revision: 7155

Custom sounds for non-guns (by anv)
- knives, throwing knives, blunt weapons can use attack sounds specified with <sSound> tag - previously their sound was chosen depending on animation used and hardcoded - it should open space for exotic weapons like chainsaws, lawn mowers, jackhammers, etc. If <sSound> is left unspecified, default hardcoded sound will be used normally.
- knives, throwing knives, blunt weapons, launchers on attack can cause noise specified with <ubAttackVolume>, previously it was ignored for anything but guns,
- small fix for knife/wire cutters combo where using it on empty grid would cause deadlock during battle.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7156 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-04-19 09:24:17 +00:00
parent 4f7e06b75e
commit cd1c0a4e43
3 changed files with 42 additions and 4 deletions
+2 -2
View File
@@ -893,7 +893,7 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
{
// See if we can get there to stab
sActionGridNo = FindAdjacentGridEx( pSoldier, sGridNo, &ubDirection, &sAdjustedGridNo, TRUE, FALSE );
if ( sActionGridNo != -1 )
if ( sActionGridNo != -1 && IsCuttableWireFenceAtGridNo( sGridNo ) )
{
// Calculate AP costs...
sAPCost = GetAPsToCutFence( pSoldier );
@@ -939,7 +939,7 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
return( ITEM_HANDLE_NOAPS );
}
}
else
else if( sActionGridNo == -1 )
{
return( ITEM_HANDLE_CANNOT_GETTO_LOCATION );
}