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

◆ SpawnEntityOnGroundPos()

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

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

6446 {
6447 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || !g_Game.IsMultiplayer())
6448 {
6449 bool is_AI = g_Game.IsKindOf(object_name, "DZ_LightAI");
6450 if (is_AI)
6451 {
6452 return SpawnAI(object_name, pos);
6453 }
6454 else
6455 {
6456 InventoryLocation inv_loc = new InventoryLocation;
6457 vector mtx[4];
6458 Math3D.MatrixIdentity4(mtx);
6459 mtx[3] = pos;
6460 inv_loc.SetGround(null, mtx);
6461
6462 int flags = ECE_PLACE_ON_SURFACE;
6463 #ifdef DEVELOPER
6464 if (g_Game.IsKindOf(object_name, "Boat"))
6465 flags = ECE_KEEPHEIGHT;
6466 #endif
6467
6468 return EntityAI.Cast(g_Game.CreateObjectEx(object_name, inv_loc.GetPos(), flags));
6469 }
6470 }
6471 return null;
6472 }
class LogManager EntityAI
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
const int ECE_KEEPHEIGHT
Определения CentralEconomy.c:27
DayZGame g_Game
Определения DayZGame.c:3942
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:6486
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1071
proto native DayZPlayerInstanceType GetInstanceType()

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

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