mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
tr2/creatures/dragon: count dragon kill only once
This ensures that the dragon kill is only counted in the statistics when it is finally defeated rather than after each time it is taken down. Resolves #1771.
This commit is contained in:
parent
490cdffe58
commit
b13106b9c1
4 changed files with 7 additions and 1 deletions
|
@ -53,6 +53,7 @@
|
|||
- fixed the game hanging if exited during the level stats, credits, or final stats (#1585)
|
||||
- fixed the console not being drawn during credits (#1802)
|
||||
- fixed grenades launched at too slow speeds (#1760, regression from 0.3)
|
||||
- fixed the dragon counting as more than one kill if allowed to revive (#1771)
|
||||
|
||||
## [0.5](https://github.com/LostArtefacts/TRX/compare/afaf12a...tr2-0.5) - 2024-10-08
|
||||
- added `/sfx` command
|
||||
|
|
|
@ -34,6 +34,9 @@ decompilation process. We recognize that there is much work to be done.
|
|||
- fixed the ammo counter being hidden while a demo plays in NG+
|
||||
- fixed the game hanging if exited during the level stats, credits, or final stats
|
||||
|
||||
#### Statistics
|
||||
- fixed the dragon counting as more than one kill if allowed to revive
|
||||
|
||||
#### Visuals
|
||||
|
||||
- fixed TGA screenshots crashing the game
|
||||
|
|
|
@ -312,7 +312,8 @@ void __cdecl Gun_FindTargetPoint(
|
|||
void __cdecl Gun_HitTarget(
|
||||
ITEM *const item, const GAME_VECTOR *const hit_pos, const int32_t damage)
|
||||
{
|
||||
if (item->hit_points > 0 && item->hit_points <= damage) {
|
||||
if (item->hit_points > 0 && item->hit_points <= damage
|
||||
&& item->object_id != O_DRAGON_FRONT) {
|
||||
g_SaveGame.statistics.kills++;
|
||||
}
|
||||
Item_TakeDamage(item, damage, true);
|
||||
|
|
|
@ -69,6 +69,7 @@ static void M_MarkDragonDead(const ITEM *const dragon_back_item)
|
|||
const ITEM *const dragon_front_item = Item_Get(dragon_front_item_num);
|
||||
CREATURE *const creature = dragon_front_item->data;
|
||||
creature->flags = -1;
|
||||
g_SaveGame.statistics.kills++;
|
||||
}
|
||||
|
||||
static void M_PushLaraAway(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue