# HG changeset patch # User nemo # Date 1248818644 0 # Node ID 6746bda385e8db8fcf5b825a8e392363433760f6 # Parent bd091b6b128d9ef6967349b432ce690ff18e4811 Avoid /0 in SetScale - not sure this is right way to do it though. But just to try and stop crashing prg's machine diff -r bd091b6b128d -r 6746bda385e8 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Tue Jul 28 16:29:39 2009 +0000 +++ b/hedgewars/uStore.pas Tue Jul 28 22:04:04 2009 +0000 @@ -973,7 +973,8 @@ procedure SetScale(f: GLfloat); begin cScaleFactor:= f; -cWaterSprCount:= 1 + round(cScreenWidth * 2 / cScaleFactor / SpritesData[sprWater].Width); +if SpritesData[sprWater].Width <> 0 then + cWaterSprCount:= 1 + round(cScreenWidth * 2 / cScaleFactor / SpritesData[sprWater].Width); glLoadIdentity; glViewport(0, 0, cScreenWidth, cScreenHeight); diff -r bd091b6b128d -r 6746bda385e8 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Tue Jul 28 16:29:39 2009 +0000 +++ b/hedgewars/uWorld.pas Tue Jul 28 22:04:04 2009 +0000 @@ -69,6 +69,7 @@ cWaveWidth:= SpritesData[sprWater].Width; //cWaveHeight:= SpritesData[sprWater].Height; cWaveHeight:= 32; +cWaterSprCount:= 1 + round(cScreenWidth * 2 / cScaleFactor / SpritesData[sprWater].Width); cGearScrEdgesDist:= Min(cScreenWidth div 2 - 100, cScreenHeight div 2 - 50); SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); prevPoint.X:= 0;