Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed so that the effect spreads as a 'band' rather than zone by zone.
- Loading branch information
Showing
4 changed files
with
68 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9ac579e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moves the call to determine_zone_details() from before the body loop, to inside it.
I think this would result in the basic body sizes / ore compositions being recalculated for every body, and not for every zone or band.
Is that a bug?
9ac579e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a bug, don't forget the srand immediately before it. This ensures that whatever zone the body is in it will always compute the same 'random' distribution of planet types in that zone. We can't compute it once before the loop for all bodies in a zone since a band covers many zones and a zone has many bands.
9ac579e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I'd read about srand in perldoc, but never had need to use it - interesting use!
Sorry for the noise