hedgewars/uVisualGearsList.pas
changeset 10352 2af2309207b0
parent 10251 a3b42e81803c
child 10354 56bd029245fc
--- a/hedgewars/uVisualGearsList.pas	Sat Jul 05 15:28:32 2014 +0400
+++ b/hedgewars/uVisualGearsList.pas	Sat Jul 05 18:51:45 2014 +0200
@@ -40,6 +40,10 @@
 
 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
+        Kind:= vgtBubble;
+
     AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false, -1);
 end;