flame: tie FX to Lara's room when on fire (#1107)

This ensures that if Lara enters a different room while on fire, that
the flame FX are tied to that room so that they will always be drawn.

Resolves #1106.
This commit is contained in:
lahm86 2023-12-09 21:20:12 +00:00 committed by Marcin Kurczewski
parent 6599ffe275
commit 6fca6cdeda
No known key found for this signature in database
GPG key ID: CC65E6FD28CAE42A
3 changed files with 5 additions and 0 deletions

View file

@ -4,6 +4,7 @@
- fixed bugs when trying to stack multiple movable blocks (#1079)
- fixed Lara's meshes being swapped in the gym level when using the console to give guns (#1092)
- fixed Midas's touch having unrestricted vertical range (#1094)
- fixed flames not being drawn when Lara is on fire but leaves the room where she caught fire (#1106)
## [3.0.5](https://github.com/LostArtefacts/TR1X/compare/3.0.4...3.0.5) - 2023-12-13
- fixed crash when pressing certain keys and the console is disabled (#1116, regression since 3.0)

View file

@ -261,6 +261,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
- fixed counting the secret in The Great Pyramid
- fixed running out of ammo forcing Lara to equip pistols even if she doesn't carry them
- fixed a crash when Lara is on fire and goes too far away from where she caught fire
- fixed flames not being drawn when Lara is on fire and leaves the room where she caught fire
- fixed settings not being saved when exiting the game with Alt+F4
- fixed settings not persisting chosen layout (default vs. user keys)
- fixed the infamous Tihocan crocodile bug (integer overflow causing creatures to deal damage across the entire level)

View file

@ -58,6 +58,9 @@ void Flame_Control(int16_t fx_num)
Sound_StopEffect(SFX_FIRE, NULL);
Effect_Kill(fx_num);
} else {
if (fx->room_number != g_LaraItem->room_number) {
Effect_NewRoom(fx_num, g_LaraItem->room_number);
}
Sound_Effect(SFX_FIRE, &fx->pos, SPM_NORMAL);
Lara_TakeDamage(FLAME_ONFIRE_DAMAGE, true);
}