8enum CarHeadlightBulbsState
24enum ECarOperationalState
33enum CarEngineSoundState
61 protected override event void Write(PawnStateWriter ctx)
66 protected override event void Read(PawnStateReader ctx)
191 #ifdef DIAG_DEVELOPER
192 private const int DEBUG_MESSAGE_CLEAN_TIME_SECONDS = 10;
193 private float m_DebugMessageCleanTime;
194 private string m_DebugContactDamageMessage;
198 ECarDebugMode m_eDebugMode;
224 m_dmgContactCoef = 0.058;
276 if (MemoryPointExists(
"ptcCoolantPos"))
279 RegisterNetSyncVariableBool(
"m_BrakesArePressed");
280 RegisterNetSyncVariableBoolSignal(
"m_PlayCrashSoundLight");
281 RegisterNetSyncVariableBoolSignal(
"m_PlayCrashSoundHeavy");
285 RegisterNetSyncVariableInt(
"m_CarEngineSoundState", CarEngineSoundState.NONE, CarEngineSoundState.STOP_NO_FUEL);
291 RegisterNetSyncVariableInt(
"m_CarHornState", ECarHornState.OFF, ECarHornState.LONG);
296 return "VehicleTypeCar";
345 if (
GetGame().IsHeadlessOrDedicatedServer())
392 super.CleanupEffects();
430 override void FillScript(ETransportFluid fluidType,
float amount)
432 Fill(fluidType, amount);
437 super.OnVariablesSynchronized();
439 if (GetCrashHeavySound())
441 else if (GetCrashLightSound())
456 PlaySoundEx(
"offroad_hit_light_SoundSet", m_CrashSoundLight, m_PlayCrashSoundLight);
463 PlaySoundEx(
"offroad_hit_heavy_SoundSet", m_CrashSoundHeavy, m_PlayCrashSoundHeavy);
484 super.EEItemAttached(item, slot_name);
488 case "Reflector_1_1":
490 SetHealth(
"Reflector_1_1",
"Health", item.GetHealth());
492 case "Reflector_2_1":
494 SetHealth(
"Reflector_2_1",
"Health", item.GetHealth());
524 EntityAI bulb_L = FindAttachmentBySlotName(
"Reflector_1_1");
525 EntityAI bulb_R = FindAttachmentBySlotName(
"Reflector_2_1");
527 if (bulb_L && !bulb_L.IsRuined() && bulb_R && !bulb_R.IsRuined())
529 m_HeadlightsState = CarHeadlightBulbsState.BOTH;
531 else if (bulb_L && !bulb_L.IsRuined())
533 m_HeadlightsState = CarHeadlightBulbsState.LEFT;
535 else if (bulb_R && !bulb_R.IsRuined())
537 m_HeadlightsState = CarHeadlightBulbsState.RIGHT;
539 else if ((!bulb_L || bulb_L.IsRuined()) && (!bulb_R || bulb_R.IsRuined()))
541 m_HeadlightsState = CarHeadlightBulbsState.NONE;
584 if (m_DamageZoneMap.Contains(
"Radiator"))
586 SetHealth(
"Radiator",
"Health", 0);
603 super.OnAttachmentRuined(attachment);
611 if (!super.CanReceiveAttachment(attachment, slotId))
615 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
616 if (attachmentInventoryLocation.
GetParent() == null)
621 if (attachment && attachment.Type().IsInherited(
CarWheel))
623 string slotSelectionName;
626 switch (slotSelectionName)
628 case "wheel_spare_1":
629 case "wheel_spare_2":
640 if (!super.CanReleaseAttachment(attachment))
650 if (attachment && attachment.Type().IsInherited(
CarWheel))
653 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
655 string slotSelectionName;
658 switch (slotSelectionName)
660 case "wheel_spare_1":
661 case "wheel_spare_2":
678 ParticleParamsOverrideData particleParamsData;
681 if ( !
g_Game.IsHeadlessOrDedicatedServer() )
688 particleParamsData.m_FloatModifiers.InsertAt(carSpeed, 0);
719 particleParamsData.m_FloatModifiers.InsertAt(carSpeed, 0);
720 particleParamsData.m_FloatModifiers.InsertAt(
GetWeightCoef(), 1);
731 for (i = 0; i < wheelCount; ++i)
732 wheelsPosition.InsertAt(
Vector(-1, -1, -1), i);
734 for (i = 0; i < wheelCount; ++i)
741 if (
m_VFXComponent.CanPlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE))
747 wheelPos = WorldToModel(wheelPos);
748 wheelsPosition.Set(i, wheelPos);
755 transform[0] = transform[2] * transform[1];
759 float bodySpeed = wheelVel[2];
761 bool applyWheelSmokeEffect =
false;
763 if ((wheelSpeed > 0 && bodySpeed > 0) || (wheelSpeed < 0 && bodySpeed < 0))
768 if (applyWheelSmokeEffect)
770 m_VFXComponent.SetEffectGroupPositions(EVehicleVFXEffectGroup.WHEEL_SMOKE, wheelsPosition);
771 m_VFXComponent.PlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE);
774 m_VFXComponent.StopEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE);
780 wheelsPosition.Set(i, wheelPos);
785 if (
m_VFXComponent.CanPlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT))
789 if (wheel && applyWheelContactEffect)
791 particleParamsData =
m_VFXComponent.GetEffectGroupParticleParamsOverrideData(EVehicleVFXEffectGroup.WHEEL_CONTACT);
792 particleParamsData.m_FloatModifiers.InsertAt(carSpeed, 0);
793 particleParamsData.m_FloatModifiers.InsertAt(
GetWeightCoef(), 1);
795 m_VFXComponent.SetEffectGroupPositions(EVehicleVFXEffectGroup.WHEEL_CONTACT, wheelsPosition);
797 m_VFXComponent.PlayEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT);
800 m_VFXComponent.StopEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT);
813 #ifdef DIAG_DEVELOPER
814 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.CONTACT)
818 Debug.
Log(
"Momentum delta: " + (GetMomentum() - m_MomentumPrevTick));
819 Debug.
Log(
"--------------------------------------------------------------------");
820 m_ContactCalled =
false;
828 m_MomentumPrevTick = GetMomentum();
829 #ifdef DIAG_DEVELOPER
830 m_DebugMessageCleanTime += timeSlice;
831 if (m_DebugMessageCleanTime >= DEBUG_MESSAGE_CLEAN_TIME_SECONDS)
833 m_DebugMessageCleanTime = 0;
834 m_DebugContactDamageMessage =
"";
853 CheckVitalItemCallback(
IsVitalSparkPlug(), SparkPlug.SLOT_ID,
this,
"EngineStop");
854 CheckVitalItemCallback(
IsVitalGlowPlug(), GlowPlug.SLOT_ID,
this,
"EngineStop");
859 if (IsVitalFuelTank())
878 AddHealth(
"Engine",
"Health", -GetMaxHealth(
"Engine",
"") * 0.05 );
883 SetEngineZoneReceivedHit(
true);
887 SetEngineZoneReceivedHit(
false);
921 AddHealth(
"Engine",
"Health", -dmg );
922 SetEngineZoneReceivedHit(
true);
942 super.OnDriverExit(player);
956 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"LEGS")));
957 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"BACK")));
958 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"VEST")));
959 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"HeadGear")));
960 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"Mask")));
961 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"BODY")));
962 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"FEET")));
963 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"GLOVES")));
981 player.GiveShock(-shockTaken);
985 if (player.m_BleedingManagerServer)
986 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
PlayerBase.m_BleedingSourcesLow[randNum]);
991 player.GiveShock(-shockTaken);
995 if (player.m_BleedingManagerServer)
996 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
PlayerBase.m_BleedingSourcesUp[randNum]);
1000 if (!headGear && player.m_BleedingManagerServer)
1001 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
"Head");
1004 player.GiveShock(-shockTaken);
1016 cloth.DecreaseHealth(dmgTaken,
false);
1020 gotActionData.
m_Player.DamageAllLegs(dmgTaken);
1023 healthCoef =
Math.
Clamp(healthCoef, 0.0, 1.0);
1024 gotActionData.
m_Player.ProcessDirectDamage(
DamageType.CUSTOM, gotActionData.
m_Player,
"",
"FallDamageHealth", posMS, healthCoef);
1036#ifdef DIAG_DEVELOPER
1038 ref Param8<float, float, float, float, float, float, float, float> m_DebugParams =
new Param8<float, float, float, float, float, float, float, float>(0,0,0,0,0,0,0,0);
1045#ifdef DIAG_DEVELOPER
1046 if (m_eDebugMode == ECarDebugMode.NONE)
1067 float longitudinalWanted = 0.0;
1068 float throttleWanted = 0.0;
1069 float steeringWanted = 0.0;
1071 bool attemptSpeed =
false;
1072 float speedWanted = 0;
1076 switch (m_eDebugMode)
1078 case ECarDebugMode.FORWARD_10:
1079 attemptSpeed =
true;
1082 case ECarDebugMode.FORWARD_50:
1083 attemptSpeed =
true;
1086 case ECarDebugMode.RANDOM_DRIVING:
1087 attemptSpeed =
true;
1089 m_DebugParams.param1 -= dt;
1090 if (m_DebugParams.param1 <= 0)
1096 speedWanted =
Math.
Clamp(speedWanted, -20, 100);
1100 float steeringWantedSign = (steeringWanted > 0) - (steeringWanted < 0);
1105 steeringWanted *= 0.1;
1108 m_DebugParams.param2 = steeringWanted;
1109 m_DebugParams.param3 = speedWanted;
1112 steeringWanted = m_DebugParams.param2;
1113 speedWanted = m_DebugParams.param3;
1115 text +=
"\nTarget Steering: " + steeringWanted;
1116 text +=
"\nTarget Speed: " + speedWanted;
1117 text +=
"\nCurrent Speed: " + currentSpeed;
1120 case ECarDebugMode.PREDEFINED_PATH:
1121 attemptSpeed =
true;
1126 if (!
GetGame().IsDedicatedServer())
1129 GetTransform(transform);
1135 longitudinalWanted = speedWanted - currentSpeed;
1137 if (speedWanted > 0.1 && currentSpeed > 0.1)
1139 longitudinalWanted =
Math.
Max(longitudinalWanted, 0.1);
1141 else if (speedWanted < 0.1 && currentSpeed < 0.1)
1143 longitudinalWanted =
Math.
Min(longitudinalWanted, -0.1);
1150 hillFactor =
Math.
Clamp(hillFactor, 0.5, 5.0);
1154 throttleWanted = 1.0 - throttleWanted;
1156 throttleWanted *= hillFactor;
1157 throttleWanted =
Math.
Clamp(throttleWanted, 0.0, 1.0);
1160 bool isReverse =
GetGear() == CarGear.REVERSE;
1187 if (thrustWantedAbs > 0.1)
1192 else if (
GetGear() > CarGear.FIRST && thrustWantedAbs < 0.1)
1196 else if (
GetGear() < CarGear.FIRST || (throttleWanted > 0.0 &&
Math.
AbsFloat(currentSpeed) < 5.0))
1206 SetBrakesActivateWithoutDriver(
false);
1212 Human driver = CrewDriver();
1216 if (driver.IsAlive())
1241 SetEngineZoneReceivedHit(
true);
1252 if ( brake_coef > 0 )
1274 super.EEKilled(killer);
1275 m_EngineDestroyed =
true;
1281 int contactZonesCount = m_ContactCache.Count();
1283 if (contactZonesCount == 0)
1286 for (
int i = 0; i < contactZonesCount; ++i)
1288 string zoneName = m_ContactCache.GetKey(i);
1291 float dmg =
Math.
AbsInt(data[0].m_Impulse * m_dmgContactCoef);
1294 #ifdef DIAG_DEVELOPER
1295 CrashDebugData.m_CrashDataPoint =
new CrashDebugData();
1296 CrashDebugData.m_CrashDataPoint.m_VehicleType =
GetDisplayName();
1297 CrashDebugData.m_CrashDataPoint.m_Damage = dmg;
1298 CrashDebugData.m_CrashDataPoint.m_Zone = zoneName;
1299 CrashDebugData.m_CrashDataPoint.m_MomentumCurr = GetMomentum();
1300 CrashDebugData.m_CrashDataPoint.m_MomentumPrev = m_MomentumPrevTick;
1301 CrashDebugData.m_CrashDataPoint.m_MomentumDelta = data[0].m_Impulse;
1302 CrashDebugData.m_CrashDataPoint.m_SpeedWorld =
GetVelocity(
this).
Length() * 3.6;
1303 CrashDebugData.m_CrashDataPoint.m_SpeedWorldPrev = m_VelocityPrevTick.Length() * 3.6;
1304 CrashDebugData.m_CrashDataPoint.m_SpeedWorldDelta = (m_VelocityPrevTick.Length() -
GetVelocity(
this).Length()) * 3.6;
1305 CrashDebugData.m_CrashDataPoint.m_VelocityCur =
GetVelocity(
this);
1306 CrashDebugData.m_CrashDataPoint.m_VelocityPrev = m_VelocityPrevTick;
1307 CrashDebugData.m_CrashDataPoint.m_VelocityDot =
vector.
Dot(m_VelocityPrevTick.Normalized(),
GetVelocity(
this).Normalized());
1308 CrashDebugData.m_CrashDataPoint.m_Time =
g_Game.GetTime();
1310 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_CONSIDERED)
1312 Debug.
Log(
"--------------------------------------------------");
1315 Debug.
Log(
"zoneName : "+ zoneName);
1316 Debug.
Log(
"momentumCurr : "+ GetMomentum());
1317 Debug.
Log(
"momentumPrev : "+ m_MomentumPrevTick);
1318 Debug.
Log(
"momentumDelta : "+ data[0].m_Impulse);
1320 Debug.
Log(
"speedPrev(km/h): "+ m_VelocityPrevTick.Length() * 3.6);
1321 Debug.
Log(
"speedDelta(km/h) : "+ (m_VelocityPrevTick.Length() -
GetVelocity(
this).Length()) * 3.6);
1323 Debug.
Log(
"velocityPrev.): "+ m_VelocityPrevTick);
1326 Debug.
Log(
"--------------------------------------------------");
1333 #ifdef DIAG_DEVELOPER
1334 CrashDebugData.m_CrashData.Insert(CrashDebugData.m_CrashDataPoint);
1335 CrashDebugData.m_CrashDataPoint.m_Speedometer =
GetSpeedometer();
1340 #ifdef DIAG_DEVELOPER
1341 CrashDebugData.m_CrashDataPoint.m_DamageType =
"Small";
1342 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1345 SynchCrashLightSound(
true);
1350 #ifdef DIAG_DEVELOPER
1351 CrashDebugData.m_CrashDataPoint.m_DamageType =
"Big";
1352 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1356 SynchCrashHeavySound(
true);
1361 m_DebugContactDamageMessage +=
string.
Format(
"%1: %2\n", zoneName, dmg);
1364 ProcessDirectDamage(
DamageType.CUSTOM, null, zoneName,
"EnviroDmg",
"0 0 0", dmg, pddfFlags);
1370 m_ContactCache.Clear();
1376 int crewSize = CrewSize();
1377 for (
int c = 0; c < crewSize; ++c)
1379 Human crew = CrewMember(c);
1385 #ifdef DIAG_DEVELOPER
1386 CrashDebugData.m_CrashDataPoint.m_CrewDamageBase = dmg;
1387 CrashDebugData.m_CrashDataPoint.m_DMGHealth = -100;
1388 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1390 Debug.
Log(
"--------------------------------------------------");
1392 Debug.
Log(
"Crew DMG Base: " + dmg);
1393 Debug.
Log(
"--------------------------------------------------");
1397 crew.SetHealth(0.0);
1403 float shock =
Math.
Lerp(50, 150, shockTemp);
1404 float hp =
Math.
Lerp(2, 100, shockTemp);
1406 #ifdef DIAG_DEVELOPER
1407 CrashDebugData.m_CrashDataPoint.m_CrewDamageBase = dmg;
1408 CrashDebugData.m_CrashDataPoint.m_ShockTemp = shockTemp;
1409 CrashDebugData.m_CrashDataPoint.m_DMGHealth = hp;
1410 CrashDebugData.m_CrashDataPoint.m_DMGShock = shock;
1411 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.DAMAGE_APPLIED)
1413 Debug.
Log(
"--------------------------------------------------");
1414 Debug.
Log(
"Crew DMG Base: " + dmg);
1415 Debug.
Log(
"Crew shockTemp: " + shockTemp);
1416 Debug.
Log(
"Crew DMG Health: " + hp);
1417 Debug.
Log(
"Crew DMG Shock: " + shock);
1418 Debug.
Log(
"--------------------------------------------------");
1422 crew.AddHealth(
"",
"Shock", -shock);
1423 crew.AddHealth(
"",
"Health", -hp);
1438 if (!m_EngineStarted)
1461 int pivotIndex = -1;
1463 string selectionName = GetSelectionFromAnimSource(animSource);
1464 if (selectionName !=
"")
1466 position = GetSelectionBasePositionLS(selectionName);
1468 int level = GetViewGeometryLevel();
1473 GetBonePivotsForAnimationSource(level, animSource, pivots);
1477 pivotIndex = pivots[0];
1488 if (player.IsCameraInsideVehicle())
1496 sound.SetPosition(ModelToWorld(
position));
1508 case "doorscodriver":
1532 case "seatcodriver":
1571 bool doInside =
false;
1577 case CarEngineSoundState.STARTING:
1579 sound.
SetSoundSet(
"Offroad_02_Starting_SoundSet");
1584 case CarEngineSoundState.START_OK:
1595 case CarEngineSoundState.START_NO_FUEL:
1597 sound.
SetSoundSet(
"offroad_engine_failed_start_fuel_SoundSet");
1601 case CarEngineSoundState.START_NO_BATTERY:
1603 sound.
SetSoundSet(
"offroad_engine_failed_start_battery_SoundSet");
1607 case CarEngineSoundState.START_NO_SPARKPLUG:
1609 sound.
SetSoundSet(
"offroad_engine_failed_start_sparkplugs_SoundSet");
1613 case CarEngineSoundState.STOP_OK:
1620 case CarEngineSoundState.STOP_NO_FUEL:
1635 if (player.IsCameraInsideVehicle())
1646 sound.SetPosition(ModelToWorld(enginePos));
1647 sound.SetLocalPosition(enginePos);
1718 return state == ECarOperationalState.OK;
1725 if (state == ECarOperationalState.RUINED)
1730 if (state & ECarOperationalState.NO_BATTERY)
1736 if (state & ECarOperationalState.NO_IGNITER)
1742 if (state & ECarOperationalState.NO_FUEL)
1754 int state = ECarOperationalState.OK;
1760 state |= ECarOperationalState.RUINED;
1765 state |= ECarOperationalState.NO_FUEL;
1772 if (!item || (item && (item.IsRuined() || item.GetCompEM().GetEnergy() < batteryConsume)))
1773 state |= ECarOperationalState.NO_BATTERY;
1778 item = FindAttachmentBySlotName(
"SparkPlug");
1779 if (!item || (item && item.IsRuined()))
1780 state |= ECarOperationalState.NO_IGNITER;
1785 item = FindAttachmentBySlotName(
"GlowPlug");
1786 if (!item || (item && item.IsRuined()))
1787 state |= ECarOperationalState.NO_IGNITER;
1808 if (
g_Game.IsServer() && battery)
1811 battery.GetCompEM().ConsumeEnergy(batteryConsume);
1825 if (
g_Game.IsServer() && battery)
1832 CarEngineSoundState stopSoundState = CarEngineSoundState.STOP_OK;
1834 stopSoundState = CarEngineSoundState.STOP_NO_FUEL;
1838 SetEngineZoneReceivedHit(
false);
1845 if (neededItem && !neededItem.IsRuined())
1847 return neededItem.GetCompEM() && neededItem.GetCompEM().GetEnergy() > 0.0;
1876 if (!
m_LightsComponent.LightExist(
"Front") && m_HeadlightsState != CarHeadlightBulbsState.NONE)
1881 switch (m_HeadlightsState)
1883 case CarHeadlightBulbsState.LEFT:
1887 case CarHeadlightBulbsState.RIGHT:
1891 case CarHeadlightBulbsState.BOTH:
1895 vector local_pos_middle = (local_pos_left + local_pos_right) * 0.5;
1913 case CarGear.REVERSE:
1916 m_RearLightType = CarRearLightType.BRAKES_AND_REVERSE;
1918 m_RearLightType = CarRearLightType.REVERSE_ONLY;
1922 m_RearLightType = CarRearLightType.BRAKES_ONLY;
1924 m_RearLightType = CarRearLightType.NONE;
1929 if (!
m_LightsComponent.LightExist(
"Rear") && m_RearLightType != CarRearLightType.NONE && m_HeadlightsState != CarHeadlightBulbsState.NONE)
1931 if (
EngineIsOn() || m_RearLightType == CarRearLightType.BRAKES_ONLY || m_RearLightType == CarRearLightType.BRAKES_AND_REVERSE)
1939 if (
m_LightsComponent.LightExist(
"Rear") && m_RearLightType != CarRearLightType.NONE && m_HeadlightsState != CarHeadlightBulbsState.NONE)
1941 switch (m_RearLightType)
1943 case CarRearLightType.BRAKES_ONLY:
1947 case CarRearLightType.REVERSE_ONLY:
1955 case CarRearLightType.BRAKES_AND_REVERSE:
1995 switch (m_HeadlightsState)
1997 case CarHeadlightBulbsState.LEFT:
2002 case CarHeadlightBulbsState.RIGHT:
2007 case CarHeadlightBulbsState.BOTH:
2031 case CarGear.REVERSE:
2034 m_RearLightType = CarRearLightType.BRAKES_AND_REVERSE;
2036 m_RearLightType = CarRearLightType.REVERSE_ONLY;
2040 m_RearLightType = CarRearLightType.BRAKES_ONLY;
2042 m_RearLightType = CarRearLightType.NONE;
2049 if (m_RearLightType != CarRearLightType.NONE && m_HeadlightsState != CarHeadlightBulbsState.NONE)
2051 switch (m_RearLightType)
2053 case CarRearLightType.BRAKES_ONLY:
2057 case CarRearLightType.REVERSE_ONLY:
2070 case CarRearLightType.BRAKES_AND_REVERSE:
2106 Leak(fluid, amount);
2111 Leak(fluid, amount);
2116 Leak(fluid, amount);
2126 int radiatorHealthLevel = radiator.GetHealthLevel(
"");
2134 int engineHealthLevel = GetHealthLevel(
"Engine");
2135 m_EngineHealth = GetHealthLevelValue(engineHealthLevel,
"Engine");
2137 int fuelTankHealthLevel = GetHealthLevel(
"FuelTank");
2146 return "seat_con_1_1";
2148 case "seat_codriver":
2149 return "seat_con_2_1";
2152 return "seat_con_1_2";
2155 return "seat_con_2_2";
2180 if (conPointName.
Length() > 0)
2182 if ( MemoryPointExists(conPointName) )
2184 vector conPointMS = GetMemoryPointPos(conPointName);
2185 vector conPointWS = ModelToWorld(conPointMS);
2240 m_EngineStarted = started;
2250 if (GetAnimationPhase(animation) > 0.5)
2272 return "carradiator";
2282 return "carradiator";
2293 if (!m_InputActionMap)
2334 typename ai = action.GetInputType();
2347#ifdef ENABLE_LOGGING
2350 Debug.
ActionLog(action.ToString() +
" -> " + ai,
this.ToString() ,
"n/a",
"Add action" );
2353 action_array.Insert(action);
2359 ActionBase action = player.GetActionManager().GetAction(actionName);
2360 typename ai = action.GetInputType();
2365 action_array.RemoveItem(action);
2371 return (
g_Game.GetPlayer() && ( !
g_Game.GetPlayer().GetCommand_Vehicle() ||
g_Game.GetPlayer().GetCommand_Vehicle().GetTransport() ==
this ) );
2376 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
2387 PlaySoundEx(
"offroad_hit_window_small_SoundSet",
m_WindowSmall, dummy);
2393 case "WindowFrontLeft":
2394 case "WindowFrontRight":
2397 PlaySoundEx(
"offroad_hit_window_large_SoundSet",
m_WindowLarge, dummy);
2457 bool lightsOn = LightIsOn();
2464 else if (!engineOn && lightsOn)
2469 if (lightsOn && battery.GetCompEM().GetEnergy() <= 0)
2551 ent.GetInventory().CreateInInventory(
"LargeGasCanister");
2557 ent.GetInventory().CreateInInventory(
"LargeGasCanister");
2584 protected override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
2594 bool isServer =
g_Game.IsServer();
2595 if (isServer || GetNetworkMoveStrategy() != NetworkMoveStrategy.PHYSICS)
2603 #ifdef DIAG_DEVELOPER
2604 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
2625 typename e = ECarDebugMode;
2629 int cnt = e.GetVariableCount();
2632 for (i = 0; i < cnt; i++)
2634 if (!e.GetVariableValue(null, i, val))
2637 val = val +
EActions.PLAYER_BOT_INTERNAL_START;
2639 string name = e.GetVariableName(i);
2646 super.GetDebugActions(outputList);
2651 if (super.OnAction(action_id, player, ctx))
2661 case EActions.VEHICLE_HORN_START_SHORT:
2662 SetCarHornState(ECarHornState.SHORT);
2664 case EActions.VEHICLE_HORN_START_LONG:
2665 SetCarHornState(ECarHornState.LONG);
2668 SetCarHornState(ECarHornState.OFF);
2677 case EActions.VEHICLE_FUEL_INCREASE:
2680 case EActions.VEHICLE_FUEL_DECREASE:
2690 case EActions.CAR_COOLANT_INCREASE:
2693 case EActions.CAR_COOLANT_DECREASE:
2698 typename e = ECarDebugMode;
2702 int cnt = e.GetVariableCount();
2705 for (i = 0; i < cnt; i++)
2707 if (!e.GetVariableValue(null, i, val))
2710 if ((val +
EActions.PLAYER_BOT_INTERNAL_START) == action_id)
2720 override void FixEntity()
2727 for (
int i = 5; i > 0; i--)
2729 if (!
GetGame().IsMultiplayer())
2746 string debug_output = super.GetDebugText();
2749 debug_output += m_DebugContactDamageMessage +
"\n";
2751 debug_output +=
"Entity momentum: " + GetMomentum();
2754 debug_output +=
"\nIsEngineON: " +
EngineIsOn();
2756 return debug_output;
2811 [
Obsolete(
"1.30: use Transport.NeedElectricitySourceDevice")]
2817 [
Obsolete(
"1.30: use Transport.NeedElectricitySourceDevice")]
2823 [
Obsolete(
"1.30: use Transport.LightIsOn")]
2829 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2835 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2841 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2847 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2853 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2859 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2865 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2871 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2877 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2883 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2889 [
Obsolete(
"1.30: VehicleLightsComponent instead")]
2895 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2901 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2904 if (m_HeadlightsState == CarHeadlightBulbsState.LEFT)
2908 else if (m_HeadlightsState == CarHeadlightBulbsState.RIGHT)
2912 else if (m_HeadlightsState == CarHeadlightBulbsState.BOTH)
2918 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2924 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2930 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2937 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2944 [
Obsolete(
"1.30: use VehicleLightsComponent instead")]
2951 [
Obsolete(
"1.30: use Transport::CheckVitalItemCallback instead")]
2955 if ( !isVital || !inventory )
2960 if (!item || item.IsRuined())
2966 [
Obsolete(
"1.30: use Transport::CheckVitalItemCallback instead")]
2976 [
Obsolete(
"1.30: use Transport::PartsHealthCheck instead")]
Param4< int, int, string, int > TSelectableActionInfoWithColor
bool IsDamageDestroyed(ActionTarget target)
void ActionManagerBase(PlayerBase player)
map< typename, ref array< ActionBase_Basic > > TInputActionMap
ActionPushCarCB ActionPushObjectCB ActionPushCar()
VehicleHornActionData ActionData ActionVehicleHornShort()
void AddAction(typename actionName)
@ OK
0 - No error. Can be returned from any call.
enum EBoatEffects STOP_OK
enum EBoatEffects NO_FUEL
enum EBoatEffects NO_IGNITER
enum EBoatEffects START_NO_FUEL
enum EBoatEffects START_OK
CarAutomaticGearboxMode
Enumerated automatic gearbox modes. (native, do not change or extend)
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
CarGearboxType
Enumerated gearbox types. (native, do not change or extend)
enum CarDoorState START_NO_BATTERY
enum CarDoorState NO_BATTERY
enum CarDoorState STARTING
enum CarDoorState REVERSE_ONLY
enum CarDoorState BRAKES_ONLY
enum CarDoorState START_NO_SPARKPLUG
class EconomyOutputStrings OFF
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
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.
static string GetDisplayName(int liquid_type)
proto native float GetHandbrake()
Returns the current front brake value in range <0, 1>.
proto native void ShiftTo(int gear)
Shifts the future gear to selected gear, triggering gearbox simulation.
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 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.
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.
proto native float EngineGetRPMMin()
Returns engine's min operating rpm.
proto native void SetSteering(float value)
Sets the future steering value.
proto native float GetFluidFraction(MotorbikeFluid fluid)
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 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.
bool DetectFlippedUsingWheels(VehicleFlippedContext ctx, bool disallowSide)
proto native float WheelGetAngularVelocity(int wheelIdx)
override void UpdateLights(int new_gear=-1)
void InitializeParticles()
void UpdateLightsServer(int newGear=-1)
void DamageCrew(float dmg)
Responsible for damaging crew in a car crash.
void HandleEngineSound(MotorbikeEngineSoundState state)
ref VehicleVFXComponent m_VFXComponent
void UpdateLightsClient(int newGear=-1)
int CheckOperationalRequirements()
EffectSound CreateSoundForAnimationSource(string animSource)
void UpdateHeadlightState()
class NoiseSystem NoiseParams()
void VehicleHornComponent(notnull EntityAI parent)
void VehicleLightData(VehicleLightProfileBase profile)
void VehicleVFXDataParams(vector position=vector.Zero, vector orientation=vector.Up, float cooldownSec=0.0)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool HasGangedTailAndBrakeLights()
override float GetWeightCoef()
const int LOW_SPEED_VALUE
const int HEALTH_HIGH_SPEED_VALUE
const int HIGH_SPEED_VALUE
const int HEALTH_LOW_SPEED_VALUE
int m_CarHornState
VehicleHornComponent.
float GetEnviroHeatComfortOverride()
override void EOnPostFrame(IEntity other, int extra)
string m_EngineStartOK
Sounds.
override float GetFluidFractionScript(ETransportFluid fluidType)
override void OnGearChanged(int newGear, int oldGear)
override event void ObtainState(PawnOwnerState pState)
ref EffVehicleSmoke m_engineFx
float m_FuelAmmount
keeps ammount of each fluid
EffectSound CreateSoundForAnimationSource(string animSource)
void RemoveAction(typename actionName)
int m_CarEngineLastSoundState
override vector GetDefaultHitPosition()
string GetActionCompNameOil()
void BrakeAndReverseRearLight()
override void MarkCrewMemberUnconscious(int crewMemberIndex)
override VehicleHornComponent GetVehicleHornComponent()
int m_CarEngineSoundState
static string m_LeftHeadlightPoint
float GetBatteryRechargeRate()
void BrakeLightsShineOn()
void CleanupSound(EffectSound sound)
vector m_exhaustPtcDir
Particles.
float GetActionDistanceOil()
void LeftFrontLightShineOn()
override void MarkCrewMemberDead(int crewMemberIndex)
static string m_ReverseLightPoint
void UpdateLightsServer(int newGear=-1)
vector GetEnginePointPosWS()
void LeftFrontLightShineOff()
static const int SELECTION_ID_TAIL_LIGHT_L
bool IsVitalTruckBattery()
static float DROWN_ENGINE_THRESHOLD
void SetEngineStarted(bool started)
void RightFrontLightShineOff()
static const int SELECTION_ID_BRAKE_LIGHT_R
void InitializeParticles()
override event GetMoveType()
void CheckVitalItem(bool isVital, string slot_name)
override void EEItemAttached(EntityAI item, string slot_name)
void HandleCarHornSound(ECarHornState pState)
static ref map< typename, ref TInputActionMap > m_CarTypeActionsMap
override void OnFluidChanged(CarFluid fluid, float newValue, float oldValue)
void ReverseLightsShineOn()
float m_EnviroHeatComfortOverride
bool CheckOperationalState()
void UpdateHeadlightState()
float m_BatteryEnergyStartMin
VehicleHornComponent.
void UpdateBattery(ItemBase battery)
override void FillScript(ETransportFluid fluidType, float amount)
static const int SELECTION_ID_BRAKE_LIGHT_L
override float GetLiquidThroughputCoef()
void ForceUpdateLightsEnd()
void HandleEngineSound(CarEngineSoundState state)
static string m_LeftHeadlightTargetPoint
ref VehicleVFXComponent m_VFXComponent
void LeakFluid(CarFluid fluid)
ref EffectSound m_CarHornSoundEffect
VehicleHornComponent.
bool IsScriptedLightsOn()
override int Get3rdPersonCameraType()
camera type
static const string MEMORY_POINT_NAME_CAR_HORN
static const int SELECTION_ID_REVERSE_LIGHT_R
static string m_DrownEnginePoint
override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
vector Get_1_1PointPosWS()
override void OnEngineStop()
Gets called everytime the engine stops.
static string m_RightHeadlightTargetPoint
override void OnEngineStart()
Gets called everytime the engine starts.
void TailLightsShineOff()
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override bool OnBeforeLightOn()
override void OnUpdate(float dt)
ref EffVehicleSmoke m_coolantFx
old particles
int CheckOperationalRequirements()
override string GetVehicleType()
ref EffectSound m_WindowSmall
void PlayCrashHeavySound()
float GetBatteryConsumption()
string GetDoorSelectionNameFromSeatPos(int posIdx)
NoiseSystem m_NoiseSystem
VehicleHornComponent.
ref NoiseParams m_NoisePar
VehicleHornComponent.
void CreateCarDestroyedEffect()
float m_BatteryContinuousConsume
string m_CarHornShortSoundName
VehicleLightsComponent.
CarLightBase m_Headlight
DEPRECATED.
int GetCrewIndex(string selection)
string m_CarDoorCloseSound
override bool CanReleaseAttachment(EntityAI attachment)
override bool OnBeforeEngineStart()
string m_CarHornLongSoundName
VehicleHornComponent.
override void OnAttachmentRuined(EntityAI attachment)
string m_CarSeatShiftInSound
static const int SELECTION_ID_REVERSE_LIGHT_L
vector GetCoolantPtcPosWS()
vector Get_2_1PointPosWS()
void HandleSeatAdjustmentSound(string animSource, float phase)
override void OnVariablesSynchronized()
CarRearLightBase m_RearLight
VehicleLightsComponent.
ref VehicleLightsComponent m_LightsComponent
string m_EngineStartBattery
override void OnInput(float dt)
override bool DetectFlipped(VehicleFlippedContext ctx)
void CarPartsHealthCheck()
void SetCarHornState(int pState)
bool HasGangedTailAndBrakeLights()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
string GetActionCompNameCoolant()
override void EEItemDetached(EntityAI item, string slot_name)
CarLightBase CreateFrontLight()
void CheckContactCache()
Responsible for damaging the car according to contact events from OnContact.
void OnVehicleJumpOutServer(GetOutTransportActionData gotActionData)
override void OnAnimationPhaseStarted(string animSource, float phase)
static float DROWN_ENGINE_DAMAGE
void PlayCrashLightSound()
static const int SELECTION_ID_FRONT_LIGHT_R
string m_CarDoorOpenSound
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void HandleDoorsSound(string animSource, float phase)
void ReverseLightsShineOff()
const float BATTERY_UPDATE_DELAY
override event GetOwnerStateType()
override int GetFluidCapacityScript(ETransportFluid fluidType)
vector Get_1_2PointPosWS()
override void EEKilled(Object killer)
static const int SELECTION_ID_TAIL_LIGHT_R
float GetBatteryRuntimeConsumption()
ref EffectSound m_WindowLarge
ref EffVehicleSmoke m_exhaustFx
override void OnDriverExit(Human player)
static string m_RightHeadlightPoint
bool OnBeforeSwitchLights(bool toOn)
static vector m_DrownEnginePos
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
vector GetBackPointPosWS()
void SpawnUniversalParts()
string m_CarSeatShiftOutSound
float GetActionDistanceBrakes()
void AddAction(typename actionName)
string GetDoorConditionPointFromSelection(string selection)
string GetActionCompNameBrakes()
ref array< int > m_WheelSmokePtcFx
vector Get_2_2PointPosWS()
float GetPushForceCoefficientMultiplier()
void CheckVitalItem(bool isVital, int slotId)
override bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance=1.0)
CarRearLightBase CreateRearLight()
string GetDoorInvSlotNameFromSeatPos(int posIdx)
void SpawnAdditionalItems()
ref EffectSound m_PreStartSound
void RightFrontLightShineOn()
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
bool CanManipulateSpareWheel(string slotSelectionName)
void SetCarEngineSoundState(CarEngineSoundState pState)
vector GetFrontPointPosWS()
static const int SELECTION_ID_DASHBOARD_LIGHT
void DamageCrew(float dmg)
Responsible for damaging crew in a car crash.
void ForceUpdateLightsStart()
override void CleanupEffects()
override void EEOnCECreate()
override void UpdateLights(int new_gear=-1)
override bool IsInventoryVisible()
void BrakeLightsShineOff()
override void EOnPostSimulate(IEntity other, float timeSlice)
ref array< ref EffWheelSmoke > m_WheelSmokeFx
ref VehicleHornComponent m_HornComponent
TInputActionMap m_InputActionMap
void UpdateLightsClient(int newGear=-1)
int GetCarDoorsState(string slotType)
static const int SELECTION_ID_FRONT_LIGHT_L
float GetActionDistanceCoolant()
override string GetDoorConditionPointFromSelection(string selection)
override bool NeedElectricitySourceDevice()
override bool IsVitalGlowPlug()
override EntityAI GetElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override bool IsVitalRadiator()
override bool IsVitalSparkPlug()
override event void Write(PawnStateWriter ctx)
override event void Read(PawnStateReader ctx)
Super root of all classes in Enforce script.
static const int DAYZCAMERA_3RD_VEHICLE
generic vehicle 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)
static proto DebugTextWorldSpace CreateInWorld(string text, DebugTextFlags flags, vector transform[4], float size=20.0, int color=0xFFFFFFFF, int bgColor=0x00000000, int priority=1000)
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.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
script counterpart to engine's class Inventory
proto native bool IsControllingVehicle()
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
static proto bool GetSelectionForSlotId(int slot_Id, out string selection)
provides access to slot configuration
static bool IsActionLogEnable()
static const int HATCHBACK_COOLANT_OVERHEATED
static const int HATCHBACK_COOLANT_OVERHEATING
static const int HATCHBACK_EXHAUST_SMOKE
static int EffectRegister(Effect effect)
Registers Effect in SEffectManager.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Manager class for managing Effect (EffectParticle, EffectSound)
Base class for vehicle light profiles - all changeble parameters goes here.
void StopEffect(EVehicleVFXEffect effectId)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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.
Keffiyeh_LightBlue SetActions
DayZPlayerConstants
defined in C++
Serializer ParamsReadContext
const int CARS_FLUIDS_TICK
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< vector > TVectorArray
void Obsolete(string msg="")
EntityEvent
Entity events for event-mask, or throwing event from code.
const float DAMAGE_RUINED_VALUE
const float DAMAGE_DAMAGED_VALUE
const float LIQUID_THROUGHPUT_CAR_DEFAULT
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Min(float x, float y)
Returns smaller of two given values.
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 Pow(float v, float power)
Return power of v ^ power.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static proto float AbsFloat(float f)
Returns absolute value.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
@ 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 float VEHICLE_FLIP_ANGLE_TOLERANCE
const bool VEHICLE_FLIP_WHEELS_LIMITED
Angle of the vehicle from the normal of the surface under the vehicle.