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

◆ OnStartServer()

override void ActionOpenDoors::OnStartServer ( ActionData action_data)
inlineprotected

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

54 {
55 super.OnStartServer(action_data);
56
57 Building building;
58 if (Class.CastTo(building, action_data.m_Target.GetObject()))
59 {
60 int doorIndex = building.GetDoorIndex(action_data.m_Target.GetComponentIndex());
61 if (doorIndex != -1)
62 {
63 if (building.CanDoorBeOpened(doorIndex, CheckIfDoorIsLocked()))
64 {
65 building.OpenDoor(doorIndex);
66 }
67 }
68 }
69 }
bool CheckIfDoorIsLocked()
Определения ActionOpenDoors.c:18
proto native void OpenDoor(int index)
Attempts to open the door.
bool CanDoorBeOpened(int doorIndex, bool checkIfLocked=false)
proto native int GetDoorIndex(int componentIndex)
Gets the index of the door based on the view geometry component index.

Перекрестные ссылки ActionData, Building::CanDoorBeOpened(), Class::CastTo(), CheckIfDoorIsLocked(), Building::GetDoorIndex() и Building::OpenDoor().