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

◆ DropItem()

bool ManBase::DropItem ( ItemBase item)
inlineprotected

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

6267 {
6268 bool can_be_dropped = CanDropEntity(item);
6269 if (can_be_dropped)
6270 {
6271 can_be_dropped = PredictiveDropEntity(item);
6272 }
6273
6274 vector pos_spawn = GetPosition() + GetDirection();
6275 pos_spawn[0] = pos_spawn[0] + Math.RandomFloat(-0.2, 0.2);
6276 pos_spawn[2] = pos_spawn[2] + Math.RandomFloat(-0.2, 0.2);
6277
6278 item.SetPosition(pos_spawn);
6279 item.PlaceOnSurface();
6280 return can_be_dropped;
6281 }
override bool PredictiveDropEntity(notnull EntityAI item)
Определения PlayerBase.c:8502
override bool CanDropEntity(notnull EntityAI item)
Определения PlayerBase.c:841
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

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

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