Wyrmgus icon indicating copy to clipboard operation
Wyrmgus copied to clipboard

4.1.2 does not start

Open bergentroll opened this issue 5 years ago • 3 comments

On running Wyrmsun v4.1.2 I see only black window that immediately dissapears and this short log output:

[2021.01.17 20:26:44] Position (188, 179) of map template "earth_45_60_latitude_north" already has a site ("trent").
[2021.01.17 20:26:44] Failed to initialize the site instance "bozen".
[2021.01.17 20:26:44] Error initializing the instances of the site class.
[2021.01.17 20:26:44] Error initializing database.
Thanks for playing Stratagus.

bergentroll avatar Jan 17 '21 15:01 bergentroll

I am not sure is it related to this repo or to Wyrmsun.

bergentroll avatar Jan 17 '21 15:01 bergentroll

Thanks for reporting the issue! It seems probable that this is related to floating-point operations. Positions for sites are derived from geocoordinates with doubles used for their longitude and latitude. Since Bozen/Bolsano and Trent/Trento are close to each other, possibly a floating point issue led them to be placed in the same tile for your computer.

I am working on a fix, changing geocoordinates to use an underlying integer instead, so as to make their conversion to tile positions more deterministic.

Andrettin avatar Jan 17 '21 21:01 Andrettin

I've implemented the change I mentioned above, potentially fixing this issue: https://github.com/Andrettin/Wyrmgus/commit/efa41c147696e937b23d00381287eb91f77f944b

Andrettin avatar Jan 18 '21 21:01 Andrettin