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

◆ UpdateDoorStateClient()

void Land_WarheadStorage_Main::UpdateDoorStateClient ( )
inlineprotected

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

301 {
302 for (int index = 1; index <= 4; index++)
303 {
304 int bit = 1 << (index - 1);
305 int doorIndex = GetDoorIndexByLeverIndex(index);
306 int lightId = GetStorageLightIndexByDoor(doorIndex);
307
308 if ( ((bit & m_LeverStatesBits) != 0) && m_HasPower )
309 {
310 if (!m_StorageDoorLights[lightId])
311 {
312 m_StorageDoorLights[lightId] = WarheadStorageLight.Cast(ScriptedLightBase.CreateLightAtObjMemoryPoint(WarheadStorageLight, this, "lamp" + (lightId + 1).ToString() + "_pos"));
313 m_StorageDoorLights[lightId].SetSelectionID(GetHiddenSelectionIndex(LAMP_SELECTION + (lightId + 1).ToString()));
314 m_StorageDoorLights[lightId].UpdateLightSourceMaterial(WarheadStorageLight.LIGHT_MAT_ON);
315 }
316 }
317 else
318 {
319 if (m_StorageDoorLights[lightId])
320 {
321 m_StorageDoorLights[lightId].UpdateLightSourceMaterial(WarheadStorageLight.LIGHT_MAT_OFF);
322 m_StorageDoorLights[lightId].Destroy();
323 }
324 }
325 }
326 }
proto string ToString()
const string LAMP_SELECTION
Определения Land_WarheadStorage_Main.c:27
int GetStorageLightIndexByDoor(int doorIndex)
Определения Land_WarheadStorage_Main.c:328
WarheadStorageLight m_StorageDoorLights[4]
Определения Land_WarheadStorage_Main.c:5
int GetDoorIndexByLeverIndex(int LeverIndex)
Определения Land_WarheadStorage_Main.c:333

Перекрестные ссылки GetDoorIndexByLeverIndex(), GetStorageLightIndexByDoor(), LAMP_SELECTION, m_HasPower, m_LeverStatesBits, m_StorageDoorLights и ToString().

Используется в OnVariablesSynchronized().