7enum MotorbikeRearLightType
15enum EMotorbikeOperationalState
32enum EMotorbikeDebugMode
98 EMotorbikeDebugMode m_DebugMode;
100 private const int DEBUG_MESSAGE_CLEAN_TIME_SECONDS = 10;
101 private float m_DebugMessageCleanTime;
102 private string m_DebugContactDamageMessage;
107 #ifdef DIAG_DEVELOPER
143 RegisterNetSyncVariableBool(
"m_BrakesArePressed");
144 RegisterNetSyncVariableBoolSignal(
"m_PlayCrashSoundLight");
145 RegisterNetSyncVariableBoolSignal(
"m_PlayCrashSoundHeavy");
176 if (
g_Game.IsDedicatedServer())
190 exhaustDirection[0] = -tempOri[2];
191 exhaustDirection[1] = tempOri[1];
192 exhaustDirection[2] = tempOri[0];
197 exhaustDirection =
"1 1 1";
219 super.OnDriverExit(player);
227 if (!super.CanGetIn())
235 super.OnStabilityStart();
240 super.OnStabilityStop();
253 override void FillScript(ETransportFluid fluidType,
float amount)
255 Fill(fluidType, amount);
268 if (!m_EngineStarted)
282 string selectionName = GetSelectionFromAnimSource(animSource);
283 if (selectionName !=
"")
285 position = GetSelectionBasePositionLS(selectionName);
287 int level = GetViewGeometryLevel();
292 GetBonePivotsForAnimationSource(level, animSource, pivots);
296 pivotIndex = pivots[0];
305 sound.SetPosition(ModelToWorld(
position));
318 return "VehicleTypeMotorbike";
344 if (!m_InputActionMap)
383 typename ai = action.GetInputType();
400 Debug.
ActionLog(action.ToString() +
" -> " + ai,
this.ToString() ,
"n/a",
"Add action" );
403 actionArray.Insert(action);
409 ActionBase action = player.GetActionManager().GetAction(actionName);
410 typename ai = action.GetInputType();
415 actionArray.RemoveItem(action);
421 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
482 if (pSeatSelection.
Length() > 0)
484 if (MemoryPointExists(pSeatSelection))
486 vector conditionPointMS = GetMemoryPointPos(pSeatSelection);
487 vector conditionPointWS = ModelToWorld(conditionPointMS);
490 conditionPointWS[1] = 0;
508 super.OnVariablesSynchronized();
510 if (GetCrashHeavySound())
511 PlayCrashHeavySound();
512 else if (GetCrashLightSound())
513 PlayCrashLightSound();
525 super.EEItemAttached(item, slot_name);
529 case "Reflector_1_1":
532 SetHealth(
"Reflector_1_1",
"Health", item.GetHealth());
563 super.EEItemDetached(item, slot_name);
606 super.OnAttachmentRuined(attachment);
614 if (!
g_Game.IsDedicatedServer())
617 ParticleParamsOverrideData particleParamsData;
624 particleParamsData.m_FloatModifiers.InsertAt(motorbikeSpeed, 0);
631 if (!
g_Game.IsDedicatedServer())
641 if (particleParamsData)
643 particleParamsData.ClearAll();
645 particleParamsData.m_FloatModifiers.InsertAt(motorbikeSpeed, 0);
646 particleParamsData.m_FloatModifiers.InsertAt(
GetWeightCoef(), 1);
658 for (i = 0; i < wheelCount; ++i)
659 wheelsPosition.InsertAt(
Vector(-1, -1, -1), i);
661 for (i = 0; i < wheelCount; ++i)
668 if (
m_VFXComponent.CanPlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE))
674 wheelPos = WorldToModel(wheelPos);
675 wheelsPosition.Set(i, wheelPos);
682 transform[0] = transform[2] * transform[1];
686 float bodySpeed = wheelVel[2];
688 bool applyWheelSmokeEffect =
false;
690 if ((wheelSpeed > 0 && bodySpeed > 0) || (wheelSpeed < 0 && bodySpeed < 0))
695 if (applyWheelSmokeEffect)
697 m_VFXComponent.SetEffectGroupPositions(EVehicleVFXEffectGroup.WHEEL_SMOKE, wheelsPosition);
698 m_VFXComponent.PlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE);
701 m_VFXComponent.StopEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE);
707 wheelsPosition.Set(i, wheelPos);
711 if (
m_VFXComponent.CanPlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT))
714 if (wheel && applyWheelContactEffect)
716 particleParamsData =
m_VFXComponent.GetEffectGroupParticleParamsOverrideData(EVehicleVFXEffectGroup.WHEEL_CONTACT);
717 if (particleParamsData)
719 particleParamsData.m_FloatModifiers.InsertAt(motorbikeSpeed, 0);
720 particleParamsData.m_FloatModifiers.InsertAt(
GetWeightCoef(), 1);
723 m_VFXComponent.SetEffectGroupPositions(EVehicleVFXEffectGroup.WHEEL_CONTACT, wheelsPosition);
725 m_VFXComponent.PlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT);
729 m_VFXComponent.StopEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT);
745 #ifdef DIAG_DEVELOPER
746 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.CONTACT)
750 Debug.
Log(
"Momentum delta: " + (GetMomentum() - m_MomentumPrevTick));
751 Debug.
Log(
"--------------------------------------------------------------------");
752 m_ContactCalled =
false;
760 m_MomentumPrevTick = GetMomentum();
761 #ifdef DIAG_DEVELOPER
762 m_DebugMessageCleanTime += timeSlice;
763 if (m_DebugMessageCleanTime >= DEBUG_MESSAGE_CLEAN_TIME_SECONDS)
765 m_DebugMessageCleanTime = 0;
766 m_DebugContactDamageMessage =
"";
791 AddHealth(
"Engine",
"Health", -GetMaxHealth(
"Engine",
"") * 0.05 );
796 SetEngineZoneReceivedHit(
true);
799 SetEngineZoneReceivedHit(
false);
804 CheckVitalItemCallback(
IsVitalSparkPlug(), SparkPlug.SLOT_ID,
this,
"EngineStop");
816 if (IsVitalFuelTank())
842 if (m_DebugMode == EMotorbikeDebugMode.NONE)
863 float thrustWanted = 0.0;
864 float steeringWanted = 0.0;
866 bool attemptSpeed =
false;
867 float speedWanted = 0;
871 case EMotorbikeDebugMode.FORWARD_10:
875 case EMotorbikeDebugMode.FORWARD_50:
888 bool isReverse =
GetGear() == CarGear.REVERSE;
896 if (thrustWantedAbs > 0.1)
901 else if (
GetGear() > CarGear.FIRST && thrustWantedAbs < 0.1)
905 else if (
GetGear() < CarGear.FIRST || (thrustWanted > 0.0 && speed < 5.0))
921 Human driver = CrewDriver();
925 if (driver.IsAlive())
950 if (waterDepth > 0.0)
953 if (IsAnyCrewPresent(crewPresenceIndices))
957 int crewCount = crewPresenceIndices.Count();
958 for (
int crewPositionIndex = 0; crewPositionIndex < crewCount; ++crewPositionIndex)
959 CrewMember(crewPositionIndex).GetCommand_Vehicle().GetOutVehicle();
969 SetEngineZoneReceivedHit(
true);
1008 if (
g_Game.IsServer() && battery)
1032 if (
g_Game.IsServer() && battery)
1033 UpdateBattery(battery);
1045 SetEngineZoneReceivedHit(
false);
1057 EntityAI bulb = FindAttachmentBySlotName(
"Reflector_1_1");
1059 if (bulb && !bulb.IsRuined())
1061 else if ((!bulb || bulb.IsRuined()))
1104 switch (m_HeadlightsState)
1107 int driveWheelIndex = GetBoneIndex(
"drivewheel");
1127 m_RearLightType = MotorbikeRearLightType.BRAKES_ONLY;
1129 m_RearLightType = MotorbikeRearLightType.NONE;
1136 if (
EngineIsOn() || m_RearLightType == MotorbikeRearLightType.BRAKES_ONLY)
1141 #ifdef DIAG_DEVELOPER
1151 switch (m_RearLightType)
1153 case MotorbikeRearLightType.BRAKES_ONLY:
1188 switch (m_HeadlightsState)
1213 m_RearLightType = MotorbikeRearLightType.BRAKES_ONLY;
1215 m_RearLightType = MotorbikeRearLightType.NONE;
1222 if (m_RearLightType != MotorbikeRearLightType.NONE && m_HeadlightsState != CarHeadlightBulbsState.NONE)
1224 switch (m_RearLightType)
1226 case MotorbikeRearLightType.BRAKES_ONLY:
1245 int engineHealthLevel = GetHealthLevel(
"Engine");
1246 m_EngineHealth = GetHealthLevelValue(engineHealthLevel,
"Engine");
1248 int fuelTankHealthLevel = GetHealthLevel(
"FuelTank");
1254 int contactZonesCount = m_ContactCache.Count();
1255 if (contactZonesCount == 0)
1258 for (
int i = 0; i < contactZonesCount; ++i)
1260 string zoneName = m_ContactCache.GetKey(i);
1263 float dmg =
Math.
AbsInt(data[0].m_Impulse * m_VehicleContactDamageCoef);
1264 float crewDmgBase =
Math.
AbsInt((data[0].m_Impulse /
dBodyGetMass(
this)) * 500 * m_CrewContactDamageCoef);
1266 #ifdef DIAG_DEVELOPER
1267 CrashDebugData.m_CrashDataPoint =
new CrashDebugData();
1268 CrashDebugData.m_CrashDataPoint.m_VehicleType =
GetDisplayName();
1269 CrashDebugData.m_CrashDataPoint.m_Damage = dmg;
1270 CrashDebugData.m_CrashDataPoint.m_Zone = zoneName;
1271 CrashDebugData.m_CrashDataPoint.m_MomentumCurr = GetMomentum();
1272 CrashDebugData.m_CrashDataPoint.m_MomentumPrev = m_MomentumPrevTick;
1273 CrashDebugData.m_CrashDataPoint.m_MomentumDelta = data[0].m_Impulse;
1274 CrashDebugData.m_CrashDataPoint.m_SpeedWorld =
GetVelocity(
this).
Length() * 3.6;
1275 CrashDebugData.m_CrashDataPoint.m_SpeedWorldPrev = m_VelocityPrevTick.Length() * 3.6;
1276 CrashDebugData.m_CrashDataPoint.m_SpeedWorldDelta = (m_VelocityPrevTick.Length() -
GetVelocity(
this).Length()) * 3.6;
1277 CrashDebugData.m_CrashDataPoint.m_VelocityCur =
GetVelocity(
this);
1278 CrashDebugData.m_CrashDataPoint.m_VelocityPrev = m_VelocityPrevTick;
1279 CrashDebugData.m_CrashDataPoint.m_VelocityDot =
vector.
Dot(m_VelocityPrevTick.Normalized(),
GetVelocity(
this).Normalized());
1280 CrashDebugData.m_CrashDataPoint.m_Time =
g_Game.GetTime();
1282 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_CONSIDERED)
1284 Debug.
Log(
"--------------------------------------------------");
1287 Debug.
Log(
"zoneName : "+ zoneName);
1288 Debug.
Log(
"momentumCurr : "+ GetMomentum());
1289 Debug.
Log(
"momentumPrev : "+ m_MomentumPrevTick);
1290 Debug.
Log(
"momentumDelta : "+ data[0].m_Impulse);
1292 Debug.
Log(
"speedPrev(km/h): "+ m_VelocityPrevTick.Length() * 3.6);
1293 Debug.
Log(
"speedDelta(km/h) : "+ (m_VelocityPrevTick.Length() -
GetVelocity(
this).Length()) * 3.6);
1295 Debug.
Log(
"velocityPrev.): "+ m_VelocityPrevTick);
1298 Debug.
Log(
"--------------------------------------------------");
1305 #ifdef DIAG_DEVELOPER
1306 CrashDebugData.m_CrashData.Insert(CrashDebugData.m_CrashDataPoint);
1307 CrashDebugData.m_CrashDataPoint.m_Speedometer =
GetSpeedometer();
1312 #ifdef DIAG_DEVELOPER
1313 CrashDebugData.m_CrashDataPoint.m_DamageType =
"Small";
1314 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1318 SynchCrashLightSound(
true);
1323 #ifdef DIAG_DEVELOPER
1324 CrashDebugData.m_CrashDataPoint.m_DamageType =
"Medium";
1325 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1330 SynchCrashLightSound(
true);
1334 #ifdef DIAG_DEVELOPER
1335 CrashDebugData.m_CrashDataPoint.m_DamageType =
"Big";
1336 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1342 SynchCrashHeavySound(
true);
1347 m_DebugContactDamageMessage +=
string.
Format(
"%1: %2\n", zoneName, dmg);
1350 ProcessDirectDamage(
DamageType.CUSTOM, null, zoneName,
"EnviroDmg",
"0 0 0", dmg, pddfFlags);
1356 m_ContactCache.Clear();
1362 int crewSize = CrewSize();
1363 for (
int c = 0; c < crewSize; ++c)
1365 Human crew = CrewMember(c);
1371 #ifdef DIAG_DEVELOPER
1372 CrashDebugData.m_CrashDataPoint.m_CrewDamageBase = dmg;
1373 CrashDebugData.m_CrashDataPoint.m_DMGHealth = -100;
1374 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1376 Debug.
Log(
"--------------------------------------------------");
1378 Debug.
Log(
"Crew DMG Base: " + dmg);
1379 Debug.
Log(
"--------------------------------------------------");
1383 crew.SetHealth(0.0);
1389 float shock =
Math.
Lerp(50, 150, shockTemp);
1390 float hp =
Math.
Lerp(2, 100, shockTemp);
1392 #ifdef DIAG_DEVELOPER
1393 CrashDebugData.m_CrashDataPoint.m_CrewDamageBase = dmg;
1394 CrashDebugData.m_CrashDataPoint.m_ShockTemp = shockTemp;
1395 CrashDebugData.m_CrashDataPoint.m_DMGHealth = hp;
1396 CrashDebugData.m_CrashDataPoint.m_DMGShock = shock;
1397 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1399 Debug.
Log(
"--------------------------------------------------");
1400 Debug.
Log(
"Crew DMG Base: " + dmg);
1401 Debug.
Log(
"Crew shockTemp: " + shockTemp);
1402 Debug.
Log(
"Crew DMG Health: " + hp);
1403 Debug.
Log(
"Crew DMG Shock: " + shock);
1404 Debug.
Log(
"--------------------------------------------------");
1408 crew.AddHealth(
"",
"Shock", -shock);
1409 crew.AddHealth(
"",
"Health", -hp);
1416 super.CleanupEffects();
1427 GetInventory().CreateInInventory(
"HeadlightH7");
1434 GetInventory().CreateInInventory(
"SparkPlug");
1435 GetInventory().CreateInInventory(
"SparkPlug");
1441 return MotorbikeScriptOwnerState;
1451 m_EngineStarted = started;
1472 bool doInside =
false;
1530 if (player.IsCameraInsideVehicle())
1541 sound.SetPosition(ModelToWorld(enginePos));
1542 sound.SetLocalPosition(enginePos);
1563 return state == EMotorbikeOperationalState.OK;
1569 int state = EMotorbikeOperationalState.OK;
1575 state |= EMotorbikeOperationalState.RUINED;
1580 state |= EMotorbikeOperationalState.NO_FUEL;
1585 item = FindAttachmentBySlotName(
"SparkPlug");
1586 if (!item || (item && item.IsRuined()))
1587 state |= EMotorbikeOperationalState.NO_IGNITER;
1602 if (state == EMotorbikeOperationalState.RUINED)
1607 if (state & EMotorbikeOperationalState.NO_IGNITER)
1613 if (state & EMotorbikeOperationalState.NO_FUEL)
1629 #ifdef DIAG_DEVELOPER
1630 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
1644 typename e = EMotorbikeDebugMode;
1648 int cnt = e.GetVariableCount();
1651 for (i = 0; i < cnt; i++)
1653 if (!e.GetVariableValue(null, i, val))
1656 val = val +
EActions.PLAYER_BOT_INTERNAL_START;
1658 string name = e.GetVariableName(i);
1665 super.GetDebugActions(outputList);
1670 if (super.OnAction(action_id, player, ctx))
1680 case EActions.VEHICLE_HORN_START_SHORT:
1683 case EActions.VEHICLE_HORN_START_LONG:
1696 case EActions.VEHICLE_FUEL_INCREASE:
1699 case EActions.VEHICLE_FUEL_DECREASE:
1704 typename e = EMotorbikeDebugMode;
1708 int cnt = e.GetVariableCount();
1711 for (i = 0; i < cnt; i++)
1713 if (!e.GetVariableValue(null, i, val))
1716 if ((val +
EActions.PLAYER_BOT_INTERNAL_START) == action_id)
1728 string debug_output = super.GetDebugText();
1731 debug_output += m_DebugContactDamageMessage +
"\n";
1733 debug_output +=
"Entity momentum: " + GetMomentum();
1736 debug_output +=
"\nIsEngineON: " +
EngineIsOn();
1739 return debug_output;
1742 override void FixEntity()
1750 for (
int i = 5; i > 0; i--)
1752 if (!
g_Game.IsMultiplayer())
Param4< int, int, string, int > TSelectableActionInfoWithColor
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
float GetHeatComfortOverride()
bool IsDamageDestroyed(ActionTarget target)
void ActionManagerBase(PlayerBase player)
map< typename, ref array< ActionBase_Basic > > TInputActionMap
VehicleHornActionData ActionData ActionVehicleHornShort()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
TInputActionMap m_InputActionMap
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
@ OK
0 - No error. Can be returned from any call.
override void EEItemDetached(EntityAI item, string slot_name)
override void EEItemAttached(EntityAI item, string slot_name)
enum EBoatEffects STOP_OK
enum EBoatEffects NO_FUEL
enum EBoatEffects NO_IGNITER
enum EBoatEffects START_NO_FUEL
enum EBoatEffects START_OK
CarGearboxType
Enumerated gearbox types. (native, do not change or extend)
enum CarDoorState STARTING
enum CarDoorState REVERSE_ONLY
enum CarDoorState BRAKES_ONLY
enum CarDoorState START_NO_SPARKPLUG
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
PlayerSpawnPreset slotName
override void EEDelete(EntityAI parent)
override void EEOnCECreate()
override void OnVariablesSynchronized()
DamageType
exposed from C++ (do not change)
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
EVehicleVFXEffect
Identifiers of individual vehicle VFX effects.
override void OnAttachmentRuined(EntityAI attachment)
enum EUndegroundEntranceState MAIN
override void EOnPostSimulate(IEntity other, float timeSlice)
static string GetDisplayName(int liquid_type)
proto native void ShiftTo(int gear)
Shifts the future gear to selected gear, triggering gearbox simulation.
MotorbikeFluid
Type of vehicle's fluid. (native, do not change or extend)
proto native vector GetEnginePos()
Get actual position of engine (model space)
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 void Leak(MotorbikeFluid fluid, float amount)
Removes from the specified fluid the specified amount.
proto native vector WheelGetPositionLS(int wheelIdx)
proto native void SetHandbrake(float value)
Sets the future front brake value.
proto native CarGearboxType GearboxGetType()
Returns gearbox type. See CarGearboxType enum for more info.
proto native void SetKickstand(float value)
Sets the future kickstand value.
proto native EntityAI WheelGetEntity(int wheelIdx)
proto native int GetNeutralGear()
Returns the index of the neutral gear.
proto native int WheelCount()
How many wheel can be attached to a motorbike (hubs only)
proto native void EngineStop()
Stops the engine.
proto native CarAutomaticGearboxMode GearboxGetMode()
Returns gearbox mode. This is useful when motorbike has automatic gearbox.
proto native bool WheelHasContact(int wheelIdx)
proto native void SetBrake(float value)
Sets the future rear brake value.
proto native void Fill(MotorbikeFluid fluid, float amount)
Adds to the specified fluid the specified amount.
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 void ShiftDown()
Shifts the future gear down, triggering gearbox simulation.
proto native void ShiftUp()
Shifts the future gear up, triggering gearbox simulation.
bool OnBeforeEngineStart()
proto native vector WheelGetDirection(int wheelIdx)
proto native void EngineStart()
Starts the engine.
proto native float EngineGetRPM()
Returns engine's rpm value.
float GetSpeedometer()
Returns the current speed of the vehicle in km/h.
float OnSound(MotorbikeSoundCtrl ctrl, float oldValue)
MotorbikeSoundCtrl
Motorbike's sound controller list. (native, do not change or extend)
proto native void SetSteering(float value)
Sets the future steering value.
MotorbikeOwnerState TransportOwnerState GetOwnerStateType()
Native class for motorbikes - handles physics simulation.
override event GetMoveType()
proto native float GetFluidFraction(MotorbikeFluid fluid)
proto native bool FallOver()
Forcibly topple over the motorbike, ejects the player.
proto native int GetGear()
Returns the index of the future gear, -1 if there is no engine.
proto native void LeakAll(MotorbikeFluid fluid)
Removes all the specified fluid from vehicle.
proto native vector WheelGetContactPosition(int wheelIdx)
proto native float GetFluidCapacity(MotorbikeFluid fluid)
float GetSpeedometerAbsolute()
Returns the current speed of the vehicle in km/h. Value is absolute.
proto native bool IsFallen()
Returns if the bike is fallen over.
proto native SurfaceInfo WheelGetSurface(int wheelIdx)
proto native float GetBrake()
Returns the current rear brake value in range <0, 1>.
proto native float EngineGetRPMMax()
Returns engine's max rpm before engine blows up.
proto native float WheelGetAngularVelocity(int wheelIdx)
override void UpdateLights(int new_gear=-1)
void SetEngineStarted(bool started)
void SpawnUniversalParts()
override void OnDriverExit(Human player)
void InitializeParticles()
static string m_HeadLightPoint
override int Get3rdPersonCameraType()
override void EOnPostFrame(IEntity other, int extra)
void UpdateLightsServer(int newGear=-1)
static string m_HeadLightTargetPoint
void DamageCrew(float dmg)
Responsible for damaging crew in a car crash.
override bool CrewShouldEject(int posIdx)
override int GetFluidCapacityScript(ETransportFluid fluidType)
string m_EngineStartBattery
override bool OnBeforeLightOn()
bool m_ActionsInitialized
void HandleEngineSound(MotorbikeEngineSoundState state)
static ref map< typename, ref TInputActionMap > m_MotorbikeTypeActionsMap
static float DROWN_ENGINE_DAMAGE
string m_EngineStarting
Sounds.
enum MotorbikeEngineSoundState DROWN_ENGINE_THRESHOLD
ref VehicleVFXComponent m_VFXComponent
override void CleanupEffects()
ref EffectSound m_PreStartSound
static float WATER_DEPTH_PLAYER_EJECT
override vector GetDefaultHitPosition()
void UpdateLightsClient(int newGear=-1)
override void FillScript(ETransportFluid fluidType, float amount)
MotorbikeEngineSoundState m_EngineSoundState
override VehicleHornComponent GetVehicleHornComponent()
MotorbikeEngineSoundState
int CheckOperationalRequirements()
override bool CrewCanEject(int posIdx)
ref VehicleHornComponent m_HornComponent
override string GetVehicleType()
EffectSound CreateSoundForAnimationSource(string animSource)
float m_HeatComfortOverride
MotorbikeEngineSoundState m_EngineLastSoundState
override bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance=1.0)
static string m_RearLightPoint
bool CheckOperationalState()
ref VehicleLightsComponent m_LightsComponent
void HandleHeatComfortOverrides(string slotName, notnull EntityAI item, bool detach=false)
void UpdateHeadlightState()
void SetEngineSoundState(MotorbikeEngineSoundState pState)
override void OnInput(float dt)
override float GetFluidFractionScript(ETransportFluid fluidType)
static vector m_DrownEnginePos
void VehicleHornComponent(notnull EntityAI parent)
void VehicleLightProfileRear()
class VehicleLightProfileBase VehicleLightProfileFront()
void VehicleLightData(VehicleLightProfileBase profile)
void VehicleVFXDataParams(vector position=vector.Zero, vector orientation=vector.Up, float cooldownSec=0.0)
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override int GetSeatAnimationType(int posIdx)
override EntityAI GetElectricitySourceDevice()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override bool IsVitalRadiator()
override bool IsVitalSparkPlug()
override bool HasGangedTailAndBrakeLights()
override float GetWeightCoef()
Super root of all classes in Enforce script.
static const int DAYZCAMERA_3RD_VEHICLE_MOTORBIKE
motorbike 3rd person
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
const float WHEEL_DUST_THRESHOLD
const float WHEEL_SMOKE_THRESHOLD
void SetSoundSet(string snd)
Set soundset for the sound.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
override void SetParent(Object parent_obj, int pivot)
Set parent for the sound to follow.
bool SoundPlay()
Plays sound.
Wrapper class for managing sound through SEffectManager.
proto native bool IsControllingVehicle()
static bool IsActionLogEnable()
static const int HATCHBACK_COOLANT_OVERHEATED
static const int HATCHBACK_EXHAUST_SMOKE
static int EffectRegister(Effect effect)
Registers Effect in SEffectManager.
Manager class for managing Effect (EffectParticle, EffectSound)
void StopEffect(EVehicleVFXEffect effectId)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
proto native float Length()
Returns length of vector (magnitude)
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
proto vector InvMultiply3(vector mat[3])
Invert-transforms vector.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
Keffiyeh_LightBlue SetActions
DayZPlayerConstants
defined in C++
Serializer ParamsReadContext
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< vector > TVectorArray
EntityEvent
Entity events for event-mask, or throwing event from code.
const float DAMAGE_RUINED_VALUE
const float DAMAGE_DAMAGED_VALUE
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto int AbsInt(int i)
Returns absolute value.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float AbsFloat(float f)
Returns absolute value.
@ NONE
body is not in simulation, nor in collision world
proto native vector dBodyGetVelocityAt(notnull IEntity body, vector globalpos)
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto native void dBodyActive(notnull IEntity ent, ActiveState activeState)
proto native float dBodyGetMass(notnull IEntity ent)
const int SAT_DEBUG_ACTION
proto native int Length()
Returns length of string.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
const int VEHICLE_FLUIDS_TICK