+ float supercontents;
+ float nativecontents;
+ vector point;
+
+ point = ent.move_origin;
+ point_z += (ent.mins_z + 1);
+
+ nativecontents = pointcontents(point);
+
+ if(ent.move_watertype)
+ if(ent.move_watertype != nativecontents)
+ {
+ //print(sprintf("_Movetype_CheckWater(): Original: '%d', New: '%d'\n", ent.move_watertype, nativecontents));
+ if(ent.contentstransition)
+ ent.contentstransition(ent.move_watertype, nativecontents);
+ }
+
+ ent.move_waterlevel = 0;
+ ent.move_watertype = CONTENT_EMPTY;
+
+ supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
+ if(supercontents & DPCONTENTS_LIQUIDSMASK)
+ {
+ ent.move_watertype = nativecontents;
+ ent.move_waterlevel = 1;
+ point_y = (ent.origin_y + ((ent.mins_z + ent.maxs_y) * 0.5));
+ if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(point)) & DPCONTENTS_LIQUIDSMASK)
+ {
+ ent.move_waterlevel = 2;
+ point_y = ent.origin_y + ent.view_ofs_y;
+ if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(point)) & DPCONTENTS_LIQUIDSMASK)
+ ent.move_waterlevel = 3;
+ }
+ }
+
+ return (ent.move_waterlevel > 1);