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

◆ DropItem()

bool ManBase::DropItem ( ItemBase item)
inlineprotected

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

6498 {
6499 bool can_be_dropped = CanDropEntity(item);
6500 if (can_be_dropped)
6501 {
6502 can_be_dropped = PredictiveDropEntity(item);
6503 }
6504
6505 vector pos_spawn = GetPosition() + GetDirection();
6506 pos_spawn[0] = pos_spawn[0] + Math.RandomFloat(-0.2, 0.2);
6507 pos_spawn[2] = pos_spawn[2] + Math.RandomFloat(-0.2, 0.2);
6508
6509 item.SetPosition(pos_spawn);
6510 item.PlaceOnSurface();
6511 return can_be_dropped;
6512 }
override bool PredictiveDropEntity(notnull EntityAI item)
Определения PlayerBase.c:8752
override bool CanDropEntity(notnull EntityAI item)
Определения PlayerBase.c:979
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

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

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