color ping

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1191 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-08-05 21:15:21 +00:00
parent b088f97f19
commit 73ecb4a8e5
3 changed files with 14 additions and 5 deletions
+8 -1
View File
@@ -56,6 +56,13 @@ char *colorname(playerent *d, int num, char *name, char *prefix)
return cname[num];
}
char *colorping(int ping)
{
static string cping;
s_sprintf(cping)("\fs\f%d%d\fr", ping <= 500 ? 0 : ping <= 700 ? 2 : 3, ping);
return cping;
}
void newname(char *name)
{
if(name[0])
@@ -65,7 +72,7 @@ void newname(char *name)
if(!player1->name[0]) s_strcpy(player1->name, "unarmed");
}
else conoutf("your name is: %s", player1->name);
}
}
int smallerteam()
{