lara: fix regression in Lara_InitialiseMeshes

Resolves #125.
This commit is contained in:
Marcin Kurczewski 2024-08-05 20:16:30 +02:00
parent 61bfc9cfaa
commit 306a99091e
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A

View File

@ -911,23 +911,27 @@ void __cdecl Lara_InitialiseMeshes(const int32_t level_num)
const START_INFO *const start = &g_SaveGame.start[level_num];
GAME_OBJECT_ID holster_obj_num = NO_OBJECT;
if (start->gun_type != LGT_UNARMED) {
GAME_OBJECT_ID gun_obj = O_LARA_PISTOLS;
if (start->gun_type == LGT_MAGNUMS) {
gun_obj = O_LARA_MAGNUMS;
holster_obj_num = O_LARA_MAGNUMS;
} else if (start->gun_type == LGT_UZIS) {
gun_obj = O_LARA_UZIS;
holster_obj_num = O_LARA_UZIS;
} else {
holster_obj_num = O_LARA_PISTOLS;
}
}
if (holster_obj_num != NO_OBJECT) {
g_Lara.mesh_ptrs[LM_THIGH_L] =
g_Lara.mesh_ptrs[g_Objects[gun_obj].mesh_idx + LM_THIGH_L];
g_Meshes[g_Objects[holster_obj_num].mesh_idx + LM_THIGH_L];
g_Lara.mesh_ptrs[LM_THIGH_R] =
g_Lara.mesh_ptrs[g_Objects[gun_obj].mesh_idx + LM_THIGH_R];
g_Meshes[g_Objects[holster_obj_num].mesh_idx + LM_THIGH_R];
}
if (start->gun_type == LGT_FLARE) {
g_Lara.mesh_ptrs[LM_HAND_L] =
g_Lara.mesh_ptrs[g_Objects[O_LARA_FLARE].mesh_idx + LM_HAND_L];
g_Meshes[g_Objects[O_LARA_FLARE].mesh_idx + LM_HAND_L];
}
switch (start->gun_type) {