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

◆ SpawnEntityOnGroundPos()

override EntityAI ManBase::SpawnEntityOnGroundPos ( string object_name,
vector pos )
inlineprotected

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

6215 {
6216 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || !GetGame().IsMultiplayer())
6217 {
6218 bool is_AI = GetGame().IsKindOf(object_name, "DZ_LightAI");
6219 if (is_AI)
6220 {
6221 return SpawnAI(object_name, pos);
6222 }
6223 else
6224 {
6225 InventoryLocation inv_loc = new InventoryLocation;
6226 vector mtx[4];
6227 Math3D.MatrixIdentity4(mtx);
6228 mtx[3] = pos;
6229 inv_loc.SetGround(null, mtx);
6230
6231 int flags = ECE_PLACE_ON_SURFACE;
6232 #ifdef DEVELOPER
6233 if (g_Game.IsKindOf(object_name, "Boat"))
6234 flags = ECE_KEEPHEIGHT;
6235 #endif
6236
6237 return EntityAI.Cast(GetGame().CreateObjectEx(object_name, inv_loc.GetPos(), flags));
6238 }
6239 }
6240 return null;
6241 }
class LogManager EntityAI
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
const int ECE_KEEPHEIGHT
Определения CentralEconomy.c:27
DayZGame g_Game
Определения DayZGame.c:3868
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
Определения Global/game.c:1394
proto native vector GetPos()
returns position of item in world if type is Ground
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
EntityAI SpawnAI(string object_name, vector pos)
Определения PlayerBase.c:6255
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1068
proto native DayZPlayerInstanceType GetInstanceType()
proto native CGame GetGame()

Перекрестные ссылки ECE_KEEPHEIGHT, ECE_PLACE_ON_SURFACE, g_Game, GetGame(), GetInstanceType(), InventoryLocation::GetPos(), CGame::IsKindOf(), Math3D::MatrixIdentity4(), InventoryLocation::SetGround() и SpawnAI().

Используется в CreateCopyOfItemInInventoryOrGroundEx(), SpawnEntityOnGroundOnCursorDir() и SpawnEntityOnGroundRaycastDispersed().