Skip to content

Commit

Permalink
Address player as 'Commander' in tutorial/campaign.
Browse files Browse the repository at this point in the history
Patch in ticket:4612 by Forgon.
  • Loading branch information
perim committed Aug 27, 2017
1 parent 1c9bd06 commit 3a871f2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/multiplay.cpp
Expand Up @@ -1152,10 +1152,18 @@ static void printchatmsg(const char *text, int from, bool team = false)
{
char msg[MAX_CONSOLE_STRING_LENGTH];

sstrcpy(msg, NetPlay.players[from].name); // name
sstrcat(msg, ": "); // seperator
if (strlen(NetPlay.players[from].name) == 0)
{
// triggered in campaign and tutorials for prettier output
sstrcpy(msg, _("Commander"));
}
else
{
sstrcpy(msg, NetPlay.players[from].name);
}
sstrcat(msg, ": "); // separator
sstrcat(msg, text); // add message
addConsoleMessage(msg, DEFAULT_JUSTIFY, from, team); // display
addConsoleMessage(msg, DEFAULT_JUSTIFY, from, team); // display
}

// ////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 3a871f2

Please sign in to comment.