This commit is contained in:
Lwmte 2025-01-21 20:47:06 +01:00
parent b55675b9ce
commit 5764965230
2 changed files with 10 additions and 4 deletions

View file

@ -421,7 +421,7 @@ void lara_as_crawl_idle(ItemInfo* item, CollisionInfo* coll)
}
if ((IsHeld(In::Sprint) && CanCrouchRoll(*item, *coll)) ||
((IsHeld(In::Draw) || IsHeld(In::Flare)) &&
((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;

View file

@ -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,8 +648,14 @@ void HandleWeapon(ItemInfo& laraItem)
laraItem.Animation.ActiveState == LS_CRAWL_IDLE &&
laraItem.Animation.AnimNumber == LA_CRAWL_IDLE)
{
if (player.Inventory.TotalFlares)
{
if (player.Inventory.TotalFlares != NO_VALUE)
player.Inventory.TotalFlares--;
player.Control.Weapon.RequestGunType = LaraWeaponType::Flare;
}
}
switch (player.Control.HandStatus)
{