Skip to content

Commit

Permalink
common: fix Lara entering a long animated interaction if pushed
Browse files Browse the repository at this point in the history
Resolves #1687.
  • Loading branch information
walkawayy committed Oct 8, 2024
1 parent abb678b commit 39c9822
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/tr1/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- fixed Story So Far feature looping cutscenes forever (#1551, regression from 4.4)
- fixed a rare crash related to the camera that could affect custom levels (#1671)
- fixed a bug when saving and loading when picking up an item or using a switch with animated interactions enabled (#1546)
- fixed a bug where Lara was stuck for a long time in an animated interactions if pushed (#1687)
- improved object name matching in console commands to work like TR2X
- improved vertex movement when looking through water portals even more (#1493)
- improved console commands targeting creatures and pickups (#1667)
Expand Down
7 changes: 7 additions & 0 deletions src/tr1/game/lara/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <stddef.h>

#define LARA_MOVE_TIMEOUT 90
#define LARA_PUSH_TIMEOUT 15
#define LARA_MOVE_ANIM_VELOCITY 12
#define LARA_MOVE_SPEED 16
#define LARA_UW_DAMAGE 5
Expand Down Expand Up @@ -803,6 +804,12 @@ void Lara_Push(ITEM *item, COLL_INFO *coll, bool spaz_on, bool big_push)
coll->old.z = lara_item->pos.z;
Item_UpdateRoom(item, -10);
}

if (g_Lara.interact_target.is_moving
&& g_Lara.interact_target.move_count > LARA_PUSH_TIMEOUT) {
g_Lara.interact_target.is_moving = false;
g_Lara.gun_status = LGS_ARMLESS;
}
}
}

Expand Down

0 comments on commit 39c9822

Please sign in to comment.