new feature: after throwing knives, put any throwing knife class item from second hand into main hand

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9037 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-05-22 15:07:28 +00:00
parent 9a942fcb89
commit 5a2202f5b4
+10
View File
@@ -2895,6 +2895,11 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
{
// Here, remove the knife... or (for now) rocket launcher
pSoldier->inv[ HANDPOS ].RemoveObjectsFromStack(1);
//shadooow: if we have another throwing knife in second hand, move it to main hand
if (pSoldier->inv[SECONDHANDPOS].exists() && (Item[pSoldier->inv[SECONDHANDPOS].usItem].usItemClass & IC_THROWING_KNIFE))
{
SwapObjs(pSoldier, SECONDHANDPOS, HANDPOS, TRUE);
}
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
}
else if ( Item[usUBItem].rocketlauncher )
@@ -3652,6 +3657,11 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
{
// Here, remove the knife... or (for now) rocket launcher
pSoldier->inv[ HANDPOS ].RemoveObjectsFromStack(1);
//shadooow: if we have another throwing knife in second hand, move it to main hand
if (pSoldier->inv[SECONDHANDPOS].exists() && (Item[pSoldier->inv[SECONDHANDPOS].usItem].usItemClass & IC_THROWING_KNIFE))
{
SwapObjs(pSoldier, SECONDHANDPOS, HANDPOS, TRUE);
}
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
}
else if ( Item[usUBItem].rocketlauncher )