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

◆ DropItem()

bool ManBase::DropItem ( ItemBase item)
inlineprotected

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

6819 {
6820 bool can_be_dropped = CanDropEntity(item);
6821 if (can_be_dropped)
6822 {
6823 can_be_dropped = PredictiveDropEntity(item);
6824 }
6825
6826 vector pos_spawn = GetPosition() + GetDirection();
6827 pos_spawn[0] = pos_spawn[0] + Math.RandomFloat(-0.2, 0.2);
6828 pos_spawn[2] = pos_spawn[2] + Math.RandomFloat(-0.2, 0.2);
6829
6830 item.SetPosition(pos_spawn);
6831 item.PlaceOnSurface();
6832 return can_be_dropped;
6833 }
override bool PredictiveDropEntity(notnull EntityAI item)
Определения PlayerBase.c:9104
override bool CanDropEntity(notnull EntityAI item)
Определения PlayerBase.c:1010
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки CanDropEntity(), GetPosition(), PredictiveDropEntity() и Math::RandomFloat().

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