File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ Misc:
174
174
- IME editing support for those with the proper SDL2 version/IME tool combination
175
175
! Made lockluaui.txt obsolete: no longer necessary for it to exists in order to enable VFS for LuaUI
176
176
- use SHA2 rather than CRC32 content hashes
177
+ ! blank map params: new_map_x and new_map_y are now in map dimension sizes rather than map dimension * 2. new_map_z renamed to new_map_y
177
178
178
179
Fixes:
179
180
- fix #1968 (units not moving in direction of next queued [build-]command if current order blocked)
Original file line number Diff line number Diff line change @@ -25,20 +25,22 @@ void CSimpleMapGenerator::GenerateInfo()
25
25
}
26
26
27
27
const std::string* newMapXStr = mapOpts.try_get (" new_map_x" );
28
- const std::string* newMapZStr = mapOpts.try_get (" new_map_z " );
28
+ const std::string* newMapYStr = mapOpts.try_get (" new_map_y " );
29
29
30
- if (newMapXStr == nullptr || newMapZStr == nullptr ) {
30
+ if (newMapXStr == nullptr || newMapYStr == nullptr ) {
31
31
mapSize = int2 (1 , 1 );
32
32
return ;
33
33
}
34
34
35
35
36
36
try {
37
- const int newMapX = std::stoi (*newMapXStr);
38
- const int newMapZ = std::stoi (*newMapZStr);
37
+ // mapSize coordinates are actually 2x the spring map dimensions
38
+ // Example: 10x10 map has mapSize = (5, 5)
39
+ const int newMapX = std::stoi (*newMapXStr) / 2 ;
40
+ const int newMapY = std::stoi (*newMapYStr) / 2 ;
39
41
40
- if (newMapX > 0 && newMapZ > 0 )
41
- mapSize = int2 (newMapX, newMapZ );
42
+ if (newMapX > 0 && newMapY > 0 )
43
+ mapSize = int2 (newMapX, newMapY );
42
44
43
45
} catch (...) {
44
46
mapSize = int2 (1 , 1 );
You can’t perform that action at this time.
0 commit comments