mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fixed #1554
This commit is contained in:
parent
b55675b9ce
commit
5764965230
2 changed files with 10 additions and 4 deletions
|
@ -421,8 +421,8 @@ void lara_as_crawl_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
|
||||
if ((IsHeld(In::Sprint) && CanCrouchRoll(*item, *coll)) ||
|
||||
((IsHeld(In::Draw) || IsHeld(In::Flare)) &&
|
||||
!IsStandingWeapon(item, player.Control.Weapon.GunType) && HasStateDispatch(item, LS_CROUCH_IDLE)))
|
||||
((IsHeld(In::Draw) || (IsHeld(In::Flare) && player.Inventory.TotalFlares)) &&
|
||||
!IsStandingWeapon(item, player.Control.Weapon.GunType) && HasStateDispatch(item, LS_CROUCH_IDLE)))
|
||||
{
|
||||
item->Animation.TargetState = LS_CROUCH_IDLE;
|
||||
player.Control.HandStatus = HandStatus::Free;
|
||||
|
|
|
@ -574,7 +574,7 @@ void HandleWeapon(ItemInfo& laraItem)
|
|||
}
|
||||
else if (player.Inventory.TotalFlares && !player.Control.Look.IsUsingBinoculars)
|
||||
{
|
||||
if (player.Inventory.TotalFlares != -1)
|
||||
if (player.Inventory.TotalFlares != NO_VALUE)
|
||||
player.Inventory.TotalFlares--;
|
||||
|
||||
player.Control.Weapon.RequestGunType = LaraWeaponType::Flare;
|
||||
|
@ -648,7 +648,13 @@ void HandleWeapon(ItemInfo& laraItem)
|
|||
laraItem.Animation.ActiveState == LS_CRAWL_IDLE &&
|
||||
laraItem.Animation.AnimNumber == LA_CRAWL_IDLE)
|
||||
{
|
||||
player.Control.Weapon.RequestGunType = LaraWeaponType::Flare;
|
||||
if (player.Inventory.TotalFlares)
|
||||
{
|
||||
if (player.Inventory.TotalFlares != NO_VALUE)
|
||||
player.Inventory.TotalFlares--;
|
||||
|
||||
player.Control.Weapon.RequestGunType = LaraWeaponType::Flare;
|
||||
}
|
||||
}
|
||||
|
||||
switch (player.Control.HandStatus)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue