Skip to content

Commit

Permalink
Merge pull request NecronomiconCoding#1430 from Floppixx/master
Browse files Browse the repository at this point in the history
[add] Never spawn at the same position. Niantic might detect that!
  • Loading branch information
NecronomiconCoding authored Jul 30, 2016
2 parents dd82ec5 + fcb967b commit 572971c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions PoGo.NecroBot.Logic/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,14 @@ AuthType ISettings.AuthType
}
}

// Never spawn at the same position.
private readonly Random _rand = new Random();

double ISettings.DefaultLatitude
{
get
{
return _settings.DefaultLatitude;
return _settings.DefaultLatitude + _rand.NextDouble() * (0.2 - 0.01) + 0.01;
}

set
Expand All @@ -476,7 +479,7 @@ double ISettings.DefaultLongitude
{
get
{
return _settings.DefaultLongitude;
return _settings.DefaultLongitude + _rand.NextDouble() * (0.2 - 0.01) + 0.01;
}

set
Expand Down

0 comments on commit 572971c

Please sign in to comment.