Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
lara/col: fix regression in Lara_Col_Walk
Browse files Browse the repository at this point in the history
Resolves #232. Broken by 9d0c117.
  • Loading branch information
rr- committed Sep 11, 2024
1 parent a378d5d commit 6d3deb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/game/lara/lara_col.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ void __cdecl Lara_Col_Walk(ITEM_INFO *item, COLL_INFO *coll)

if (Lara_DeflectEdge(item, coll)) {
if (item->frame_num >= 29 && item->frame_num <= 47) {
item->anim_num = LA_WALK_STOP_RIGHT;
item->anim_num = LA_WALK_STOP_LEFT;
item->frame_num = g_Anims[item->anim_num].frame_base;
} else if (
(item->frame_num >= 22 && item->frame_num <= 28)
|| (item->frame_num >= 48 && item->frame_num <= 57)) {
item->anim_num = LA_WALK_STOP_LEFT;
item->anim_num = LA_WALK_STOP_RIGHT;
item->frame_num = g_Anims[item->anim_num].frame_base;
} else {
Lara_CollideStop(item, coll);
Expand All @@ -249,21 +249,21 @@ void __cdecl Lara_Col_Walk(ITEM_INFO *item, COLL_INFO *coll)

if (coll->side_mid.floor > STEP_L / 2) {
if (item->frame_num >= 28 && item->frame_num <= 45) {
item->anim_num = LA_WALK_DOWN_RIGHT;
item->anim_num = LA_WALK_DOWN_LEFT;
item->frame_num = g_Anims[item->anim_num].frame_base;
} else {
item->anim_num = LA_WALK_DOWN_LEFT;
item->anim_num = LA_WALK_DOWN_RIGHT;
item->frame_num = g_Anims[item->anim_num].frame_base;
}
}

if (coll->side_mid.floor >= -STEPUP_HEIGHT
&& coll->side_mid.floor < -STEP_L / 2) {
if (item->frame_num >= 27 && item->frame_num <= 44) {
item->anim_num = LA_WALK_UP_STEP_RIGHT;
item->anim_num = LA_WALK_UP_STEP_LEFT;
item->frame_num = g_Anims[item->anim_num].frame_base;
} else {
item->anim_num = LA_WALK_UP_STEP_LEFT;
item->anim_num = LA_WALK_UP_STEP_RIGHT;
item->frame_num = g_Anims[item->anim_num].frame_base;
}
}
Expand Down

0 comments on commit 6d3deb1

Please sign in to comment.