DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Boat.c
См. документацию.
1
3{
4 // simulation
7
8 // miscellaneous
10};
11
14{
16};
17
18class BoatOwnerState : TransportOwnerState
19{
20};
21
22class BoatMove : TransportMove
23{
24};
25
27class Boat extends Transport
28{
30 protected override event typename GetOwnerStateType()
31 {
32 return BoatOwnerState;
33 }
34
36 protected override event typename GetMoveType()
37 {
38 return BoatMove;
39 }
40
42 proto native float GetSteering();
43
45 proto native void SetSteering(float value);
46
48 proto native float GetThrottle();
49
51 proto native void SetThrottle(float value);
52
54 proto native int GetClutch();
55
57 proto native void SetClutch(float value);
58
60 proto native bool HasEngine();
61
63 proto native float EngineGetRPMMin();
64
66 proto native float EngineGetRPMIdle();
67
69 proto native float EngineGetRPMMax();
70
72 proto native float EngineGetRPMRedline();
73
75 proto native float EngineGetRPM();
76
78 proto native bool EngineIsOn();
79
81 proto native void EngineStart();
82
84 proto native void EngineStop();
85
87 proto native int GetCurrentGear();
88
90 proto native int GetGear();
91
93 proto native int GetNeutralGear();
94
96 proto native int GetGearCount();
97
99 proto native void ShiftUp();
100
102 proto native void ShiftTo(int gear);
103
105 proto native void ShiftDown();
106
109
111 proto native float PropellerGetAngularVelocity();
112
118 proto native float GetFluidCapacity(BoatFluid fluid);
119
126 proto native float GetFluidFraction(BoatFluid fluid);
127
129 proto native void Leak(BoatFluid fluid, float amount);
130
132 proto native void LeakAll(BoatFluid fluid);
133
135 proto native void Fill(BoatFluid fluid, float amount);
136
143 {
144 // engine can start by default
145 return true;
146 }
147
152
156 void OnEngineStop() {}
157
164 void OnGearChanged(int newGear, int oldGear) {}
165
174 void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue) {}
175
184 float OnSound(BoatSoundCtrl ctrl, float oldValue)
185 {
186 // just use the computed value by the game code
187 return oldValue;
188 }
189
190};
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:14
@ FUEL
Определения Boat.c:15
Определения Boat.c:23
Определения Boat.c:19
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:156
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 vector PropellerGetPosition()
Returns the propeller position in local space.
override event GetMoveType()
Определения Boat.c:36
proto native float EngineGetRPMIdle()
Returns engine's idle rpm before engine stalls.
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:184
proto native float GetFluidFraction(BoatFluid fluid)
proto native void EngineStop()
Stops the engine.
void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue)
Определения Boat.c:174
proto native float GetFluidCapacity(BoatFluid fluid)
override event GetOwnerStateType()
Определения Boat.c:30
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:164
bool OnBeforeEngineStart()
Определения Boat.c:142
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:151
proto native int GetGearCount()
Returns the number of gears.
Native class for boats - handles physics simulation.
Определения Boat.c:28
Определения EnConvert.c:106