121 {
123 if ( target.GetObject() )
124 {
125 liquidType = target.GetObject().GetLiquidSourceType();
126 }
127 else
128 {
129 string surfaceType;
130 vector hit_pos = target.GetCursorHitPos();
132 if (surfaceType == "")
133 {
134 if ( hit_pos[1] <=
g_Game.SurfaceGetSeaLevel() + 0.001 )
135 {
137 }
138 }
139 else
140 {
141 liquidType =
SurfaceInfo.GetByName(surfaceType).GetLiquidType();
142 }
143 }
144
146 }
proto float SurfaceGetType3D(float x, float y, float z, out string type)
Y input: Maximum Y to trace down from; Returns: Y position the surface was found.
proto native CGame GetGame()
const int LIQUID_SALTWATER