Saltwater path. This normalizes synced sea hits like <x, 0.546, z> back onto the sea plane.
Freshwater / pond path.
800 {
801 resolvedHitPosition = hitPosition;
803
805 return false;
806
809 {
810 vector normalizedSeaHit;
812 {
814 return false;
815
817 return false;
818
819 resolvedHitPosition = normalizedSeaHit;
821 return true;
822 }
823 }
824
827 {
828 vector surfacePos;
829 string surfaceType;
830 int detectedLiquidType;
831
833 {
835 return false;
836
838 return false;
839
840 resolvedHitPosition = surfacePos;
841 resolvedLiquidType = detectedLiquidType;
842 return true;
843 }
844 }
845
846 return false;
847 }
bool HasClearPathToLiquidSurface(PlayerBase player, vector surfacePos)
bool IsCursorActuallyOnLiquidSurface(vector hitPosition, vector liquidSurfacePos)
bool TryValidatePondHitPosition(vector playerPos, vector hitPosition, out vector surfacePos, out int liquidType, out string surfaceType, int expectedLiquidType=LIQUID_NONE)
bool IsNearlyZero(vector value)
int m_AllowedLiquidSource
bool TryGetNormalizedSeaHitPoint(vector playerPos, vector hitPosition, out vector normalizedHit)
const int LIQUID_FRESHWATER
const int LIQUID_SALTWATER