待辦事項 #44037

mapgen: Split map_colatitude() into separate functions

啟用日期: 2022-03-06 06:22 最後更新: 2022-03-07 21:07

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

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 History (3/4 Histories)

2022-03-06 06:22 Updated by: alienvalkyrie
  • New Ticket "mapgen: Split map_colatitude() into separate functions" created
2022-03-06 06:50 Updated by: alienvalkyrie
  • 處理結果 Update from to Accepted
評語

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 Updated by: alienvalkyrie
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入