diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-16 12:22:33 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-16 12:22:33 +0000 |
commit | d6ee7ec642cc6b3097c8d321a1a00630e24027d1 (patch) | |
tree | 35f56e5168cc3e12724898b9efb81b4b2938f575 /src/core/cvar.cc | |
parent | 715d0c3952a3a1d59b64074e472d0a9a3b414351 (diff) |
initial client-to-server connection
Diffstat (limited to 'src/core/cvar.cc')
-rw-r--r-- | src/core/cvar.cc | 25 |
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; } |