Skip to content

Commit

Permalink
gun: fix early hiding of pistol meshes
Browse files Browse the repository at this point in the history
Resolves #1449.
  • Loading branch information
rr- committed Aug 23, 2024
1 parent 84cc44d commit 8f75872
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## [Unreleased](https://github.com/LostArtefacts/TR1X/compare/stable...develop) - ××××-××-××
- fixed holstering pistols hiding the gun meshes 1 frame too early (#1449, regression from 0.6)
- improved logs module names readability
- improved crash debug information on Windows

Expand Down
12 changes: 6 additions & 6 deletions src/game/gun/gun_pistols.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ void Gun_Pistols_Undraw(const LARA_GUN_TYPE weapon_type)
g_Lara.left_arm.rot.y = 0;
g_Lara.left_arm.rot.z = 0;
anil = LF_G_DRAW_END;
} else if (Anim_TestAbsFrameEqual(anil, LF_G_DRAW_START)) {
Gun_Pistols_UndrawMeshLeft(weapon_type);
anil--;
} else if (Anim_TestAbsFrameRange(anil, LF_G_UNDRAW_BEND, LF_G_DRAW_END)) {
anil--;
if (Anim_TestAbsFrameEqual(anil, LF_G_DRAW_START)) {
Gun_Pistols_UndrawMeshLeft(weapon_type);
}
}
g_Lara.left_arm.frame_number = anil;

Expand All @@ -64,11 +64,11 @@ void Gun_Pistols_Undraw(const LARA_GUN_TYPE weapon_type)
g_Lara.right_arm.rot.y = 0;
g_Lara.right_arm.rot.z = 0;
anir = LF_G_DRAW_END;
} else if (Anim_TestAbsFrameEqual(anir, LF_G_DRAW_START)) {
Gun_Pistols_UndrawMeshRight(weapon_type);
anir--;
} else if (Anim_TestAbsFrameRange(anir, LF_G_UNDRAW_BEND, LF_G_DRAW_END)) {
anir--;
if (Anim_TestAbsFrameEqual(anir, LF_G_DRAW_START)) {
Gun_Pistols_UndrawMeshRight(weapon_type);
}
}
g_Lara.right_arm.frame_number = anir;

Expand Down

0 comments on commit 8f75872

Please sign in to comment.