DayZ 1.27
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 строка 8404

8405 {
8406 bool can_detach;
8407 if (CanRedirectToWeaponManager(item,can_detach))
8408 {
8409 if (can_detach)
8410 {
8411 vector m4[4];
8412 Math3D.MatrixIdentity4(m4);
8413
8415 GameInventory.PrepareDropEntityPos(this, item, m4, false, GameConstants.INVENTORY_ENTITY_DROP_OVERLAP_DEPTH);
8416 InventoryLocation il = new InventoryLocation;
8417 il.SetGround(item, m4);
8418 return GetWeaponManager().DetachMagazine(il);
8419 }
8420 return false;
8421 }
8422 return super.PredictiveDropEntity(item);
8423 }
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:8292
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().