mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
add test.open_world
This commit is contained in:
parent
b05c2fc911
commit
cfc16679cb
3 changed files with 17 additions and 2 deletions
|
|
@ -133,8 +133,10 @@ std::unique_ptr<Level> World::load(
|
|||
auto playerRoot = files::read_json(file);
|
||||
level->players->deserialize(playerRoot);
|
||||
|
||||
if (!playerRoot["players"][0].has("id")) {
|
||||
level->getWorld()->getInfo().nextPlayerId++;
|
||||
if (!playerRoot["players"].empty()) {
|
||||
if (!playerRoot["players"][0].has("id")) {
|
||||
level->getWorld()->getInfo().nextPlayerId++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return level;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue