team chat

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@899 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-04-02 23:47:45 +00:00
parent cb006dec8e
commit c4cf085a10
7 changed files with 41 additions and 7 deletions
+8 -1
View File
@@ -221,7 +221,14 @@ void trydisconnect()
disconnect(0, !discmillis);
}
void toserver(char *text) { conoutf("%s:\f0 %s", player1->name, text); addmsg(SV_TEXT, "rs", text); }
void toserver(char *text)
{
bool toteam = text && text[0] == '%';
if(toteam) text++;
conoutf("%s:\f%i %s", player1->name, toteam, text);
addmsg(toteam ? SV_TEAMTEXT : SV_TEXT, "rs", text);
}
void echo(char *text) { conoutf("%s", text); }
COMMAND(echo, ARG_VARI);