From d4d1691fea007b04ad21686e8622efbbe53e9768 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 18 Nov 2007 14:24:34 +0000 Subject: fixed so that the skins are sent over correctly and that team color overrides everything --- src/game/server/srv_common.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/game/server/srv_common.cpp') diff --git a/src/game/server/srv_common.cpp b/src/game/server/srv_common.cpp index 638d31c6..c97433d3 100644 --- a/src/game/server/srv_common.cpp +++ b/src/game/server/srv_common.cpp @@ -110,6 +110,23 @@ void gameobject::post_reset() } } + + +void gameobject::on_player_info_change(class player *p) +{ + const int team_colors[2] = {54090, 10998628}; + if(is_teamplay) + { + if(p->team >= 0 || p->team <= 1) + { + p->use_custom_color = 1; + p->color_body = team_colors[p->team]; + p->color_feet = team_colors[p->team]; + } + } +} + + void gameobject::on_player_death(class player *victim, class player *killer, int weapon) { // do scoreing -- cgit 1.4.1