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

◆ IsPlaceable()

bool ItemBase::IsPlaceable ( )
inlineprotected

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

808 {
809 if ( GetGame().IsServer() )
810 {
811 InventoryLocation loc = new InventoryLocation();
812 GetInventory().GetCurrentInventoryLocation(loc);
813 if (loc.GetType() == InventoryLocationType.HANDS)
814 {
815 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
816
817 vector player_pos = player.GetPosition();
818 vector aim_pos = player.GetAimPosition();
819
820 if ( vector.DistanceSq(player_pos, aim_pos) <= ( 1.5 * 1.5 ) )
821 {
822 return IsPlaceableAtPosition( aim_pos );
823 }
824 }
825 }
826
827 return false;
828 }
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native int GetType()
returns type of InventoryLocation
bool IsPlaceableAtPosition(vector position)
Определения TrapSpawnBase.c:205
proto native CGame GetGame()

Перекрестные ссылки vector::DistanceSq(), GetGame(), InventoryLocation::GetType() и TrapSpawnBase::IsPlaceableAtPosition().