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

Защищенные статические члены

static void SpawnObjects ()
 
static void SpawnObject (ITEM_SpawnerObject item)
 
static void OnGameplayDataHandlerLoad ()
 
static bool ValidatePath (string path)
 

Статические защищенные данные

static const ref TStringArray VALID_PATHS = {"DZ\\plants","DZ\\plants_bliss","DZ\\rocks","DZ\\rocks_bliss","DZ/plants","DZ/plants_bliss","DZ/rocks","DZ/rocks_bliss"}
 

Подробное описание

Методы

◆ OnGameplayDataHandlerLoad()

static void OnGameplayDataHandlerLoad ( )
inlinestaticprotected
64 {
66 GetGame().GetWorld().ProcessMarkedObjectsForPathgraphUpdate();
67 }
static void SpawnObjects()
Definition ObjectSpawner.c:5
proto native CGame GetGame()

Перекрестные ссылки GetGame() и SpawnObjects().

Используется в CGame::GlobalsInit().

◆ SpawnObject()

static void SpawnObject ( ITEM_SpawnerObject item)
inlinestaticprotected
28 {
30
31 float scale = item.scale;
32 if (scale == 0)
33 scale = 1;
34
35 if (item.name.Contains("\\") || item.name.Contains("/"))
36 {
37 if (ValidatePath(item.name))
38 object = GetGame().CreateStaticObjectUsingP3D(item.name, vector.ArrayToVec(item.pos), vector.ArrayToVec(item.ypr),scale);
39 }
40 else
41 {
43
44 if (item.enableCEPersistency)
45 {
46 flags &= ~ECE_DYNAMIC_PERSISTENCY;
47 flags &= ~ECE_NOLIFETIME;
48 }
49
50 object = GetGame().CreateObjectEx(item.name, vector.ArrayToVec(item.pos), flags, RF_IGNORE);
51 if (object)
52 {
53 object.SetOrientation( vector.ArrayToVec(item.ypr));
54 if (item.scale != 1)
55 object.SetScale(scale);
56 }
57 }
58
59 if (!object)
60 PrintToRPT("Object spawner failed to spawn "+item.name);
61 }
const int ECE_SETUP
Definition CentralEconomy.c:9
const int ECE_UPDATEPATHGRAPH
Definition CentralEconomy.c:13
const int RF_IGNORE
Definition CentralEconomy.c:56
const int ECE_DYNAMIC_PERSISTENCY
Definition CentralEconomy.c:32
const int ECE_NOLIFETIME
Definition CentralEconomy.c:29
const int ECE_CREATEPHYSICS
Definition CentralEconomy.c:16
Definition ObjectTyped.c:2
static bool ValidatePath(string path)
Definition ObjectSpawner.c:70
Definition EntityAI.c:95
Definition EnConvert.c:106
static vector ArrayToVec(float arr[])
Convert static array of floats into a vector.
Definition EnConvert.c:502
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...

Перекрестные ссылки vector::ArrayToVec(), ECE_CREATEPHYSICS, ECE_DYNAMIC_PERSISTENCY, ECE_NOLIFETIME, ECE_SETUP, ECE_UPDATEPATHGRAPH, GetGame(), PrintToRPT(), RF_IGNORE и ValidatePath().

Используется в SpawnObjects().

◆ SpawnObjects()

static void SpawnObjects ( )
inlinestaticprotected
6 {
8 {
10 foreach (string spawnerFilePath: arr)
11 {
12 string path = "$mission:" + spawnerFilePath;
13
14 string errorMessage;
17 {
18 foreach (ITEM_SpawnerObject o : spawner.Objects)
20 }
21 else
23 }
24 }
25 }
string path
Definition OptionSelectorMultistate.c:142
Definition CfgGameplayHandler.c:2
static TStringArray GetObjectSpawnersArr()
Definition CfgGameplayHandler.c:141
Definition ObjectSpawner.c:88
static void SpawnObject(ITEM_SpawnerObject item)
Definition ObjectSpawner.c:27
Definition ObjectSpawner.c:83
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, CfgGameplayHandler::GetObjectSpawnersArr(), path и SpawnObject().

Используется в OnGameplayDataHandlerLoad().

◆ ValidatePath()

static bool ValidatePath ( string path)
inlinestaticprotected
71 {
72 foreach (string p: VALID_PATHS)
73 {
74 if (path.Contains(p))
75 return true;
76 }
77 return false;
78 }
static const ref TStringArray VALID_PATHS
Definition ObjectSpawner.c:3
bool Contains(string sample)
Returns true if sample is substring of string.
Definition EnString.c:286

Перекрестные ссылки string::Contains(), path и VALID_PATHS.

Используется в SpawnObject().

Поля

◆ VALID_PATHS

const ref TStringArray VALID_PATHS = {"DZ\\plants","DZ\\plants_bliss","DZ\\rocks","DZ\\rocks_bliss","DZ/plants","DZ/plants_bliss","DZ/rocks","DZ/rocks_bliss"}
staticprotected
3{"DZ\\plants","DZ\\plants_bliss","DZ\\rocks","DZ\\rocks_bliss","DZ/plants","DZ/plants_bliss","DZ/rocks","DZ/rocks_bliss"};

Используется в ValidatePath().


Объявления и описания членов класса находятся в файле: