mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
tr2/inventory: fix flare pickup quantity
This ensures we always add 6 flares when Lara picks up item 151. The other logic for single flares is required for gameflow flare additions, like in Great Wall. Resolves #2551.
This commit is contained in:
parent
b1e24182fc
commit
f98d5a3574
2 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
- added a `/wireframe` console command (#2500)
|
||||
- fixed smashed windows blocking enemy pathing after loading a save (#2535)
|
||||
- fixed a rare issue whereby Lara would be unable to move after disposing a flare (#2545, regression from 0.9)
|
||||
- fixed flare pickups only adding one flare to Lara's inventory rather than six (#2551, regression from 0.9)
|
||||
|
||||
## [0.9.2](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.1...tr2-0.9.2) - 2025-02-19
|
||||
- fixed secret rewards not handed out after loading a save (#2528, regression from 0.8)
|
||||
|
|
|
@ -18,7 +18,9 @@ bool Inv_AddItem(const GAME_OBJECT_ID obj_id)
|
|||
INV_RING_SOURCE *const source = &g_InvRing_Source[ring_type];
|
||||
for (int32_t i = 0; i < source->count; i++) {
|
||||
if (source->items[i]->object_id == inv_obj_id) {
|
||||
source->qtys[i]++;
|
||||
const int32_t qty =
|
||||
obj_id == O_FLARES_ITEM ? FLARE_AMMO_QTY : 1;
|
||||
source->qtys[i] += qty;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue