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

◆ DropItem()

bool ManBase::DropItem ( ItemBase item)
inlineprotected

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

6275 {
6276 bool can_be_dropped = CanDropEntity(item);
6277 if (can_be_dropped)
6278 {
6279 can_be_dropped = PredictiveDropEntity(item);
6280 }
6281
6282 vector pos_spawn = GetPosition() + GetDirection();
6283 pos_spawn[0] = pos_spawn[0] + Math.RandomFloat(-0.2, 0.2);
6284 pos_spawn[2] = pos_spawn[2] + Math.RandomFloat(-0.2, 0.2);
6285
6286 item.SetPosition(pos_spawn);
6287 item.PlaceOnSurface();
6288 return can_be_dropped;
6289 }
override bool PredictiveDropEntity(notnull EntityAI item)
Определения PlayerBase.c:8404
override bool CanDropEntity(notnull EntityAI item)
Определения PlayerBase.c:841
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

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

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