Ticket #44037

mapgen: Split map_colatitude() into separate functions

Eröffnet am: 2022-03-06 06:22 Letztes Update: 2022-03-07 21:07

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
1

Details

Required for #44036. Split map_colatitude() into

  • an initial function handling tile position and topology, to figure out how far north/south a tile is
  • a second function adding in game settings (alltemperate/singlepole) to compute latitude (signed, for #44035)
  • a final function translating signed latitude into absolute colatitude for the map generator

Splitting the first and second should also enable actual singlepole torus maps with no added effort.

Ticket-Verlauf (3/4 Historien)

2022-03-06 06:22 Aktualisiert von: alienvalkyrie
  • New Ticket "mapgen: Split map_colatitude() into separate functions" created
2022-03-06 06:50 Aktualisiert von: alienvalkyrie
  • Lösung Update from Keine to Accepted
Kommentar

Note that this patch does change the resulting colatitude a bit (because floating-point numbers aren't great for this, and because trying to emulate the old behavior would've made for rather ugly code), so old seeds will not result in exactly the same map. More specifically, colatitude will generally be a little bit lower than before. In particular, the colatitude will generally not actually reach MAX_COLATITUDE anymore on maps with even dimensions, since the exact equator ends up between tiles.

2022-03-07 21:07 Aktualisiert von: alienvalkyrie
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden