Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dragon: fix dragon reviving after the dagger is pulled #1759

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/tr2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- fixed the audio not being in sync when Lara strikes the gong in Ice Palace (#1725)
- fixed door cheat not working with drawbridges (#1748)
- fixed Lara's underwater hue being retained when re-entering a boat (#1596)
- fixed the dragon reviving itself after Lara removes the dagger in rare circumstances (#1572)

## [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 @@ -28,6 +28,7 @@ decompilation process. We recognize that there is much work to be done.
- fixed explosions sometimes being drawn too dark
- fixed controls dialog remapping being too sensitive
- fixed the distorted skybox in room 5 of Barkhang Monastery
- fixed the dragon reviving itself after Lara removes the dagger in rare circumstances

#### Visuals

Expand Down
10 changes: 5 additions & 5 deletions src/tr2/game/objects/creatures/dragon.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#define DRAGON_LIVE_TIME 330
#define DRAGON_HITPOINTS 300
#define DRAGON_RADIUS (WALL_L / 3) // = 341
#define DRAGON_ANIM_DIE 21
#define DRAGON_ANIM_DEAD 22
#define DRAGON_ANIM_RESURRECT 23

typedef enum {
// clang-format off
Expand All @@ -48,9 +51,6 @@ typedef enum {
DRAGON_ANIM_SWIPE_LEFT = 9,
DRAGON_ANIM_SWIPE_RIGHT = 10,
DRAGON_ANIM_DEATH = 11,
DRAGON_ANIM_DIE = 21,
DRAGON_ANIM_DEAD = 22,
DRAGON_ANIM_RESURRECT = 23,
// clang-format on
} DRAGON_ANIM;
walkawayy marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -263,7 +263,7 @@ void __cdecl Dragon_Control(const int16_t item_num)
if (dragon_front_item->hit_points <= 0) {
if (dragon_front_item->current_anim_state != DRAGON_ANIM_DEATH) {
dragon_front_item->anim_num =
g_Objects[O_DRAGON_FRONT].anim_idx + 21;
g_Objects[O_DRAGON_FRONT].anim_idx + DRAGON_ANIM_DIE;
dragon_front_item->frame_num =
g_Anims[dragon_front_item->anim_num].frame_base;
dragon_front_item->goal_anim_state = DRAGON_ANIM_DEATH;
Expand All @@ -275,7 +275,7 @@ void __cdecl Dragon_Control(const int16_t item_num)
if (creature->flags == DRAGON_LIVE_TIME) {
dragon_front_item->goal_anim_state = DRAGON_ANIM_STOP;
}
if (creature->flags >= DRAGON_LIVE_TIME + DRAGON_ALMOST_LIVE) {
if (creature->flags > DRAGON_LIVE_TIME + DRAGON_ALMOST_LIVE) {
dragon_front_item->hit_points =
g_Objects[O_DRAGON_FRONT].hit_points / 2;
}
Expand Down