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

◆ UpdateDoorStateClient()

void Land_WarheadStorage_Main::UpdateDoorStateClient ( )
inlineprotected

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

258 {
259 for (int index = 1; index <= 4; index++)
260 {
261 int bit = 1 << (index - 1);
262 int doorIndex = GetDoorIndexByLeverIndex(index);
263 int lightId = GetStorageLightIndexByDoor(doorIndex);
264
265 if ( ((bit & m_LeverStatesBits) != 0) && m_HasPower )
266 {
267 if (!m_StorageDoorLights[lightId])
268 {
269 m_StorageDoorLights[lightId] = WarheadStorageLight.Cast(ScriptedLightBase.CreateLightAtObjMemoryPoint(WarheadStorageLight, this, "lamp" + (lightId + 1).ToString() + "_pos"));
270 m_StorageDoorLights[lightId].SetSelectionID(GetHiddenSelectionIndex(LAMP_SELECTION + (lightId + 1).ToString()));
271 m_StorageDoorLights[lightId].UpdateLightSourceMaterial(WarheadStorageLight.LIGHT_MAT_ON);
272 }
273 }
274 else
275 {
276 if (m_StorageDoorLights[lightId])
277 {
278 m_StorageDoorLights[lightId].UpdateLightSourceMaterial(WarheadStorageLight.LIGHT_MAT_OFF);
279 m_StorageDoorLights[lightId].Destroy();
280 }
281 }
282 }
283 }
proto string ToString()
const string LAMP_SELECTION
Определения Land_WarheadStorage_Main.c:27
int GetStorageLightIndexByDoor(int doorIndex)
Определения Land_WarheadStorage_Main.c:285
WarheadStorageLight m_StorageDoorLights[4]
Определения Land_WarheadStorage_Main.c:5
int GetDoorIndexByLeverIndex(int LeverIndex)
Определения Land_WarheadStorage_Main.c:290

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

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