Use tp_name cvars where possible.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2744 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Molgrum 2007-10-14 18:38:44 +00:00
parent d598dbbe64
commit 9bc87fc9ab

View file

@ -292,7 +292,7 @@ static char macro_buf[MAX_MACRO_VALUE] = "";
//}
static void MacroBuf_strcat_with_separator (char *str) {
if (macro_buf[0])
strlcat (macro_buf, "/", sizeof(macro_buf));
strlcat (macro_buf, tp_name_separator.string, sizeof(macro_buf));
strlcat (macro_buf, str, sizeof(macro_buf));
}
@ -516,28 +516,18 @@ static char *Macro_Powerups (void)
macro_buf[0] = 0;
if (cl.stats[SP][STAT_ITEMS] & IT_QUAD)
strcpy(macro_buf, "quad");
MacroBuf_strcat_with_separator (tp_name_quad.string);
if (cl.stats[SP][STAT_ITEMS] & IT_INVULNERABILITY) {
if (macro_buf[0])
strcat(macro_buf, "/");
strcat(macro_buf, "pent");
}
if (cl.stats[SP][STAT_ITEMS] & IT_INVULNERABILITY)
MacroBuf_strcat_with_separator (tp_name_pent.string);
if (cl.stats[SP][STAT_ITEMS] & IT_INVISIBILITY) {
if (macro_buf[0])
strcat(macro_buf, "/");
strcat(macro_buf, "ring");
}
if (cl.stats[SP][STAT_ITEMS] & IT_INVISIBILITY)
MacroBuf_strcat_with_separator (tp_name_ring.string);
effects = cl.frames[cl.parsecount&UPDATE_MASK].playerstate[cl.playernum[SP]].effects;
if ( (effects & (QWEF_FLAG1|QWEF_FLAG2)) || // CTF
(cl.teamfortress && cl.stats[SP][STAT_ITEMS] & (IT_KEY1|IT_KEY2)) ) // TF
{
if (macro_buf[0])
strcat(macro_buf, "/");
strcat(macro_buf, "flag");
}
MacroBuf_strcat_with_separator (tp_name_flag.string);
return macro_buf;
}