13 {
14 if (
GetUApi().GetInputByID(UACarShiftGearUp).LocalPress())
16 if (
GetUApi().GetInputByID(UACarShiftGearDown).LocalPress())
18
20 if (
GetUApi().GetInputByID(UATurbo).LocalValue())
21 speed *= 2;
22
25
26 vector direction = GetDirection();
27 vector directionAside = vector.Up * direction;
28
30 vector forwardChange = forward * timeSlice * direction * speed;
31 vector strafeChange = strafe * timeSlice * directionAside * speed;
32 vector newPos = oldPos + forwardChange + strafeChange;
34 if (newPos[1] < yMin)
35 newPos[1] = yMin;
36
38
42 vector newOrient = oldOrient;
43 newOrient[0] = newOrient[0] - Math.RAD2DEG * yawDiff * timeSlice;
44 newOrient[1] = newOrient[1] - Math.RAD2DEG * pitchDiff * timeSlice;
45 if (newOrient[1] < -89)
46 newOrient[1] = -89;
47 if (newOrient[1] > 89)
48 newOrient[1] = 89;
49
50 SetOrientation(newOrient);
51
53 {
56 }
57
59 }
proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)
proto native void UpdateSpectatorPosition(vector position)
Updates spectator position on server = position of network bubble.
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
class JsonUndergroundAreaTriggerData GetPosition