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

◆ UpdateGlowState()

void PumpkinHelmet::UpdateGlowState ( )
inlineprivate

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

50 {
51 // Makes sure PumpkinHelmet doesn't glow when it's attached on head, or it's inside cargo.
52
53 bool do_glow = true;
54
55 if ( IsDamageDestroyed() )
56 {
57 do_glow = false;
58 }
59 else
60 {
61 int id = InventorySlots.HEADGEAR;
62 InventoryLocation IL = new InventoryLocation();
63 GetInventory().GetCurrentInventoryLocation( IL );
64
65 int id_2 = IL.GetSlot();
66 int id_cargo = IL.GetIdx();
67
68 if ( id == id_2) // Pumpkin is attached on head
69 do_glow = false;
70
71 if ( id_cargo != -1 ) // Pumpkin is in cargo
72 do_glow = false;
73 }
74
75 SetPilotLight(do_glow);
76 }
bool IsDamageDestroyed(ActionTarget target)
Определения ActionBase.c:1275
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo

Перекрестные ссылки InventoryLocation::GetIdx(), InventoryLocation::GetSlot() и IsDamageDestroyed().

Используется в EEHealthLevelChanged(), EOnInit(), OnItemLocationChanged(), OnMovedInsideCargo(), OnMovedWithinCargo() и OnRemovedFromCargo().