mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fix several issues with limited pistol ammo
This commit is contained in:
parent
59187f4db6
commit
8cb7ef6418
3 changed files with 6 additions and 5 deletions
|
@ -9,11 +9,12 @@ Version 1.3
|
|||
* Fix lack of water splash in certain scenarios.
|
||||
* Fix hydra flame not showing when charging.
|
||||
* Fix shockwave light for hammer god.
|
||||
* FIx camera shaking in some cases when the player is in quicksand room.
|
||||
* Fix camera shaking in some cases when the player is in quicksand room.
|
||||
* Fix certain flame emitter OCBs emitting fire in wrong directions.
|
||||
* Fix player not being able to pick up a torch when crouching.
|
||||
* Fix jittery camera when performing crawl-to-hang.
|
||||
* Fix Lara not being able to crawl if two-handed weapon (Shotgun, HK etc) is currently equipped.
|
||||
* Fix several issues with limited pistol ammo.
|
||||
* Fix Lara not being able to crawl if two-handed weapon is currently equipped.
|
||||
* Separate underwater wall and ceiling switch objects into two slots each.
|
||||
* Improve fly cheat collision.
|
||||
* Add global events.
|
||||
|
|
|
@ -708,7 +708,7 @@ void HandleWeapon(ItemInfo& laraItem)
|
|||
break;
|
||||
|
||||
case HandStatus::WeaponReady:
|
||||
if (!IsHeld(In::Action))
|
||||
if (!IsHeld(In::Action) || !GetAmmo(player, player.Control.Weapon.GunType))
|
||||
{
|
||||
laraItem.Model.MeshIndex[LM_HEAD] = laraItem.Model.BaseMesh + LM_HEAD;
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ void HandleWeapon(ItemInfo& laraItem)
|
|||
{
|
||||
if (!GetAmmo(player, player.Control.Weapon.GunType))
|
||||
{
|
||||
bool hasPistols = (player.Weapons[(int)LaraWeaponType::Pistol].Present && Objects[ID_PISTOLS_ITEM].loaded);
|
||||
bool hasPistols = (player.Weapons[(int)LaraWeaponType::Pistol].Present && Objects[ID_PISTOLS_ITEM].loaded && GetAmmo(player, LaraWeaponType::Pistol));
|
||||
player.Control.Weapon.RequestGunType = hasPistols ? LaraWeaponType::Pistol : LaraWeaponType::None;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ struct AmmoPickupInfo
|
|||
static constexpr std::array<AmmoPickupInfo, 14> kAmmo
|
||||
{
|
||||
{
|
||||
{ ID_PISTOLS_AMMO_ITEM, LaraWeaponType::Pistol, WeaponAmmoType::Ammo1, 0 },
|
||||
{ ID_PISTOLS_AMMO_ITEM, LaraWeaponType::Pistol, WeaponAmmoType::Ammo1, 30 },
|
||||
{ ID_UZI_AMMO_ITEM, LaraWeaponType::Uzi, WeaponAmmoType::Ammo1, 30 },
|
||||
{ ID_SHOTGUN_AMMO1_ITEM, LaraWeaponType::Shotgun, WeaponAmmoType::Ammo1, 6 },
|
||||
{ ID_SHOTGUN_AMMO2_ITEM, LaraWeaponType::Shotgun, WeaponAmmoType::Ammo2, 6 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue