tr2/objects/springboard: handle skidoo interaction

This updates the springboard to deal with the scenario when Lara
crosses one on a skidoo. The skidoo will now be thrown into the air
(along with Lara) rather than Lara falling indefinitely.

Resolves #1903.
This commit is contained in:
lahm86 2025-04-17 13:03:53 +01:00
parent e424ad8a11
commit 45b64cbb97
3 changed files with 24 additions and 10 deletions

View file

@ -25,6 +25,7 @@
- fixed Lara's hips appearing on Bartoli in the Temple of Xian cutscene (#2558)
- fixed collision issues with drawbridges, trapdoors, and bridges when stacked over each other, over slopes, and near the ground (#2752)
- fixed the lift to work in any cardinal direction in custom levels, not just South (#2100)
- fixed the springboard not responding correctly when Lara drives across one on a skidoo (#1903)
- fixed the drawbridge producing dynamic light when open (#2294)
- fixed the scale of several pickup models in The Golden Mask (#2652)
- fixed the shark in The Cold War not making any sounds when biting Lara (#2678)

View file

@ -316,6 +316,7 @@ as Notepad.
- added per-level customizable fog distance
- added the ability for spike walls to be reset (antitriggered)
- fixed the lift to work in any cardinal direction in custom levels, not just South
- fixed the springboard not responding correctly when Lara drives across one on a skidoo
- removed the hard-coded end-level behaviour of the bird guardian for custom levels
#### Miscellaneous

View file

@ -35,17 +35,29 @@ static void M_Control(const int16_t item_num)
return;
}
if (lara_item->current_anim_state == LS_BACK
|| lara_item->current_anim_state == LS_FAST_BACK) {
lara_item->speed = -lara_item->speed;
const LARA_INFO *const lara = Lara_GetLaraInfo();
if (lara->skidoo != NO_ITEM) {
ITEM *const skidoo = Item_Get(lara->skidoo);
if (skidoo->object_id != O_SKIDOO_FAST
&& skidoo->object_id != O_SKIDOO_ARMED) {
return;
}
skidoo->fall_speed = -200;
skidoo->pos.y -= STEP_L;
} else {
if (lara_item->current_anim_state == LS_BACK
|| lara_item->current_anim_state == LS_FAST_BACK) {
lara_item->speed = -lara_item->speed;
}
lara_item->fall_speed = -240;
lara_item->gravity = 1;
Item_SwitchToAnim(lara_item, LA_FALL_START, 0);
lara_item->current_anim_state = LS_JUMP_FORWARD;
lara_item->goal_anim_state = LS_JUMP_FORWARD;
}
lara_item->fall_speed = -240;
lara_item->gravity = 1;
Item_SwitchToAnim(lara_item, LA_FALL_START, 0);
lara_item->current_anim_state = LS_JUMP_FORWARD;
lara_item->goal_anim_state = LS_JUMP_FORWARD;
item->goal_anim_state = SPRINGBOARD_STATE_ON;
}