text parsing fixes
increased emit rate for explosionsprite git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1297 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f447bd2feb
commit
a6bee2bc12
4 changed files with 120 additions and 80 deletions
|
@ -1913,7 +1913,7 @@ void TP_NewMap (void)
|
|||
TP_CategorizeMessage
|
||||
|
||||
returns a combination of these values:
|
||||
0 -- unknown (probably generated by the server)
|
||||
0 -- unknown
|
||||
1 -- normal
|
||||
2 -- team message
|
||||
4 -- spectator
|
||||
|
@ -1934,10 +1934,10 @@ int TP_CategorizeMessage (char *s, int *offset, player_info_t **plr)
|
|||
player_info_t *player;
|
||||
char *name;
|
||||
|
||||
flags = 0;
|
||||
flags = TPM_UNKNOWN;
|
||||
msglen = strlen(s);
|
||||
if (!msglen)
|
||||
return 0;
|
||||
return TPM_UNKNOWN;
|
||||
|
||||
*offset = 0;
|
||||
*plr = NULL;
|
||||
|
@ -1953,9 +1953,9 @@ int TP_CategorizeMessage (char *s, int *offset, player_info_t **plr)
|
|||
!strncmp(name, s, len))
|
||||
{
|
||||
if (player->spectator)
|
||||
flags |= 4;
|
||||
flags |= TPM_SPECTATOR;
|
||||
else
|
||||
flags |= 1;
|
||||
flags |= TPM_NORMAL;
|
||||
*offset = len + 2;
|
||||
*plr = player;
|
||||
}
|
||||
|
@ -1967,19 +1967,19 @@ int TP_CategorizeMessage (char *s, int *offset, player_info_t **plr)
|
|||
// no team messages in teamplay 0, except for our own
|
||||
if (i == cl.playernum[SP] || ( cl.teamplay &&
|
||||
!strcmp(cl.players[cl.playernum[SP]].team, player->team)) )
|
||||
flags |= 2;
|
||||
flags |= TPM_TEAM;
|
||||
|
||||
*offset = len + 4;
|
||||
*plr = player;
|
||||
}
|
||||
}
|
||||
|
||||
if (!flags)
|
||||
if (!flags) // search for fake player
|
||||
{
|
||||
if (name = strstr(s, ": ")) // use name as temp
|
||||
{
|
||||
*offset = (name - s) + 2;
|
||||
flags = 16;
|
||||
flags = TPM_FAKED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3228,7 +3228,13 @@ void CL_Say (qboolean team, char *extra)
|
|||
}
|
||||
*d = '\0';
|
||||
|
||||
CL_PrintChat(&cl.players[cl.playernum[SP]], text, team, false);
|
||||
{
|
||||
int plrflags = 0;
|
||||
if (team)
|
||||
plrflags |= 2;
|
||||
|
||||
CL_PrintChat(&cl.players[cl.playernum[SP]], NULL, text, plrflags);
|
||||
}
|
||||
|
||||
//strip out the extra markup
|
||||
for (s = sendtext, d = sendtext; *s; s++, d++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue