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

◆ CanPlaceFireplaceInSelectedSpot()

static bool FireplaceBase::CanPlaceFireplaceInSelectedSpot ( Object building,
int fire_point_index,
out vector fire_point_pos_world,
out vector fire_point_rot_world )
inlinestaticprotected

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

104 {
105 //Get fire point index position
106 vector fire_point_pos = building.GetSelectionPositionMS( OVENPOINT_FIRE_POSITION + fire_point_index.ToString() );
107 vector fire_point_rot = building.GetSelectionPositionMS( OVENPOINT_PLACE_ROT + fire_point_index.ToString() );
108 fire_point_pos_world = building.ModelToWorld( fire_point_pos );
109 fire_point_rot_world = building.ModelToWorld( fire_point_rot );
110
111 //check if there is any FireplaceIndoor objects near selected fire point
112 ref array<Object> nearest_objects = new array<Object>;
113 ref array<CargoBase> proxy_cargos = new array<CargoBase>;
114 GetGame().GetObjectsAtPosition3D( fire_point_pos_world, 1, nearest_objects, proxy_cargos );
115
116 for ( int i = 0; i < nearest_objects.Count(); ++i )
117 {
118 Object object = nearest_objects.Get( i );
119
120 if ( object.IsInherited( OvenIndoor ) )
121 {
122 return false;
123 }
124 }
125
126 return true;
127 }
proto native void GetObjectsAtPosition3D(vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
Returns list of all objects in sphere "radius" around position "pos".
void OvenIndoor()
Определения OvenIndoor.c:13
static const string OVENPOINT_PLACE_ROT
Определения OvenIndoor.c:10
static const string OVENPOINT_FIRE_POSITION
Определения OvenIndoor.c:9
class LOD Object
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CGame::GetObjectsAtPosition3D(), OvenIndoor(), OVENPOINT_FIRE_POSITION и OVENPOINT_PLACE_ROT.