DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Boat.c
См. документацию.
1
3{
4 // simulation
7
8 // miscellaneous
10};
11
13enum BoatFluid : ETransportFluid {}
14
15class BoatType : TransportType
16{
17};
18
19class BoatOwnerState : TransportOwnerState
20{
21};
22
23class BoatMove : TransportMove
24{
25};
26
28class Boat extends Transport
29{
31 protected override event typename GetOwnerStateType()
32 {
33 return BoatOwnerState;
34 }
35
37 protected override event typename GetMoveType()
38 {
39 return BoatMove;
40 }
41
44 {
45 vector transform[4];
46 GetTransform(transform);
47
48 float velocity = GetVelocity(this).InvMultiply3(transform)[2];
49 return velocity * 3.6;
50 }
51
54 {
56 }
57
59 proto native float GetSteering();
60
62 proto native void SetSteering(float value);
63
65 proto native float GetThrottle();
66
68 proto native void SetThrottle(float value);
69
71 proto native int GetClutch();
72
74 proto native void SetClutch(float value);
75
77 proto native bool HasEngine();
78
80 proto native float EngineGetRPMMin();
81
83 proto native float EngineGetRPMIdle();
84
86 proto native float EngineGetRPMMax();
87
89 proto native float EngineGetRPMRedline();
90
92 proto native float EngineGetRPM();
93
95 proto native bool EngineIsOn();
96
98 proto native void EngineStart();
99
101 proto native void EngineStop();
102
104 proto native int GetCurrentGear();
105
107 proto native int GetGear();
108
110 proto native int GetNeutralGear();
111
113 proto native int GetGearCount();
114
116 proto native void ShiftUp();
117
119 proto native void ShiftTo(int gear);
120
122 proto native void ShiftDown();
123
126
128 proto native float PropellerGetAngularVelocity();
129
135 proto native float GetFluidCapacity(BoatFluid fluid);
136
143 proto native float GetFluidFraction(BoatFluid fluid);
144
146 proto native void Leak(BoatFluid fluid, float amount);
147
149 proto native void LeakAll(BoatFluid fluid);
150
152 proto native void Fill(BoatFluid fluid, float amount);
153
160 {
161 // engine can start by default
162 return true;
163 }
164
169
173 void OnEngineStop() {}
174
181 void OnGearChanged(int newGear, int oldGear) {}
182
191 void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue) {}
192
201 float OnSound(BoatSoundCtrl ctrl, float oldValue)
202 {
203 // just use the computed value by the game code
204 return oldValue;
205 }
206
207};
BoatSoundCtrl
Boat's sound controller list. (native, do not change or extend)
Определения Boat.c:3
@ SPEED
speed of the boat in km/h
Определения Boat.c:6
@ ENGINE
indicates if engine is ON
Определения Boat.c:5
@ PLAYER
indicates if driver is controlled by player
Определения Boat.c:9
BoatFluid
Type of vehicle's fluid. (native, do not change or extend)
Определения Boat.c:13
float GetSpeedometer()
Returns the current speed of the vehicle in km/h.
Определения Motorbike.c:45
Определения Boat.c:24
Определения Boat.c:20
Определения EnMath.c:7
proto native bool HasEngine()
Returns if there is an engine.
proto native void Fill(BoatFluid fluid, float amount)
Adds to the specified fluid the specified amount.
proto native float PropellerGetAngularVelocity()
Returns the angular velocity of the propeller.
proto native void ShiftUp()
Shifts the future gear up, triggering gearbox simulation.
proto native int GetCurrentGear()
Returns the index of the current gear, -1 if there is no engine.
void OnEngineStop()
Определения Boat.c:173
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.
float GetSpeedometerAbsolute()
Returns the current speed of the vehicle in km/h. Value is absolute.
Определения Boat.c:53
proto native vector PropellerGetPosition()
Returns the propeller position in local space.
override event GetMoveType()
Определения Boat.c:37
proto native float EngineGetRPMIdle()
Returns engine's idle rpm before engine stalls.
float GetSpeedometer()
Returns the current speed of the vehicle in km/h.
Определения Boat.c:43
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 void SetClutch(float value)
Sets the future clutch value.
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)
Определения Boat.c:201
proto native float GetFluidFraction(BoatFluid fluid)
proto native void EngineStop()
Stops the engine.
void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue)
Определения Boat.c:191
proto native float GetFluidCapacity(BoatFluid fluid)
override event GetOwnerStateType()
Определения Boat.c:31
proto native float GetThrottle()
Returns the actual throttle value in range <0, 1>.
proto native void SetSteering(float value)
Sets the future steering value.
proto native int GetGear()
Returns the index of the future gear, -1 if there is no engine.
proto native float EngineGetRPMMax()
Returns engine's max rpm before engine blows up.
void OnGearChanged(int newGear, int oldGear)
Определения Boat.c:181
bool OnBeforeEngineStart()
Определения Boat.c:159
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>.
void OnEngineStart()
Определения Boat.c:168
proto native int GetGearCount()
Returns the number of gears.
Native class for boats - handles physics simulation.
Определения Boat.c:29
Определения Transport.c:5
proto vector InvMultiply3(vector mat[3])
Invert-transforms vector.
Определения EnConvert.c:119
static proto float AbsFloat(float f)
Returns absolute value.
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.