Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset parameter #1456

Merged
merged 4 commits into from
Jul 30, 2016
Merged

Offset parameter #1456

merged 4 commits into from
Jul 30, 2016

Conversation

Ryuichiro
Copy link

@Ryuichiro Ryuichiro commented Jul 30, 2016

Fixed version for randomized spawn location.
#1430

… into Offset-Parameter

# Conflicts:
#	PoGo.NecroBot.Logic/Settings.cs
Changed unit of MaxSpawnLocationOffset in meter.
NOT Acurate but good enough.
@Ryuichiro
Copy link
Author

Now based on position and in meters.

@NecronomiconCoding NecronomiconCoding merged commit 0fb91fc into NecronomiconCoding:master Jul 30, 2016
@Stanvirk
Copy link

Stanvirk commented Jul 30, 2016

Did you tested it?
_settings.MaxSpawnLocationOffset is type of int? So you dividing int with an much more larger int - does it cause fraction loss and 0 as a result?
return _settings.DefaultLatitude + _rand.NextDouble() * (_settings.MaxSpawnLocationOffset / 111111);
return some value + (random value * 0) -> return some value
offset

@Ryuichiro
Copy link
Author

@Zuxser Not sure, it worked so I didn't take a closer look. But I will make a fixed Pull request to be sure.

@Ryuichiro
Copy link
Author

#1461

schnapster pushed a commit to schnapster/NecroBot that referenced this pull request Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants