Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-03-25 18:51:27 +0000
committerStijn Buys <ingar@osirion.org>2008-03-25 18:51:27 +0000
commita29aa1ee2935857f616351a23578311f514516d4 (patch)
tree5d9f241b0bb1facc6dc31a4ae4e26a4182641c3b /src/core
parentf2c7b3846468461d3d88a797b4cc006ee4d3b624 (diff)
screenshots
Diffstat (limited to 'src/core')
-rw-r--r--src/core/application.cc3
-rw-r--r--src/core/cvar.cc5
-rw-r--r--src/core/cvar.h5
3 files changed, 8 insertions, 5 deletions
diff --git a/src/core/application.cc b/src/core/application.cc
index efa7bca..d1dbcc0 100644
--- a/src/core/application.cc
+++ b/src/core/application.cc
@@ -168,7 +168,8 @@ void Application::init()
Cvar::net_host = Cvar::get("net_host", "0.0.0.0", Cvar::Archive);
Cvar::net_port = Cvar::get("net_port", "8042", Cvar::Archive);
Cvar::net_maxclients = Cvar::get("net_maxclients", "16", Cvar::Archive);
-
+ Cvar::net_timeout = Cvar::get("net_timeout", "20", Cvar::Archive);
+
// register our engine functions
Func::add("print", func_print);
Func::add("help", func_help);
diff --git a/src/core/cvar.cc b/src/core/cvar.cc
index e95f61c..518ec5a 100644
--- a/src/core/cvar.cc
+++ b/src/core/cvar.cc
@@ -24,6 +24,7 @@ Cvar *Cvar::sv_framerate = 0;
Cvar *Cvar::net_host = 0;
Cvar *Cvar::net_port = 0;
Cvar *Cvar::net_maxclients = 0;
+Cvar *Cvar::net_timeout = 0;
std::map<std::string, Cvar*> Cvar::registry;
@@ -69,7 +70,7 @@ Cvar* Cvar::get(const char *name, const char *value, unsigned int flags)
registry[std::string(name)] = c;
(*c) = value;
}
- c->cvar_flags = flags;
+ c->cvar_flags |= flags;
return c;
}
@@ -84,7 +85,7 @@ Cvar* Cvar::get(const char *name, float value, unsigned int flags)
registry[std::string(name)] = c;
(*c) = value;
}
- c->cvar_flags = flags;
+ c->cvar_flags |= flags;
return c;
}
diff --git a/src/core/cvar.h b/src/core/cvar.h
index 21f2601..8ced7a4 100644
--- a/src/core/cvar.h
+++ b/src/core/cvar.h
@@ -103,10 +103,11 @@ public:
static Cvar *sv_dedicated; // dedicated server
static Cvar *sv_private; // client with private server
static Cvar *sv_framerate; // server framerate
+
static Cvar *net_host; // network server ip (default binds to all interfaces)
static Cvar *net_port; // network port
- static Cvar *net_maxclients; // maximum number of connected clients
-
+ static Cvar *net_maxclients;// maximum number of connected clients
+ static Cvar *net_timeout; // network timeout in seconds
private:
std::string cvar_name;
std::string cvar_str;