--- a/hedgewars/uVisualGearsList.pas Sat Jul 05 18:51:45 2014 +0200
+++ b/hedgewars/uVisualGearsList.pas Sat Jul 05 20:15:56 2014 +0200
@@ -36,12 +36,12 @@
VisualGearLayers: array[0..6] of PVisualGear;
implementation
-uses uFloat, uVariables, uConsts, uTextures, uVisualGearsHandlers;
+uses uCollisions, uFloat, uVariables, uConsts, uTextures, uVisualGearsHandlers;
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline;
begin
// adjust some visual gear types if underwater
- if (Y > cWaterLine) and ((Kind = vgtBeeTrace) or (Kind = vgtSmokeTrace) or (Kind = vgtEvilTrace)) then
+ if CheckCoordInWater(X, Y) and ((Kind = vgtBeeTrace) or (Kind = vgtSmokeTrace) or (Kind = vgtEvilTrace)) then
Kind:= vgtBubble;
AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false, -1);