mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
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:
parent
e424ad8a11
commit
45b64cbb97
3 changed files with 24 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue