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

◆ SpawnItems()

void SpawnItems ( )
protected

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

171 {
172 //Print("---------============ Spawning items at pos:"+m_Position);
173 foreach (int j, string type : SPAWN_ITEM_TYPE)
174 {
175 //Print("----------------------------------");
176 for (int i = 0; i < SPAWN_ITEM_COUNT[j]; ++i)
177 {
178 vector randomDir2d = vector.RandomDir2D();
180 vector spawnPos = m_Position + (randomDir2d * randomDist);
182 vector mat[4];
184 mat[3] = spawnPos;
185 il.SetGround(NULL, mat);
186 //Print("Spawning item:"+ type + " at position:" + il.GetPos());
187 GetGame().CreateObjectEx(type, il.GetPos(), ECE_PLACE_ON_SURFACE);
188 }
189 }
190 }
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
const ref array< string > SPAWN_ITEM_TYPE
Определения ContaminatedArea_Dynamic.c:37
const ref array< int > SPAWN_ITEM_COUNT
Определения ContaminatedArea_Dynamic.c:38
const ref array< float > SPAWN_ITEM_RAD_MIN
Определения ContaminatedArea_Dynamic.c:39
const ref array< float > SPAWN_ITEM_RAD_MAX
Определения ContaminatedArea_Dynamic.c:40
vector m_Position
Cached world position.
Определения Effect.c:43
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
InventoryLocation.
Определения InventoryLocation.c:29
Определения EnMath3D.c:28
Определения EnMath.c:7
static vector RandomDir2D()
Returns randomly generated XZ unit vector with the Y(up) axis set to 0.
Определения EnConvert.c:260
Определения EnConvert.c:106
proto native CGame GetGame()
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Определения EnMath3D.c:256
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:106

Перекрестные ссылки CGame::CreateObjectEx(), ECE_PLACE_ON_SURFACE, GetGame(), m_Position, Math3D::MatrixIdentity4(), vector::RandomDir2D(), Math::RandomFloatInclusive(), SPAWN_ITEM_COUNT, SPAWN_ITEM_RAD_MAX, SPAWN_ITEM_RAD_MIN и SPAWN_ITEM_TYPE.

Используется в InitZoneServer(), OnFinishProgressServer() и PerformRecipe().