DayZ 1.30
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 строка 9104

9105 {
9106 bool can_detach;
9107 if (CanRedirectToWeaponManager(item,can_detach))
9108 {
9109 if (can_detach)
9110 {
9111 vector m4[4];
9112 Math3D.MatrixIdentity4(m4);
9113
9115 GameInventory.PrepareDropEntityPos(this, item, m4, false, GameConstants.INVENTORY_ENTITY_DROP_OVERLAP_DEPTH);
9116 InventoryLocation il = new InventoryLocation;
9117 il.SetGround(item, m4);
9118 return GetWeaponManager().DetachMagazine(il);
9119 }
9120 return false;
9121 }
9122 return super.PredictiveDropEntity(item);
9123 }
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
override WeaponManager GetWeaponManager()
Определения PlayerBase.c:2047
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
Определения PlayerBase.c:8992
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().