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

◆ PredictiveDropEntity()

override bool ManBase::PredictiveDropEntity ( notnull EntityAI item)
inlineprotected

We don't care if a valid transform couldn't be found, we just want to preferably use it instead of placing on the player

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

8503 {
8504 bool can_detach;
8505 if (CanRedirectToWeaponManager(item,can_detach))
8506 {
8507 if (can_detach)
8508 {
8509 vector m4[4];
8510 Math3D.MatrixIdentity4(m4);
8511
8513 GameInventory.PrepareDropEntityPos(this, item, m4, false, GameConstants.INVENTORY_ENTITY_DROP_OVERLAP_DEPTH);
8514 InventoryLocation il = new InventoryLocation;
8515 il.SetGround(item, m4);
8516 return GetWeaponManager().DetachMagazine(il);
8517 }
8518 return false;
8519 }
8520 return super.PredictiveDropEntity(item);
8521 }
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
override WeaponManager GetWeaponManager()
Определения PlayerBase.c:1859
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
Определения PlayerBase.c:8390
bool DetachMagazine(InventoryLocation invLoc, ActionBase control_action=NULL)
Определения WeaponManager.c:402

Перекрестные ссылки CanRedirectToWeaponManager(), GetWeaponManager(), GameConstants::INVENTORY_ENTITY_DROP_OVERLAP_DEPTH, Math3D::MatrixIdentity4(), GameInventory::PrepareDropEntityPos() и InventoryLocation::SetGround().

Используется в CheckMeleeItemDamage(), DropItem() и PhysicalPredictiveDropItem().