X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fruntime.cpp;h=8ce7b5dd59562fa989487ae635cc266849939349;hb=d4c71969df4f6b5e6b750c98268d30ca6784908b;hp=e169a7bb5eb1d73efd4efa997ddc4f902c119ca9;hpb=1afc887a2040dfdedfa66913e94ff7a9634f648f;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); }