From a9e4b7e7146843a4ae87e789ba7a69730e38a5b7 Mon Sep 17 00:00:00 2001 From: xavier Date: Sat, 16 Feb 2013 16:02:47 +0000 Subject: [PATCH] ... --- Scripts/Engines/Spawner/Spawner.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Scripts/Engines/Spawner/Spawner.cs b/Scripts/Engines/Spawner/Spawner.cs index 8feefa41d..46ad730ec 100644 --- a/Scripts/Engines/Spawner/Spawner.cs +++ b/Scripts/Engines/Spawner/Spawner.cs @@ -636,9 +636,7 @@ namespace Server.Mobiles private int GetAdjustedLocation( int range, int side, int coord, int coord_this ) { - int val = ( ( ( coord > 0 ) ? coord : ( coord_this - range ) ) + ( Utility.Random( ( ( range * 2 ) + 1 ) + side ) ) ); - - return ( val < 1 ) ? 1 : val; + return ( ( ( coord > 0 ) ? coord : ( coord_this - range ) ) + ( Utility.Random( Math.Max( ( ( ( range * 2 ) + 1 ) + side ), 1 ) ) ) ); } public Point3D GetSpawnPosition( ISpawnable spawned )