Refactor code to make it easier to do 'nopredict' inside of any function without having a dependency on world model.
This commit is contained in:
@@ -33,7 +33,7 @@ public:
|
||||
public:
|
||||
virtual void event_init(int argc, char *argv[]) {
|
||||
// Create the master world model.
|
||||
master_.reset(new World(util::WORLD_TYPE_MASTER));
|
||||
master_.reset(new World(WORLD_TYPE_MASTER));
|
||||
|
||||
// Update the source code of the master model.
|
||||
master_->update_source(get_lua_source());
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
Client *client = new Client;
|
||||
client->actor_id_ = master_->create_login_actor();
|
||||
client->channel_ = std::move(chan);
|
||||
client->sync_.reset(new World(util::WORLD_TYPE_S_SYNC));
|
||||
client->sync_.reset(new World(WORLD_TYPE_PREDICTIVE));
|
||||
client->sync_->create_login_actor();
|
||||
clients_.emplace_back(client);
|
||||
stdostream() << "New client: actor id=" << client->actor_id_ << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user