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

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)

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

119 {
120 super.OnStartServer(action_data);
121
122 if (GetGame().IsMultiplayer())
123 {
124 PlaceObjectActionData poActionData;
125 poActionData = PlaceObjectActionData.Cast(action_data);
126
127 if (!poActionData)
128 return;
129
130 EntityAI entity_for_placing = action_data.m_MainItem;
131 poActionData.m_Player.SetLocalProjectionPosition(poActionData.m_Position);
132 poActionData.m_Player.SetLocalProjectionOrientation(poActionData.m_Orientation);
133
134 if (action_data.m_MainItem)
135 {
136 poActionData.m_Player.PlacingStartServer(action_data.m_MainItem);
137
138 GetGame().AddActionJuncture(action_data.m_Player, entity_for_placing, 10000);
139 action_data.m_MainItem.SetIsBeingPlaced(true);
140 }
141 }
142 else
143 {
144 //local singleplayer
145 action_data.m_Player.PlacingStartServer(action_data.m_MainItem);
146 action_data.m_MainItem.SetIsBeingPlaced(true);
147 }
148
149 ItemBase item = ItemBase.Cast(action_data.m_MainItem);
150 if (item.GetPlaceSoundset() != string.Empty)
151 item.StartItemSoundServer(SoundConstants.ITEM_PLACE);
152
153 if (item.GetLoopDeploySoundset() != string.Empty)
154 item.StartItemSoundServer(SoundConstants.ITEM_DEPLOY_LOOP);
155 }
proto native bool AddActionJuncture(Man player, notnull EntityAI item, int timeout_ms)
Определения Building.c:6
override string GetLoopDeploySoundset()
Определения BarbedWire.c:397
Определения InventoryItem.c:731
vector m_Orientation
Определения ActionDeployBase.c:4
vector m_Position
Определения ActionDeployBase.c:3
proto native CGame GetGame()
static const string Empty
Определения EnString.c:7

Перекрестные ссылки ActionData, CGame::AddActionJuncture(), string::Empty, GetGame(), ItemBase::GetLoopDeploySoundset(), PlaceObjectActionData::m_Orientation и PlaceObjectActionData::m_Position.