Skip to content

Commit

Permalink
Add %P% chattoken for ping.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bucky21659 committed Mar 28, 2020
1 parent 070c363 commit 79d3bd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions codemp/cgame/cg_consolecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,11 @@ void CG_Say_f( void ) {
Com_sprintf(numberStr, sizeof(numberStr), "%i", number);
Q_strncpyz(word, numberStr, sizeof(word));
}
else if (!Q_stricmp(word, "%P%")) {
if (cg.snap) number = cg.snap->ping;
Com_sprintf(numberStr, sizeof(numberStr), "%i", number);
Q_strncpyz(word, numberStr, sizeof(word));
}
else if (!Q_stricmp(word, "%T%")) { //insert time in 12-hour format
struct tm *newtime;
qboolean AM = qtrue;
Expand Down

0 comments on commit 79d3bd1

Please sign in to comment.