Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
boat.c
Go to the documentation of this file.
1
3{
4 // simulation
7
8 // miscellaneous
10};
11
14{
16};
17
19{
20};
21
22class BoatOwnerState : TransportOwnerState
23{
24};
25
26class BoatMove : TransportMove
27{
28};
29
31class Boat extends Transport
32{
34 protected override event typename GetOwnerStateType()
35 {
36 return BoatOwnerState;
37 }
38
40 protected override event typename GetMoveType()
41 {
42 return BoatMove;
43 }
44
46 proto native float GetSteering();
47
49 proto native void SetSteering(float value);
50
52 proto native float GetThrottle();
53
55 proto native void SetThrottle(float value);
56
58 proto native int GetClutch();
59
61 proto native void SetClutch(float value);
62
64 proto native bool HasEngine();
65
67 proto native float EngineGetRPMMin();
68
70 proto native float EngineGetRPMIdle();
71
73 proto native float EngineGetRPMMax();
74
76 proto native float EngineGetRPMRedline();
77
79 proto native float EngineGetRPM();
80
82 proto native bool EngineIsOn();
83
85 proto native void EngineStart();
86
88 proto native void EngineStop();
89
91 proto native int GetCurrentGear();
92
94 proto native int GetGear();
95
97 proto native int GetNeutralGear();
98
100 proto native int GetGearCount();
101
103 proto native void ShiftUp();
104
106 proto native void ShiftTo(int gear);
107
109 proto native void ShiftDown();
110
113
115 proto native float PropellerGetAngularVelocity();
116
122 proto native float GetFluidCapacity(BoatFluid fluid);
123
130 proto native float GetFluidFraction(BoatFluid fluid);
131
133 proto native void Leak(BoatFluid fluid, float amount);
134
136 proto native void LeakAll(BoatFluid fluid);
137
139 proto native void Fill(BoatFluid fluid, float amount);
140
147 {
148 // engine can start by default
149 return true;
150 }
151
156
160 void OnEngineStop() {}
161
168 void OnGearChanged(int newGear, int oldGear) {}
169
178 void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue) {}
179
188 float OnSound(BoatSoundCtrl ctrl, float oldValue)
189 {
190 // just use the computed value by the game code
191 return oldValue;
192 }
193
194};
BoatSoundCtrl
Boat's sound controller list. (native, do not change or extend).
Definition boat.c:3
@ SPEED
speed of the boat in km/h
Definition boat.c:6
@ ENGINE
indicates if engine is ON
Definition boat.c:5
BoatFluid
Type of vehicle's fluid. (native, do not change or extend).
Definition boat.c:14
@ FUEL
Definition boat.c:15
Native class for boats - handles physics simulation.
Definition boat.c:32
proto native void ShiftTo(int gear)
Shifts the future gear to selected gear, triggering gearbox simulation.
proto native float GetFluidCapacity(BoatFluid fluid)
Returns tank capacity for the specified vehicle's fluid.
proto native float PropellerGetAngularVelocity()
Returns the angular velocity of the propeller.
proto native void SetThrottle(float value)
Sets the future throttle value.
proto native float EngineGetRPMRedline()
Returns engine's maximal working rpm without damaging the engine.
proto native int GetCurrentGear()
Returns the index of the current gear, -1 if there is no engine.
proto native float GetSteering()
Returns the actual steering value in range <-1, 1>.
proto native int GetClutch()
Returns the value of how much the clutch is disengaged.
proto native vector PropellerGetPosition()
Returns the propeller position in local space.
proto native int GetGearCount()
Returns the number of gears.
proto native void Fill(BoatFluid fluid, float amount)
Adds to the specified fluid the specified amount.
proto native void SetClutch(float value)
Sets the future clutch value.
proto native void Leak(BoatFluid fluid, float amount)
Removes from the specified fluid the specified amount.
proto native float GetThrottle()
Returns the actual throttle value in range <0, 1>.
proto native int GetNeutralGear()
Returns the index of the neutral gear.
proto native void EngineStop()
Stops the engine.
proto native float GetFluidFraction(BoatFluid fluid)
Returns fraction value (in range <0, 1>) of the current state of the specified vehicle's fluid.
void OnGearChanged(int newGear, int oldGear)
Is called every time when the simulation changed gear.
Definition boat.c:168
override event GetOwnerStateType()
Definition boat.c:34
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
proto native float EngineGetRPMIdle()
Returns engine's idle rpm before engine stalls.
proto native bool HasEngine()
Returns if there is an engine.
proto native void LeakAll(BoatFluid fluid)
Removes all the specified fluid from vehicle.
proto native void ShiftDown()
Shifts the future gear down, triggering gearbox simulation.
proto native void ShiftUp()
Shifts the future gear up, triggering gearbox simulation.
void OnFluidChanged(BoatFluid fluid, float newValue, float oldValue)
Is called every time when the specified vehicle's fluid level changes.
Definition boat.c:178
bool OnBeforeEngineStart()
Is called every time the game wants to start the engine.
Definition boat.c:146
proto native void EngineStart()
Starts the engine.
proto native float EngineGetRPM()
Returns engine's rpm value.
void OnEngineStart()
Is called every time the engine starts.
Definition boat.c:155
proto native float EngineGetRPMMin()
Returns engine's min operating rpm.
proto native void SetSteering(float value)
Sets the future steering value.
override event GetMoveType()
Definition boat.c:40
void OnEngineStop()
Is called every time the engine stops.
Definition boat.c:160
proto native int GetGear()
Returns the index of the future gear, -1 if there is no engine.
float OnSound(BoatSoundCtrl ctrl, float oldValue)
Is called every sound simulation step.
Definition boat.c:188
proto native float EngineGetRPMMax()
Returns engine's max rpm before engine blows up.
Base native class of all vehicles in game.
Definition transport.c:5
< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Welcome to the DayZ Stress Test Branch</h >< h scale="0.6"> This branch serves for time limited development tests that are open to the community Our goal in each of these tests is to gather performance and stability data from servers under heavy load</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Stress test Schedule</h >< h scale="0.6"> We ll only run the Stress Tests when our development team needs data and or specific feedback Stress Tests will be announced on our Twitter and and will usually run for a couple of hours</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Current Stress Test</h >< h scale="0.6"> In the first bunch of Stress we ll mostly focus on watching server performance under heavy PvP gameplay load For detailed information about an ongoing Stress please visit dayz com dev hub</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Important Note</h >< h scale="0.6"> Stress Tests do not represent a typical DayZ gameplay experience Spawn starting gear
Definition news_feed.txt:26