Skip droplets if plain splash is enabled, add a sanity check just in case.
authornemo
Sun, 12 Jun 2011 10:16:38 -0400 (2011-06-12)
changeset 5235 e30b06ffea3a
parent 5233 e0b78b11d223
child 5236 ab044774e29d
Skip droplets if plain splash is enabled, add a sanity check just in case.
hedgewars/VGSHandlers.inc
hedgewars/uRender.pas
--- a/hedgewars/VGSHandlers.inc	Sat Jun 11 17:27:26 2011 -0400
+++ b/hedgewars/VGSHandlers.inc	Sun Jun 12 10:16:38 2011 -0400
@@ -649,7 +649,7 @@
 
 Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
 
-if round(Gear^.Y) > cWaterLine then
+if (round(Gear^.Y) > cWaterLine) and ((cReducedQuality and rqPlainSplash) = 0) then
     begin
     AddVisualGear(round(Gear^.X), round(Gear^.Y), vgtDroplet);
     DeleteVisualGear(Gear);
--- a/hedgewars/uRender.pas	Sat Jun 11 17:27:26 2011 -0400
+++ b/hedgewars/uRender.pas	Sun Jun 12 10:16:38 2011 -0400
@@ -266,6 +266,7 @@
 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
 var row, col, numFramesFirstCol: LongInt;
 begin
+if SpritesData[Sprite].imageHeight = 0 then exit;
 numFramesFirstCol:= SpritesData[Sprite].imageHeight div SpritesData[Sprite].Height;
 row:= Frame mod numFramesFirstCol;
 col:= Frame div numFramesFirstCol;