File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,11 +298,15 @@ nlohmann::ordered_json MapFile::to_json()
298298 {
299299 for (auto i = 0 ; i < 6 ; i++)
300300 {
301- json[" door" ][i][" model_id" ] = entry.doors ->modelId [i];
302- json[" door" ][i][" x" ] = entry.doors ->posX [i];
303- json[" door" ][i][" y" ] = entry.doors ->posY [i];
304- json[" door" ][i][" z" ] = entry.doors ->posZ [i];
305- json[" door" ][i][" rotation" ] = entry.doors ->rotation [i];
301+ // ignore empty entires
302+ if (entry.doors ->modelId [i] == 255 )
303+ continue ;
304+ json[" door" ][i][" model_id" ] = entry.doors ->modelId [i];
305+ json[" door" ][i][" position" ][" x" ] = entry.doors ->posX [i];
306+ json[" door" ][i][" position" ][" y" ] = entry.doors ->posY [i];
307+ json[" door" ][i][" position" ][" z" ] = entry.doors ->posZ [i];
308+ json[" door" ][i][" rotation" ] = entry.doors ->rotation [i];
309+ json[" door" ][i][" is_double_door" ] = entry.doors ->modelId [i] == 10 ;
306310 }
307311 }
308312
You can’t perform that action at this time.
0 commit comments