1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-09 04:49:04 +00:00

removed static initialization order fiasco from fieldpattern

This commit is contained in:
Zeno Rogue
2021-03-11 10:00:41 +01:00
parent b872926cac
commit 3b0c760289
2 changed files with 13 additions and 5 deletions

View File

@@ -467,6 +467,12 @@ EX int fieldval_uniq_rand(cell *c, int randval) {
}
pair<int, int> subval(cell *c, int _subpathid = subpathid, int _subpathorder = subpathorder) {
if(_subpathid == -1)
_subpathid = currfp.matcode[currfp.strtomatrix("RRRPRRRRRPRRRP")];
if(_subpathorder == -1)
_subpathorder = currfp.order(currfp.matrices[subpathid]);
if(!ctof(c)) {
auto m = subval(createMov(c, 0));
for(int u=2; u<S6; u+=2)