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

◆ PlayerCheckRequestSrc()

bool PlayerCheckRequestSrc ( notnull InventoryLocation src,
float radius )
protected

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

2815 {
2816 bool result = true;
2817
2818 EntityAI ent = src.GetParent();
2819 if ( ent )
2820 {
2821 PlayerBase player = PlayerBase.Cast(ent.GetHierarchyRootPlayer());
2822 if (player)
2823 {
2824 if ( GetDayZPlayerOwner() != player )
2825 {
2826 if (player.IsAlive())
2827 {
2828 if (!player.IsRestrained() && !player.IsUnconscious())
2829 {
2830 return false;
2831 }
2832 }
2833 }
2834 }
2835 }
2836
2837 if ( result )
2838 {
2839 result = CheckRequestSrc( GetManOwner(), src, radius);
2840 }
2841
2842 if (result)
2843 {
2844 EntityAI item = src.GetItem().GetHierarchyRoot();
2845 EntityAI root = item.GetHierarchyRoot();
2846 result = vector.Distance(GetManOwner().GetPosition(), item.GetPosition()) < (radius + root.GetCollisionRadius());
2847 }
2848
2849 return result;
2850 }
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:167
bool CheckRequestSrc()
Определения Hand_Events.c:107
Определения PlayerBaseClient.c:2
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:119
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки CheckRequestSrc(), vector::Distance(), GetDayZPlayerOwner() и GetPosition().

Используется в ValidateDestroy(), ValidateSwap() и ValidateSyncMove().