Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-16 12:22:33 +0000
committerStijn Buys <ingar@osirion.org>2008-02-16 12:22:33 +0000
commitd6ee7ec642cc6b3097c8d321a1a00630e24027d1 (patch)
tree35f56e5168cc3e12724898b9efb81b4b2938f575 /src/core/cvar.cc
parent715d0c3952a3a1d59b64074e472d0a9a3b414351 (diff)
initial client-to-server connection
Diffstat (limited to 'src/core/cvar.cc')
-rw-r--r--src/core/cvar.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/core/cvar.cc b/src/core/cvar.cc
index 2350b56..531e0ad 100644
--- a/src/core/cvar.cc
+++ b/src/core/cvar.cc
@@ -36,15 +36,6 @@ Cvar_t & Cvar_t::operator=(const char *other)
return ((*this) = std::string(other));
}
-Cvar_t & Cvar_t::operator=(int other)
-{
- std::stringstream s;
- s << other;
- s >> cvar_text;
- cvar_value = (float) other;
- return (*this);
-}
-
Cvar_t & Cvar_t::operator=(float other)
{
std::stringstream s;
@@ -159,7 +150,21 @@ void list()
{
std::map<std::string, Cvar>::iterator it;
for (it = registry.begin(); it != registry.end(); it++) {
- con_print << " "<< (*it).first << " " << (*it).second->text() << std::endl;
+ std::string typeindicator;
+ if ((*it).second->flags() & cvar::Archive)
+ typeindicator += 'A';
+ else
+ typeindicator += ' ';
+ if ((*it).second->flags() & cvar::ReadOnly)
+ typeindicator += 'R';
+ else
+ typeindicator += ' ';
+ if ((*it).second->flags() & cvar::Game)
+ typeindicator += 'G';
+ else
+ typeindicator += ' ';
+
+ con_print << typeindicator << " " << (*it).first << " " << (*it).second->text() << std::endl;
}
con_print << registry.size() << " registered variables" << std::endl;
}