diff options
author | Stijn Buys <ingar@osirion.org> | 2008-04-06 14:13:36 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-04-06 14:13:36 +0000 |
commit | 7b5a6b820d5acef36d402bd5a52d783ec68d33c7 (patch) | |
tree | a1cb65e071441277865ca5f4e315611cdd51c0e5 /src/core/application.cc | |
parent | 25d2c764443723eb7a3dd5f8bf0b76586c1ff10b (diff) |
mouse grabbing, Cvar and Func info
Diffstat (limited to 'src/core/application.cc')
-rw-r--r-- | src/core/application.cc | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/core/application.cc b/src/core/application.cc index 2807d0e..ee0dd76 100644 --- a/src/core/application.cc +++ b/src/core/application.cc @@ -123,37 +123,57 @@ void Application::init() CommandBuffer::init(); // dedicated server has set this to 1 Cvar::sv_dedicated = Cvar::get("sv_dedicated", "0", Cvar::ReadOnly); + Cvar::sv_dedicated->set_info("[bool] indicates this is a dedicated server"); + // client can set this to 1 Cvar::sv_private = Cvar::get("sv_private", "0"); + Cvar::sv_private->set_info("[bool] indicates the client runs a networked server"); // load save cvars load_config(); // framerate settings Cvar::sv_framerate = Cvar::get("sv_framerate", "25"); + Cvar::sv_framerate->set_info("[int] server framerate in frames/sec"); // network settings Cvar::net_host = Cvar::get("net_host", "0.0.0.0", Cvar::Archive); + Cvar::net_host->set_info("[ip] IP address the network server binds to"); + Cvar::net_port = Cvar::get("net_port", "8042", Cvar::Archive); + Cvar::net_port->set_info("[int] default network port"); + Cvar::net_maxclients = Cvar::get("net_maxclients", "16", Cvar::Archive); + Cvar::net_maxclients->set_info("[int] maximum number of network clients"); + Cvar::net_timeout = Cvar::get("net_timeout", "20", Cvar::Archive); + Cvar::net_timeout->set_info("[int] network timeout in seconds"); #ifdef _WIN32 // Initialize win32 socket library WSADATA wsa_data; WORD wsa_version = MAKEWORD(2, 0); if (WSAStartup(wsa_version, &wsa_data) != 0 ) { - con_warn << "Could not initialize scoket library!" << std::endl; + con_warn << "Could not initialize socket library!" << std::endl; } #endif // register our engine functions - Func::add("print", func_print); - Func::add("help", func_help); - Func::add("quit", func_quit); + Func *func = 0; + func = Func::add("print", func_print); + func->set_info("[str] print a message on the console"); + + func = Func::add("help", func_help); + func->set_info("dummy help function"); + + func = Func::add("quit", func_quit); + func->set_info("exit the application"); - Func::add("connect", func_connect); - Func::add("disconnect", func_disconnect); + func = Func::add("connect", func_connect); + func->set_info("[ip] without ip, create a game"); + + func = Func::add("disconnect", func_disconnect); + func->set_info("leave the current game"); } void Application::shutdown() |