diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index be88f8d3..350f1405 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -623,8 +623,10 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) case SV_FORCETEAM: { int team = getint(p); - bool respawn = getint(p) == 1; + int attr = getint(p); + bool respawn = (attr & 1) == 1; changeteam(team, respawn); + if(attr & 2) hudoutf("you got forced to team %s", team_string(team)); break; } @@ -635,7 +637,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) playerent *d = getclient(fpl); bool you = fpl == player1->clientnum; // sound? bool et = team_int(player1->team) != fnt; - conoutf("the server forced %s to%s team%s", you ? "you" : d ? colorname(d) : "", you ? "" : et ? " the enemy" : " your", you ? fnt ? " RVSF": " CLA" : ""); + hudoutf("the server forced %s to%s team%s", you ? "you" : d ? colorname(d) : "", you ? "" : et ? " the enemy" : " your", you ? fnt ? " RVSF": " CLA" : ""); break; } diff --git a/source/src/server.cpp b/source/src/server.cpp index f5b72f50..41b6712c 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -1618,7 +1618,7 @@ void forceteam(int client, int team, bool respawn, bool notify = false) { if(!valid_client(client) || team < 0 || team > 1) return; if(clients[client]->lastforce && (servmillis - clients[client]->lastforce) < 2000) return; - sendf(client, 1, "riii", SV_FORCETEAM, team, respawn ? 1 : 0); + sendf(client, 1, "riii", SV_FORCETEAM, team, (respawn ? 1 : 0) | (respawn && !notify ? 2 : 0)); clients[client]->lastforce = servmillis; if(notify) sendf(-1, 1, "riii", SV_FORCENOTIFY, client, team); }