mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
tr2/inventory: handle GF weapon removal and addition
This responds to scenarios when the game flow removes all weapons but also re-adds pistols, such that Lara's meshes can be drawn correctly. Resolves #2677.
This commit is contained in:
parent
f396ef4514
commit
0939b6b384
2 changed files with 9 additions and 5 deletions
|
@ -3,6 +3,7 @@
|
|||
- added the bonus level game flow type, which allows for levels to be unlocked if all main game secrets are found (#2668)
|
||||
- added the ability for custom levels to have up to two of each secret type per level (#2674)
|
||||
- fixed the final two levels not allowing for secrets to be counted in the statistics (#1582)
|
||||
- fixed Lara's holsters being empty if a game flow level removes all weapons but also re-adds the pistols (#2677)
|
||||
- removed the need to specify in the game flow levels that have no secrets (secrets will be automatically counted) (#1582)
|
||||
|
||||
## [0.10](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.2...tr2-0.10) - 2025-03-18
|
||||
|
|
|
@ -139,11 +139,6 @@ void GF_InventoryModifier_Apply(
|
|||
{
|
||||
START_INFO *const start = Savegame_GetCurrentInfo(level);
|
||||
|
||||
if (!start->has_pistols && m_Add2InvItems[O_PISTOL_ITEM]) {
|
||||
start->has_pistols = 1;
|
||||
Inv_AddItem(O_PISTOL_ITEM);
|
||||
}
|
||||
|
||||
if (m_RemoveWeapons) {
|
||||
start->has_pistols = 0;
|
||||
start->has_magnums = 0;
|
||||
|
@ -156,6 +151,14 @@ void GF_InventoryModifier_Apply(
|
|||
start->gun_status = LGS_ARMLESS;
|
||||
}
|
||||
|
||||
if (!start->has_pistols && m_Add2InvItems[O_PISTOL_ITEM]) {
|
||||
start->has_pistols = 1;
|
||||
Inv_AddItem(O_PISTOL_ITEM);
|
||||
if (start->gun_type == LGT_UNARMED) {
|
||||
start->gun_type = LGT_PISTOLS;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_RemoveAmmo) {
|
||||
start->m16_ammo = 0;
|
||||
start->grenade_ammo = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue