Skip to content

Commit

Permalink
grenade: fix grenades counting as double hits and kills
Browse files Browse the repository at this point in the history
  • Loading branch information
walkawayy committed Oct 27, 2024
1 parent 535a502 commit 9615779
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/tr2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- fixed Lara's underwater hue being retained when re-entering a boat (#1596)
- fixed Lara reloading the harpoon gun after every shot in NG+ (#1575)
- fixed the dragon reviving itself after Lara removes the dagger in rare circumstances (#1572)
- fixed grenades counting as double hits and kills in the game statistics (#1560)

## [0.5](https://github.com/LostArtefacts/TRX/compare/afaf12a...tr2-0.5) - 2024-10-08
- added `/sfx` command
Expand Down
1 change: 1 addition & 0 deletions docs/tr2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ decompilation process. We recognize that there is much work to be done.
- fixed the distorted skybox in room 5 of Barkhang Monastery
- fixed Lara reloading the harpoon gun after every shot in NG+
- fixed the dragon reviving itself after Lara removes the dagger in rare circumstances
- fixed grenades counting as double hits and kills in the game statistics

#### Visuals

Expand Down
10 changes: 0 additions & 10 deletions src/tr2/game/objects/general/grenade.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,7 @@ void __cdecl Grenade_Control(int16_t item_num)
} else {
// XXX: missing check if obj is intelligent?
Gun_HitTarget(target_item, NULL, 30);

explode = true;
g_SaveGame.statistics.hits++;

if (target_item->hit_points <= 0) {
g_SaveGame.statistics.kills++;
if (target_item->object_id != O_DRAGON_FRONT
&& target_item->object_id != O_GIANT_YETI) {
Creature_Die(target_item_num, true);
}
}
}
}

Expand Down

0 comments on commit 9615779

Please sign in to comment.