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

◆ Start()

override void ActionEnterLadder::Start ( ActionData action_data)
inlineprivate

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

114 {
115 super.Start( action_data );
116 Building b;
117 Class.CastTo(b, action_data.m_Target.GetObject());
118
119 if (b)
120 {
121 string compName = b.GetActionComponentName( action_data.m_Target.GetComponentIndex() );
122 int ladderIndex = HumanCommandLadder.DebugGetLadderIndex(compName);
123
124 LOD geomLod = action_data.m_Target.GetObject().GetLODByName(GEOM_LOD_NAME);
125 string ladderType = "metal";
126
127 for (int i = 0; i < geomLod.GetPropertyCount(); ++i)
128 {
129 if (geomLod.GetPropertyName(i) == "laddertype")
130 {
131 ladderType = geomLod.GetPropertyValue(i);
132 break;
133 }
134 }
135
136 action_data.m_Player.SetClimbingLadderType(ladderType);
137 action_data.m_Player.StartCommand_Ladder(b, ladderIndex );
138 }
139
140
141 /* if( GetGame().IsServer() )
142 {
143 OnStartServer(action_data);
144 }
145 else
146 {
147 OnStartClient(action_data);
148 }*/
149 }
const string GEOM_LOD_NAME
Определения ActionEnterLadder.c:4
proto native owned string GetPropertyValue(int index)
proto native int GetPropertyCount()
proto native owned string GetPropertyName(int index)
void HumanCommandLadder()
Определения human.c:674

Перекрестные ссылки ActionData, Class::CastTo(), HumanCommandLadder::DebugGetLadderIndex(), GEOM_LOD_NAME, LOD::GetPropertyCount(), LOD::GetPropertyName() и LOD::GetPropertyValue().