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

◆ DrawItems()

static void ScriptConsoleItemsTab::DrawItems ( string type,
float distance = 0 )
inlinestaticprotected

need better logic for cleaning

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

294 {
295 if (!distance)
296 {
297 distance = DRAW_DISTANCE;
298 }
299 array<Object> objects = new array<Object>;
300 array<CargoBase> proxies = new array<CargoBase>;
301
302 GetGame().GetObjectsAtPosition(GetGame().GetPlayer().GetPosition(), distance, objects, proxies);
303 int i = 0;
304 foreach (Object o: objects)
305 {
306 if (o.IsKindOf(type))
307 {
308 i++;
309 ScriptConsole.m_MarkedEntities.Insert(new MapMarker(o.GetPosition(),"",COLOR_RED,eMapMarkerTypes.MARKERTYPE_MAP_BORDER_CROSS));
310 Shape shape = Shape.CreateSphere(COLOR_RED, ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE|ShapeFlags.NOZBUFFER, o.GetPosition() + "0 30 0", 1);
311 vector lines[2];
312 lines[0] = o.GetPosition();
313 lines[1] = o.GetPosition() + "0 30 0";
314 Shape line = Shape.CreateLines(COLOR_RED, ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE|ShapeFlags.NOZBUFFER, lines, 2);
315 m_DebugShapes.Insert(shape);
316 m_DebugShapes.Insert(line);
317 }
318 }
319
321 //GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLaterByName(this, "DrawItemsClear", 5000);
322 Debug.Log(string.Format("found %1 instances of type %1", i, type));
323 }
PlayerBase GetPlayer()
Определения ModifierBase.c:51
void Debug()
Определения UniversalTemperatureSource.c:349
proto native void GetObjectsAtPosition(vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
Returns list of all objects in circle "radius" around position "pos".
static ref array< Shape > m_DebugShapes
Определения ScriptConsoleItemsTab.c:14
static float DRAW_DISTANCE
Определения ScriptConsoleItemsTab.c:9
class LOD Object
proto native CGame GetGame()
const int COLOR_RED
Определения constants.c:64
ShapeFlags
Определения EnDebug.c:126
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки COLOR_RED, DRAW_DISTANCE, GetGame(), CGame::GetObjectsAtPosition(), GetPlayer(), GetPosition, Debug::Log(), m_DebugShapes и Shape.

Используется в OnClick() и OnKeyDown().