Skip to content

Commit

Permalink
Merged pull request "Some minor game changes": #340
Browse files Browse the repository at this point in the history
  • Loading branch information
apanteleev committed Oct 12, 2023
2 parents f004b98 + 79cd99e commit fec76b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/game/g_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
char *ClientTeam(edict_t *ent)
{
char *p;
static char value[512];
static char value[MAX_INFO_STRING];

value[0] = 0;

Expand All @@ -44,8 +44,8 @@ char *ClientTeam(edict_t *ent)

bool OnSameTeam(edict_t *ent1, edict_t *ent2)
{
char ent1Team [512];
char ent2Team [512];
char ent1Team[MAX_INFO_STRING];
char ent2Team[MAX_INFO_STRING];

if (!((int)(dmflags->value) & (DF_MODELTEAMS | DF_SKINTEAMS)))
return false;
Expand Down Expand Up @@ -788,9 +788,9 @@ void Cmd_Say_f(edict_t *ent, bool team, bool arg0)
Q_snprintf(text, sizeof(text), "%s: ", ent->client->pers.netname);

if (arg0) {
strcat(text, gi.argv(0));
strcat(text, " ");
strcat(text, gi.args());
Q_strlcat(text, gi.argv(0), sizeof(text));
Q_strlcat(text, " ", sizeof(text));
Q_strlcat(text, gi.args(), sizeof(text));
} else {
Q_strlcat(text, COM_StripQuotes(gi.args()), sizeof(text));
}
Expand All @@ -799,7 +799,7 @@ void Cmd_Say_f(edict_t *ent, bool team, bool arg0)
if (strlen(text) > 150)
text[150] = 0;

strcat(text, "\n");
Q_strlcat(text, "\n", sizeof(text));

if (dedicated->value)
gi.cprintf(NULL, PRINT_CHAT, "%s", text);
Expand Down

0 comments on commit fec76b1

Please sign in to comment.