DayZ 1.24
|
Base native class for all motorized wheeled vehicles. More...
Private Member Functions | |
proto native CarController | GetController () |
DEPRECATED, left for backwards compatibility, the methods of this class are now directly accessible on Car itself. | |
proto native float | GetSpeedometer () |
Returns the current speed of the vehicle in km/h. | |
float | GetSpeedometerAbsolute () |
Returns the current speed of the vehicle in km/h. Value is absolute. | |
override bool | IsAreaAtDoorFree (int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7) |
override Shape | DebugFreeAreaAtDoor (int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7) |
override int | GetHideIconMask () |
proto native float | GetSteering () |
Returns the current steering value in range <-1, 1>. | |
proto native void | SetSteering (float in, bool analog=false) |
proto native float | GetThrustTurbo () |
Returns the current thrust turbo modifier value in range <0, 1>. | |
proto native float | GetThrustGentle () |
Returns the current thrust gentle modifier value in range <0, 1>. | |
proto native float | GetThrust () |
Returns the current thrust value in range <0, 1>. | |
proto native void | SetThrust (float in, float gentle=0, float turbo=0) |
proto native float | GetBrake () |
Returns the current brake value in range <0, 1>. | |
proto native void | SetBrake (float in, float panic=0, bool gentle=false) |
proto native float | GetHandbrake () |
Returns the current handbrake value in range <0, 1>. | |
proto native void | SetHandbrake (float in) |
proto native void | SetBrakesActivateWithoutDriver (bool activate=true) |
proto native float | GetClutch () |
Returns the current clutch value in range <0, 1>. | |
proto native void | SetClutchState (bool in) |
proto native int | GetGear () |
Returns index of the current gear. | |
proto native void | ShiftUp () |
proto native void | ShiftTo (CarGear gear) |
proto native void | ShiftDown () |
proto native float | GetFluidCapacity (CarFluid fluid) |
proto native float | GetFluidFraction (CarFluid fluid) |
proto native void | Leak (CarFluid fluid, float amount) |
Removes from the specified fluid the specified amount. | |
proto native void | LeakAll (CarFluid fluid) |
Removes all the specified fluid from vehicle. | |
proto native void | Fill (CarFluid fluid, float amount) |
Adds to the specified fluid the specified amount. | |
void | OnFluidChanged (CarFluid fluid, float newValue, float oldValue) |
proto native float | EngineGetRPMMin () |
Returns engine's min operating rpm. | |
proto native float | EngineGetRPMIdle () |
Returns engine's idle rpm before engine stalls. | |
proto native float | EngineGetRPMMax () |
Returns engine's max rpm before engine blows up. | |
proto native float | EngineGetRPMRedline () |
Returns engine's maximal working rpm without damaging the engine. | |
proto native float | EngineGetRPM () |
Returns engine's rpm value. | |
proto native bool | EngineIsOn () |
Returns true when engine is running, false otherwise. | |
proto native void | EngineStart () |
Starts the engine. | |
bool | OnBeforeEngineStart () |
void | OnEngineStart () |
Is called every time the engine starts. | |
proto native void | EngineStop () |
Stops the engine. | |
void | OnEngineStop () |
Is called every time the engine stops. | |
proto native vector | GetEnginePos () |
Get actual position of engine (model space) | |
proto native void | SetEnginePos (vector pos) |
Override the position of engine (model space) | |
proto native int | GetGearsCount () |
Returns total number of gears. | |
proto native CarGearboxType | GearboxGetType () |
Returns gearbox type. See CarGearboxType enum for more info. | |
proto native CarAutomaticGearboxMode | GearboxGetMode () |
Returns gearbox mode. This is useful when car has automatic gearbox. | |
void | OnGearChanged (int newGear, int oldGear) |
proto native bool | WheelIsAnyLocked () |
Returns true if any of the wheels are locked in terms of its movement. | |
proto native bool | WheelIsLocked (int wheelIdx) |
proto native int | WheelCount () |
How many wheel can be attached to a car (hubs only) | |
proto native int | WheelCountPresent () |
Number of actually attached wheels (hubs only) | |
void | OnContact (string zoneName, vector localPos, IEntity other, Contact data) |
float | OnSound (CarSoundCtrl ctrl, float oldValue) |
void | OnInput (float dt) |
void | OnUpdate (float dt) |
proto native void | ForcePosition (vector pos) |
proto native void | ForceDirection (vector dir) |
Base native class for all motorized wheeled vehicles.
Base native class for helicopter.
|
inlineprivate |
Definition at line 107 of file Car.c.
References ARGB(), Debug::DrawBox(), and Shape.
Returns engine's idle rpm before engine stalls.
Returns engine's max rpm before engine blows up.
Returns engine's maximal working rpm without damaging the engine.
Returns true when engine is running, false otherwise.
Adds to the specified fluid the specified amount.
|
private |
Returns gearbox mode. This is useful when car has automatic gearbox.
|
private |
Returns gearbox type. See CarGearboxType enum for more info.
Returns the current clutch value in range <0, 1>.
|
private |
DEPRECATED, left for backwards compatibility, the methods of this class are now directly accessible on Car itself.
Returns tank capacity for the specified vehicle's fluid.
fluid | the specified fluid type |
Returns fraction value (in range <0, 1>) of the current state of the specified vehicle's fluid.
[in] | fluid | the specified fluid type |
Returns the current handbrake value in range <0, 1>.
Returns the current speed of the vehicle in km/h.
|
inlineprivate |
Returns the current speed of the vehicle in km/h. Value is absolute.
Definition at line 83 of file Car.c.
References Math::AbsFloat().
Returns the current steering value in range <-1, 1>.
Returns the current thrust value in range <0, 1>.
Returns the current thrust gentle modifier value in range <0, 1>.
Returns the current thrust turbo modifier value in range <0, 1>.
|
inlineprivate |
Definition at line 88 of file Car.c.
Referenced by EntityAI::DebugFreeAreaAtDoor(), and EntityAI::IsAreaAtDoorFree().
Removes from the specified fluid the specified amount.
Removes all the specified fluid from vehicle.
|
inlineprivate |
|
inlineprivate |
Is called every time when vehicle collides with other object.
[in] | zoneName | configured vehicle's zone that was hit |
[in] | localPos | position where the vehicle was hit in vehicle's space |
[in] | other | object with which the vehicle is colliding |
[in] | data | contact properties |
Definition at line 353 of file Car.c.
|
inlineprivate |
|
inlineprivate |
Is called after every input simulation step.
Note that the player character and other systems can always change the internal state. It is highly recommended to store state of custom inputs elsewhere and call Setters here.
[in] | dt | frame time in seconds |
Definition at line 377 of file Car.c.
|
inlineprivate |
Is called every sound simulation step. In this callback, user can modify behaviour of sound controllers.
[in] | ctrl | sound controller identifier, |
[in] | oldValue | already computed value by the game code |
Sets the brake value.
in | should be in range <0, 1> |
panic | should be in range <0, 1> |
Sets if brakes should activate without a driver present
Override the position of engine (model space)
Sets the handbrake value.
in | should be in range <0, 1> |
Sets the steering value.
in | should be in range <-1, 1> |
analog | indicates if the input value was taken from analog controller |
Sets the thrust value.
in | should be in range <0, 1> |
gentle | should be in range <0, 1>, thrust modifier |
turbo | should be in range <0, 1>, thrust modifier |
How many wheel can be attached to a car (hubs only)
Number of actually attached wheels (hubs only)
Returns true if any of the wheels are locked in terms of its movement.
Returns true if given wheel is locked in terms of its movement.
[in] | wheelIdx | index of the wheel, they are counted from left-front to rear-right |