A little cleanup, and some work on LpxClient
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
class LpxClient : public DrivenEngine {
|
||||
public:
|
||||
using StringVec = LuaConsole::StringVec;
|
||||
std::unique_ptr<World> world_;
|
||||
UniqueWorld world_;
|
||||
int64_t actor_id_;
|
||||
InvocationQueue unack_;
|
||||
Channel *channel_;
|
||||
UniqueChannel channel_;
|
||||
LuaConsole console_;
|
||||
Gui gui_;
|
||||
int64_t gui_place_;
|
||||
@@ -26,6 +26,18 @@ public:
|
||||
|
||||
public:
|
||||
virtual void event_init(int argc, char *argv[]) {
|
||||
// Create the world model.
|
||||
world_.reset(new World(util::WORLD_TYPE_C_SYNC));
|
||||
|
||||
// This is a temporary actor that will be used only until the server sends
|
||||
// us the first difference transmission. We do this only to establish
|
||||
// the invariant that there's always an actor. When the first difference
|
||||
// transmission arrives, this actor may be deleted, or it may just be
|
||||
// ignored, at the server's discretion.
|
||||
actor_id_ = world_->create_login_actor();
|
||||
|
||||
// Establish a connection to the server.
|
||||
channel_ = new_outgoing_channel("localhost:8085");
|
||||
}
|
||||
|
||||
virtual void event_update() {
|
||||
|
||||
Reference in New Issue
Block a user