DayZ 1.29
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 строка 8752

8753 {
8754 bool can_detach;
8755 if (CanRedirectToWeaponManager(item,can_detach))
8756 {
8757 if (can_detach)
8758 {
8759 vector m4[4];
8760 Math3D.MatrixIdentity4(m4);
8761
8763 GameInventory.PrepareDropEntityPos(this, item, m4, false, GameConstants.INVENTORY_ENTITY_DROP_OVERLAP_DEPTH);
8764 InventoryLocation il = new InventoryLocation;
8765 il.SetGround(item, m4);
8766 return GetWeaponManager().DetachMagazine(il);
8767 }
8768 return false;
8769 }
8770 return super.PredictiveDropEntity(item);
8771 }
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
override WeaponManager GetWeaponManager()
Определения PlayerBase.c:1989
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
Определения PlayerBase.c:8640
bool DetachMagazine(InventoryLocation invLoc, ActionBase control_action=NULL)
Определения WeaponManager.c:403

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

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