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-07-24 00:47:13 +0000
committerStijn Buys <ingar@osirion.org>2008-07-24 00:47:13 +0000
commitaaa4ff61f7b17759c4f4ccb3ac9011dd5f8a93f5 (patch)
treefafec5ef0c99f28cfa6b5b652d98b63b7a4673de /src/core/player.cc
parent11c122eb1cc86ca1a40c84eb411ccd97791dc47d (diff)
primary, secondary, tertiary color rendering
Diffstat (limited to 'src/core/player.cc')
-rw-r--r--src/core/player.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/player.cc b/src/core/player.cc
index 4ad2c3a..18dabed 100644
--- a/src/core/player.cc
+++ b/src/core/player.cc
@@ -59,18 +59,27 @@ void Player::update_info()
if (cl_color) {
std::istringstream is(cl_color->str());
if (is >> color)
- player_color = color;
+ player_color.assign(color);
+ }
+
+ Cvar *cl_color_second = Cvar::find("cl_colorsecond");
+ math::Color color_second(1.0, 1.0, 1.0, 1.0);
+ if (cl_color_second) {
+ std::istringstream is(cl_color_second->str());
+ if (is >> color_second)
+ player_color_second.assign(color_second);
}
}
void Player::serialize_client_update(std::ostream & os)
{
- os << " " << player_color << " \"" << player_name << "\"";
+ os << " " << player_color << " " << player_color_second << " \"" << player_name << "\"";
}
void Player::recieve_client_update(std::istream &is)
{
is >> player_color;
+ is >> player_color_second;
std::string n;
char c;