X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fruntime.cpp;h=8ce7b5dd59562fa989487ae635cc266849939349;hb=13e676a6e49128ebc6c63b8dd08bef51d360e8e9;hp=e169a7bb5eb1d73efd4efa997ddc4f902c119ca9;hpb=43820582217f7e4b707d98f2e69d969eb77fc7c3;p=blank.git diff --git a/src/app/runtime.cpp b/src/app/runtime.cpp index e169a7b..8ce7b5d 100644 --- a/src/app/runtime.cpp +++ b/src/app/runtime.cpp @@ -220,7 +220,7 @@ void Runtime::ReadArgs(int argc, const char *const *argv) { cerr << "missing argument to -s" << endl; error = true; } else { - config.world.gen.seed = strtoul(argv[i], nullptr, 10); + config.gen.seed = strtoul(argv[i], nullptr, 10); } break; case 't': @@ -317,12 +317,14 @@ void Runtime::RunStandalone() { WorldSave save(config.env.GetWorldPath(config.world.name)); if (save.Exists()) { save.Read(config.world); + save.Read(config.gen); } else { save.Write(config.world); + save.Write(config.gen); } Application app(env); - WorldState world_state(env, config.interface, config.world, save); + WorldState world_state(env, config.gen, config.interface, config.world, save); app.PushState(&world_state); Run(app); } @@ -333,12 +335,14 @@ void Runtime::RunServer() { WorldSave save(config.env.GetWorldPath(config.world.name)); if (save.Exists()) { save.Read(config.world); + save.Read(config.gen); } else { save.Write(config.world); + save.Write(config.gen); } HeadlessApplication app(env); - ServerState server_state(env, config.world, save, config.server); + ServerState server_state(env, config.gen, config.world, save, config.server); app.PushState(&server_state); Run(app); }