Skip to content

Commit

Permalink
tr1/lara: inject medium water exit animation
Browse files Browse the repository at this point in the history
This injects the TR2 exit water to "medium" height animation.

Resolves #1538.
  • Loading branch information
lahm86 committed Oct 8, 2024
1 parent dd8f7ff commit a9fd434
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
Binary file modified data/tr1/ship/data/injections/lara_animations.bin
Binary file not shown.
1 change: 1 addition & 0 deletions docs/tr1/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- added `/quit` alias to `/exit` console command
- added an option to toggle the in-game UI, such as healthbars and ammo text (#1656)
- added the ability to cycle through console prompt history (#1571)
- added Lara's exit-water-to-medium-height animation from TR2+ (#1538)
- changed the easter egg console command to pack more punch
- changed `/set` console command to do fuzzy matching (LostArtefacts/libtrx#38)
- fixed console caret position off by a couple of pixels (regression from 3.0)
Expand Down
1 change: 1 addition & 0 deletions docs/tr1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
- added ability to automatically walk to items when nearby
- added ability to roll while underwater like in TR2+
- added ability to use Lara's underwater swimming physics from TR2+
- added Lara's exit-water-to-medium-height animation from TR2+
- added a pause screen
- added a choice whether to play NG or NG+ without having to play the entire game
- added Japanese mode (guns deal twice the damage, inspired by JP release of TR3); available for both NG and NG+
Expand Down
3 changes: 2 additions & 1 deletion src/libtrx/include/libtrx/game/lara/enum_tr1.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ typedef enum {
LA_TREAD = 108,
LA_SURF_TREAD = 114,
LA_SURF_DIVE = 119,
LA_SURF_CLIMB = 111,
LA_SURF_CLIMB_HIGH = 111,
LA_JUMP_IN = 112,
LA_PUSHABLE_GRAB = 120,
LA_ROLL = 146,
Expand All @@ -90,6 +90,7 @@ typedef enum {
LA_SPAZ_BACK = 126,
LA_SPAZ_RIGHT = 127,
LA_SPAZ_LEFT = 128,
LA_SURF_CLIMB_MEDIUM = 169,
} LARA_ANIMATION;

// clang-format off
Expand Down
9 changes: 8 additions & 1 deletion src/tr1/game/lara/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,14 @@ bool Lara_TestWaterClimbOut(ITEM *item, COLL_INFO *coll)
break;
}

Item_SwitchToAnim(item, LA_SURF_CLIMB, 0);
LARA_ANIMATION animation;
if (hdif < -STEP_L / 2) {
animation = LA_SURF_CLIMB_HIGH;
} else {
animation = LA_SURF_CLIMB_MEDIUM;
}

Item_SwitchToAnim(item, animation, 0);
item->current_anim_state = LS_WATER_OUT;
item->goal_anim_state = LS_STOP;
item->rot.x = 0;
Expand Down

0 comments on commit a9fd434

Please sign in to comment.