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

◆ IsCachedSyntheticCursorRelevant()

bool CCTLiquid::IsCachedSyntheticCursorRelevant ( vector currentHitPosition,
vector cachedHitPosition )
inlineprotected

If there is a current real hit, cached point must be near that hit. If it is not, do not let an old water point keep the action alive.

If there is no real hit, compare cached point to current camera ray.

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

913 {
914 if (cachedHitPosition == vector.Zero)
915 return false;
916
918
920 if (currentHitPosition != vector.Zero)
921 {
922 return vector.DistanceSq(currentHitPosition, cachedHitPosition) <= aimToleranceSq;
923 }
924
927 }
static const float SYNTHETIC_CURSOR_CACHE_AIM_TOLERANCE
Определения CCTLiquid.c:12
bool IsPositionNearCurrentCameraRay(vector position, float maxPerpendicularDistance)
Определения CCTLiquid.c:877

Перекрестные ссылки vector::DistanceSq(), IsPositionNearCurrentCameraRay(), SYNTHETIC_CURSOR_CACHE_AIM_TOLERANCE и vector::Zero.

Используется в TryUseCachedSyntheticCursor().