This version (2017/04/15 15:42) was approved by stohrendorf.
Table of Contents
State 33
State 33 (larastate) | |
---|---|
Name | Swim (stop) |
ID | 33 |
Since Engine | 1 |
Input Handling
Look Handling
Set the Camera override type to 2.
If Input is “Left”, and $Head^\measuredangle_y > −9100\,\mathrm{AU}$, decrease $Head^\measuredangle_y$ by $546\,\mathrm{AU}$.
If Input is “Right”, and $Head^\measuredangle_y < 9100\,\mathrm{AU}$, increase $Head^\measuredangle_y$ by $546\,\mathrm{AU}$.
Set $Torso^\measuredangle_y = Head^\measuredangle_y / 2$.
If Input is “Forward”, and $Head^\measuredangle_x > −7280\,\mathrm{AU}$, decrease $Head^\measuredangle_x$ by $546\,\mathrm{AU}$.
If Input is “Backward”, and $Head^\measuredangle_x < 7280\,\mathrm{AU}$, increase $Head^\measuredangle_x$ by $546\,\mathrm{AU}$.
Set $Torso^\measuredangle_x = 0\,\mathrm{AU}$.
Non-Look Handling
If Camera override type is 2, set it to 0.
- Left
- Decrease $Lara^\measuredangle_y$ by $728\,\mathrm{AU}$.
- Right
- Increase $Lara^\measuredangle_y$ by $728\,\mathrm{AU}$.
- Forward
- Set Target State to State 34.
- Backward
- Set Target State to State 47.
- Step Left
- Set Target State to State 48.
- Step Right
- Set Target State to State 49.
- Jump
- Increase Swim-to-Dive Keypress Duration; if it becomes 10 ($333\,\mathrm{ms}$):
- Use Animation 119/frame 2041.
- Set $Lara^\measuredangle_x = -8190\,\mathrm{AU}$.
- Set Fall Speed to $80$.
- Set Underwater State to “Diving”.
- Not “Jump”
- Set Swim-to-Dive Keypress Duration to 0.