Closed fkaa closed 8 years ago
Launcher should be its own flag too. Being both client and server is possible withotu also being the launcher (-s mode). It should be (0x4 | IB_CLIENT | IB_SERVER)
. Launcher mode gives a lot of access to things that -s mode doesn't need.
Edit: It's less of a mode on its own and more of a "can access anything" flag. Perhaps leaving it just as 0x4
and renaming it to IB_LOCAL
or IB_FULLACCESS
would make more sense.
Launcher doesn't need port parameter, it can just default to 0.
There may be some memory leaks or something, but the Lua state(s) at the very least are destroyed, so we should be good for now.
Not bulletproofed 100%, but should be good enough for dev.
IB_LAUNCHER
to beIB_CLIENT | IB_SERVER
for now as mentioned by @rakiruquitflag
which can either be:0
– Game should not quitIB_QUIT_SHUTDOWN
– Game should quitIB_QUIT_RESTART
– Game should go through all de-inits, set up the appropriate globals, and call the inits again.quitflag
is checked in a loop and quitting is deferred to the end of a frameicelua_fn_client_create_server
client.create_server(port, basedir)
icelua_fn_client_join_server
client.join_server(port, address)
quitflag
(and a bit of cleaning up globals) and does not block execution after they are run.#ifndef DEDI