mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Improved code to update scope mode when changing stance.
ChangeScopeMode: use NOWHERE instead of 0 as incorrect target gridno. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8796 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+15
-3
@@ -3828,14 +3828,21 @@ void UIHandleSoldierStanceChange( UINT8 ubSoldierID, INT8 bNewStance )
|
||||
pSoldier->bGoodContPath = FALSE;
|
||||
|
||||
//dnl ch71 180913 when we go to crouch or prone for now there is no alternative fire mode option
|
||||
if(pSoldier->bScopeMode == USE_ALT_WEAPON_HOLD && bNewStance != ANIM_STAND)
|
||||
if (pSoldier->bScopeMode == USE_ALT_WEAPON_HOLD && bNewStance != ANIM_STAND ||
|
||||
gGameExternalOptions.ubAllowAlternativeWeaponHolding &&
|
||||
pSoldier->inv[HANDPOS].exists() &&
|
||||
Weapon[pSoldier->inv[HANDPOS].usItem].HeavyGun &&
|
||||
Item[pSoldier->inv[HANDPOS].usItem].twohanded &&
|
||||
bNewStance == ANIM_STAND)
|
||||
{
|
||||
ChangeScopeMode(pSoldier, 0);
|
||||
ChangeScopeMode(pSoldier, NOWHERE);
|
||||
ManLooksForOtherTeams(pSoldier);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If realtime- change walking animation!
|
||||
@@ -3872,7 +3879,12 @@ void UIHandleSoldierStanceChange( UINT8 ubSoldierID, INT8 bNewStance )
|
||||
}
|
||||
|
||||
// sevenfm: switch from alt weapon holding when changing stance in realtime
|
||||
if (pSoldier->bScopeMode == USE_ALT_WEAPON_HOLD && bNewStance != ANIM_STAND)
|
||||
if (pSoldier->bScopeMode == USE_ALT_WEAPON_HOLD && bNewStance != ANIM_STAND ||
|
||||
gGameExternalOptions.ubAllowAlternativeWeaponHolding &&
|
||||
pSoldier->inv[HANDPOS].exists() &&
|
||||
Weapon[pSoldier->inv[HANDPOS].usItem].HeavyGun &&
|
||||
Item[pSoldier->inv[HANDPOS].usItem].twohanded &&
|
||||
bNewStance == ANIM_STAND)
|
||||
{
|
||||
ChangeScopeMode(pSoldier, NOWHERE);
|
||||
ManLooksForOtherTeams(pSoldier);
|
||||
|
||||
Reference in New Issue
Block a user