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

◆ OnExecuteServer()

override void ActionCreateIndoorOven::OnExecuteServer ( ActionData action_data)
inlineprivate

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

64 {
65 Object obj = GetGame().CreateObjectEx( "OvenIndoor", action_data.m_Player.GetLastFirePoint(), ECE_PLACE_ON_SURFACE );
66
67 int m_FirePointIndex = action_data.m_Player.GetLastFirePointIndex();
68 float m_FireplaceRot = action_data.m_Player.GetLastFirePointRot();
69 vector smoke_point_pos = action_data.m_Target.GetObject().GetSelectionPositionMS( OvenIndoor.OVENPOINT_SMOKE_POSITION + m_FirePointIndex.ToString() );
70 vector smoke_point_pos_world = action_data.m_Target.GetObject().ModelToWorld( smoke_point_pos );
71 vector m_SmokePosition = smoke_point_pos_world;
72
73 OvenIndoor fp_indoor = OvenIndoor.Cast( obj );
74 if ( fp_indoor )
75 {
76 fp_indoor.SetFirePointIndex( m_FirePointIndex );
77 fp_indoor.SetSmokePointPosition( m_SmokePosition );
78
79 vector fprot = vector.Zero;
80 fprot[0] = m_FireplaceRot;
81 fp_indoor.SetOrientation( fprot );
82
83 fp_indoor.Synchronize();
84
85 //move item to target fireplace
86 if (!GetGame().IsMultiplayer())
87 {
88 ClearInventoryReservationEx(action_data);
89 action_data.m_Player.LocalTakeEntityToTargetAttachment(fp_indoor, action_data.m_MainItem);
90 }
91 else
92 action_data.m_Player.ServerTakeEntityToTargetAttachment(fp_indoor, action_data.m_MainItem);
93 }
94 }
ActionPlaceFireplaceIndoor m_FirePointIndex
vector m_SmokePosition
Определения ActionPlaceFireplaceIndoor.c:86
float m_FireplaceRot
Определения ActionPlaceFireplaceIndoor.c:85
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
void ClearInventoryReservationEx(ActionData action_data)
Определения ActionBase.c:1025
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
class LOD Object
proto native CGame GetGame()

Перекрестные ссылки ActionData, ActionBase::ClearInventoryReservationEx(), CGame::CreateObjectEx(), ECE_PLACE_ON_SURFACE, GetGame(), m_FireplaceRot, m_FirePointIndex, m_SmokePosition и vector::Zero.