Use detected liquid as the source of truth.
If caller expected a specific liquid mask/type, require compatibility.
721 {
722 surfacePos = vector.Zero;
724 surfaceType = string.Empty;
725
727 return false;
728
730 return false;
731
732 if (!
g_Game.SurfaceIsPond(hitPosition[0], hitPosition[2]))
733 return false;
734
735 int detectedLiquidType;
737 return false;
738
740 liquidType = detectedLiquidType;
741
743 if (expectedLiquidType !=
LIQUID_NONE && (liquidType & expectedLiquidType) == 0)
744 return false;
745
747 return false;
748
749 float hitToSurfaceHeight = Math.AbsFloat(hitPosition[1] - surfacePos[1]);
751 return false;
752
753 return true;
754 }
bool IsNearlyZero(vector value)
bool TryGetLiquidSurfaceAt(vector probePosition, out vector surfacePosition, out int liquidType, out string surfaceType)
bool IsAllowedPondLiquidSurface(vector playerPos, vector surfacePos, int liquidType)
float m_MaxActionDistance
static const float SYNTHETIC_POND_SURFACE_TOLERANCE