DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ EEItemDetached()

override void Car::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

См. определение в файле CarScript.c строка 545

546 {
547 switch (slot_name)
548 {
549 case "CarBattery":
550 case "TruckBattery":
551 m_BatteryHealth = -1;
552 if (IsServerOrOwner())
553 {
554 if (EngineIsOn())
555 {
556 EngineStop();
557 }
558 }
559
560 if (g_Game.IsServer())
561 {
562 LightOff();
563
564 UpdateBattery(ItemBase.Cast(item));
565 }
566 break;
567 case "SparkPlug":
568 case "GlowPlug":
569 m_PlugHealth = -1;
570 if (g_Game.IsServer() && EngineIsOn())
571 {
572 EngineStop();
573 }
574 break;
575 case "CarRadiator":
576 m_Radiator = null;
577 if (IsServerOrOwner())
578 {
579 LeakAll(CarFluid.COOLANT);
580 }
581
582 if (g_Game.IsServer())
583 {
584 if (m_DamageZoneMap.Contains("Radiator"))
585 {
586 SetHealth("Radiator", "Health", 0);
587 }
588 }
589 break;
590 }
591
592 if (g_Game.IsServer())
593 {
594 Synchronize();
595 }
596
598 UpdateLights();
599 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
Определения Car.c:18
void Synchronize()
Определения CombinationLock.c:205
DayZGame g_Game
Определения DayZGame.c:4074
class GP5GasMask extends MaskBase ItemBase
proto native void EngineStop()
Stops the engine.
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
proto native void LeakAll(MotorbikeFluid fluid)
Removes all the specified fluid from vehicle.
void UpdateHeadlightState()
Определения CarScript.c:522
void UpdateBattery(ItemBase battery)
Определения CarScript.c:2442
float m_PlugHealth
Определения CarScript.c:126
float m_BatteryHealth
Определения CarScript.c:125
override void UpdateLights(int new_gear=-1)
Определения CarScript.c:1853
bool IsServerOrOwner()
Определения CarScript.c:2592
EntityAI m_Radiator
Определения CarScript.c:128

Перекрестные ссылки EngineIsOn(), EngineStop(), g_Game, IsServerOrOwner(), LeakAll(), m_BatteryHealth, m_PlugHealth, m_Radiator, Synchronize(), UpdateBattery(), UpdateHeadlightState() и UpdateLights().