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

◆ SpawnEntityOnGroundPos()

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

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

6223 {
6224 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || !GetGame().IsMultiplayer())
6225 {
6226 bool is_AI = GetGame().IsKindOf(object_name, "DZ_LightAI");
6227 if (is_AI)
6228 {
6229 return SpawnAI(object_name, pos);
6230 }
6231 else
6232 {
6233 InventoryLocation inv_loc = new InventoryLocation;
6234 vector mtx[4];
6235 Math3D.MatrixIdentity4(mtx);
6236 mtx[3] = pos;
6237 inv_loc.SetGround(null, mtx);
6238
6239 int flags = ECE_PLACE_ON_SURFACE;
6240 #ifdef DEVELOPER
6241 if (g_Game.IsKindOf(object_name, "Boat"))
6242 flags = ECE_KEEPHEIGHT;
6243 #endif
6244
6245 return EntityAI.Cast(GetGame().CreateObjectEx(object_name, inv_loc.GetPos(), flags));
6246 }
6247 }
6248 return null;
6249 }
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.
Определения Game.c:1339
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:6263
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().