28 if (speed > m_SpeedFast)
30 else if (speed > m_SpeedMedium)
32 else if (speed > m_SpeedSlow)
37 if (m_SpeedState == speedStatePast)
49 else if (i == 9 || i == 10)
56 else if (i < 5 || i == 7 || i == 8)
66 override void Update(
float timeSlice = 0)
68 if (m_Boat.GetCurrentGear() == 0)
80 super.Update(timeSlice);
86 float speed = velocity.Normalize() * 3.6;
91 lerp1 =
Math.InverseLerp(0, m_SpeedFast, speed);
92 lerp2 =
Math.InverseLerp(m_SpeedMedium - 5, m_SpeedFast + 10, speed);
96 if (i == 11 || i == 12)
100 else if (i < 5 || i == 7 || i == 8)
104 if (
GetGame().GetWaterDepth(m_Boat.CoordToParent(m_MemPointPos)) < -0.1)
166 override void Update(
float timeSlice = 0)
168 if (
m_Boat.GetCurrentGear() == 0)
180 super.Update(timeSlice);
183 float speed =
m_Boat.PropellerGetAngularVelocity();
190 if (i < EMITORS_FAST && m_SpeedState >
EBoatSpeed.SLOW)
217 if (speed > m_SpeedFast)
219 else if (speed > m_SpeedMedium)
221 else if (speed > m_SpeedSlow)
226 if (m_SpeedState == speedStatePast)
241 override void Update(
float timeSlice = 0)
243 super.Update(timeSlice);
248 float speed = velocity.Normalize() * 3.6;
253 float lerp =
Math.InverseLerp(0, m_SpeedFast, speed);
273 const float POS_UPDATE_THROTTLE = 0.2;
289 super.AttachTo(obj, local_pos, local_ori, force_rotation_to_world);
311 ptc.SetParameter(
id,
EmitorParam.BIRTH_RATE_RND, ptc.GetParameterOriginal(
id,
EmitorParam.BIRTH_RATE_RND));
316 ptc.SetParameter(
id,
EmitorParam.BIRTH_RATE_RND, 0);
344 posAdjusted =
m_Boat.CoordToLocal(posAdjusted);
void EffectBoatWaterFront()
void EffectBoatWaterSide()
enum EBoatSpeed EMITORS_FAST
proto native float SurfaceGetSeaLevel()
void UpdateSpeedState(Particle ptc, float speed)
void EffectBoatWaterBack()
override void Update(float timeSlice=0)
void UpdatePosToSeaLevel(float timeSlice=0, float surfaceOffset=0)
void UpdateSpeedState(Particle ptc, float speed)
void EnableEmitor(Particle ptc, int id, bool enable)
void SetParticleState(int state)
void Update(float timeSlice=0)
override void AttachTo(Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_to_world=false)
Wrapper class for managing particles through SEffectManager.
override void Stop()
Stops all elements this effect consists of.
Particle GetParticle()
Gets the main particle which this Effect is managing.
override void Start()
Plays all elements this effect consists of.
void SetParticleID(int id)
Sets the id of the particle to be used.
override void SetCurrentLocalPosition(vector pos, bool updateCached=true)
Set the current local position of the managed Particle.
Legacy way of using particles in the game.
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
vector GetLocalPosition()
Get the local position of the Effect.
proto native CGame GetGame()
proto native vector dBodyGetVelocityAt(notnull IEntity body, vector globalpos)