25class MotorbikeMove : TransportMove
48 GetTransform(transform);
51 return velocity * 3.6;
65 override bool IsAreaAtDoorFree(
int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
70 override Shape DebugFreeAreaAtDoor(
int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
85 for (
int wheelIdx = 0; wheelIdx < wheelCount; wheelIdx++)
@ SPEED
speed of the boat in km/h
@ ENGINE
indicates if engine is ON
@ PLAYER
indicates if driver is controlled by player
CarAutomaticGearboxMode
Enumerated automatic gearbox modes. (native, do not change or extend)
CarWheelWaterState
Enumerated car wheel water state. (native, do not change or extend)
CarGearboxType
Enumerated gearbox types. (native, do not change or extend)
MotorbikeFluid
Type of vehicle's fluid. (native, do not change or extend)
proto native float GetKickstand()
Returns the current kickstand value in range <0, 1>.
proto native void PickUp()
Picks the bike back up when it is fallen over.
proto native void SetKickstand(float value)
Sets the future kickstand value.
proto native bool CanPickUp()
Query if the motorbike can be picked back up.
MotorbikeSoundCtrl
Motorbike's sound controller list. (native, do not change or extend)
proto native bool FallOver()
Forcibly topple over the motorbike, ejects the player.
proto native bool IsFallen()
Returns if the bike is fallen over.
enum MotorbikeHeadlightState MotorbikeOwnerState
proto native vector WheelGetPositionLS(int wheelIdx)
proto native float GetHandbrake()
Returns the current handbrake value in range <0, 1>.
proto native void Fill(BoatFluid fluid, float amount)
Adds to the specified fluid the specified amount.
proto native vector WheelGetContactNormal(int wheelIdx)
proto native void ShiftUp()
Shifts the future gear up, triggering gearbox simulation.
proto native bool WheelHasContact(int wheelIdx)
proto native void SetEnginePos(vector pos)
Override the position of engine (model space)
proto native int GetCurrentGear()
Returns the index of the current gear, -1 if there is no engine.
proto native void Leak(BoatFluid fluid, float amount)
Removes from the specified fluid the specified amount.
proto native float EngineGetRPM()
Returns engine's rpm value.
proto native void ShiftDown()
Shifts the future gear down, triggering gearbox simulation.
proto native float WheelGetAngularVelocity(int wheelIdx)
proto native CarWheelWaterState WheelGetWaterState(int wheelIdx)
float GetSpeedometerAbsolute()
Returns the current speed of the vehicle in km/h. Value is absolute.
override event GetMoveType()
proto native float EngineGetRPMIdle()
Returns engine's idle rpm before engine stalls.
float GetSpeedometer()
Returns the current speed of the vehicle in km/h.
proto native int WheelCountPresent()
Number of actually attached wheels (hubs only)
proto native void LeakAll(BoatFluid fluid)
Removes all the specified fluid from vehicle.
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
proto native int GetClutch()
Returns the value of how much the clutch is disengaged.
proto native int GetNeutralGear()
Returns the index of the neutral gear.
proto native void SetThrottle(float value)
Sets the future throttle value.
proto native EntityAI WheelGetEntity(int wheelIdx)
proto native void SetClutch(float value)
Sets the future clutch value.
proto native CarAutomaticGearboxMode GearboxGetMode()
Returns gearbox mode. This is useful when car has automatic gearbox.
proto native int WheelCount()
How many wheel can be attached to a car (hubs only)
proto native void EngineStart()
Starts the engine.
proto native void ShiftTo(int gear)
Shifts the future gear to selected gear, triggering gearbox simulation.
proto native float EngineGetRPMMin()
Returns engine's min operating rpm.
float OnSound(BoatSoundCtrl ctrl, float oldValue)
proto native bool WheelIsAnyLocked()
Returns true if any of the wheels are locked in terms of its movement.
proto native float GetFluidFraction(BoatFluid fluid)
proto native void EngineStop()
Stops the engine.
void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue)
proto native float GetFluidCapacity(BoatFluid fluid)
override event GetOwnerStateType()
proto native float GetThrottle()
Returns the actual throttle value in range <0, 1>.
proto native float GetBrake()
Returns the current brake value in range <0, 1>.
proto native void SetSteering(float value)
Sets the future steering value.
proto native vector WheelGetDirection(int wheelIdx)
proto native bool WheelIsLocked(int wheelIdx)
override bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
proto native vector WheelGetContactPosition(int wheelIdx)
proto native SurfaceInfo WheelGetSurface(int wheelIdx)
proto native int GetGear()
Returns the index of the future gear, -1 if there is no engine.
proto native CarGearboxType GearboxGetType()
Returns gearbox type. See CarGearboxType enum for more info.
proto native void SetHandbrake(float value)
Sets the future handbrake value.
bool DetectFlippedUsingWheels(VehicleFlippedContext ctx, bool disallowSide)
proto native float EngineGetRPMMax()
Returns engine's max rpm before engine blows up.
void OnGearChanged(int newGear, int oldGear)
override Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
bool OnBeforeEngineStart()
proto native float EngineGetRPMRedline()
Returns engine's maximal working rpm without damaging the engine.
proto native float GetSteering()
Returns the actual steering value in range <-1, 1>.
proto native vector GetEnginePos()
Get actual position of engine (model space)
proto native int GetGearCount()
Returns the number of gears.
proto native void SetBrake(float value, float unused0=0, bool unused1=false)
Sets the future brake value.
Native class for boats - handles physics simulation.
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
proto vector InvMultiply3(vector mat[3])
Invert-transforms vector.
static proto float AbsFloat(float f)
Returns absolute value.
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.