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

◆ OnExecuteServer()

override void ActionCreateIndoorFireplace::OnExecuteServer ( ActionData action_data)
inlineprivate

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

64 {
65 BuildingWithFireplace building = BuildingWithFireplace.Cast(action_data.m_Target.GetObject());
66 int index = action_data.m_Player.GetLastFirePointIndex();
67 //action_data
68 Object obj = GetGame().CreateObjectEx(building.GetFireplaceType(index), action_data.m_Player.GetLastFirePoint(), ECE_PLACE_ON_SURFACE);
69
70 int m_FirePointIndex = action_data.m_Player.GetLastFirePointIndex();
71 float m_FireplaceRot = action_data.m_Player.GetLastFirePointRot();
72 vector smoke_point_pos = action_data.m_Target.GetObject().GetSelectionPositionMS(FireplaceIndoor.FIREPOINT_SMOKE_POSITION + m_FirePointIndex.ToString());
73 vector smoke_point_pos_world = action_data.m_Target.GetObject().ModelToWorld(smoke_point_pos);
74 vector m_SmokePosition = smoke_point_pos_world;
75
76 FireplaceIndoor fp_indoor = FireplaceIndoor.Cast(obj);
77 if ( fp_indoor )
78 {
81
82 vector fprot = vector.Zero;
83 fprot[0] = m_FireplaceRot;
84 fp_indoor.SetOrientation(fprot);
85
86 fp_indoor.Synchronize();
87
88 //move item to target fireplace
89 if (!GetGame().IsMultiplayer())
90 {
91 ClearInventoryReservationEx(action_data);
92 action_data.m_Player.LocalTakeEntityToTargetAttachment(fp_indoor, action_data.m_MainItem);
93 }
94 else
95 action_data.m_Player.ServerTakeEntityToTargetAttachment(fp_indoor, action_data.m_MainItem);
96 }
97 }
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
string GetFireplaceType(int firePointIndex)
Определения BuildingWithFireplace.c:7
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
void SetSmokePointPosition(vector smoke_point_pos)
Определения FireplaceIndoor.c:130
void SetFirePointIndex(int fire_point_index)
Определения FireplaceIndoor.c:99
class LOD Object
proto native CGame GetGame()

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