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

◆ UpdateDoorStateClient()

void Land_WarheadStorage_Main::UpdateDoorStateClient ( )
inlineprotected

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

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

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

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