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

◆ IsPlaceable()

bool ItemBase::IsPlaceable ( )
inlineprotected

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

838 {
839 if ( GetGame().IsServer() )
840 {
841 InventoryLocation loc = new InventoryLocation();
842 GetInventory().GetCurrentInventoryLocation(loc);
843 if (loc.GetType() == InventoryLocationType.HANDS)
844 {
845 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
846
847 vector player_pos = player.GetPosition();
848 vector aim_pos = player.GetAimPosition();
849
850 if ( vector.DistanceSq(player_pos, aim_pos) <= ( 1.5 * 1.5 ) )
851 {
852 return IsPlaceableAtPosition( aim_pos );
853 }
854 }
855 }
856
857 return false;
858 }
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().