hedgewars/uVisualGearsList.pas
changeset 10352 2af2309207b0
parent 10251 a3b42e81803c
child 10354 56bd029245fc
equal deleted inserted replaced
10351:0eff41e9f63f 10352:2af2309207b0
    38 implementation
    38 implementation
    39 uses uFloat, uVariables, uConsts, uTextures, uVisualGearsHandlers;
    39 uses uFloat, uVariables, uConsts, uTextures, uVisualGearsHandlers;
    40 
    40 
    41 function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline;
    41 function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline;
    42 begin
    42 begin
       
    43     // adjust some visual gear types if underwater
       
    44     if (Y > cWaterLine) and ((Kind = vgtBeeTrace) or (Kind = vgtSmokeTrace) or (Kind = vgtEvilTrace)) then
       
    45         Kind:= vgtBubble;
       
    46 
    43     AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false, -1);
    47     AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false, -1);
    44 end;
    48 end;
    45 
    49 
    46 function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord): PVisualGear; inline;
    50 function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord): PVisualGear; inline;
    47 begin
    51 begin