Fix (unused) "orders" menu script logic

"orders" menu script is not used by Team Arena.

The same C format string was given an int or string argument depending on if
ordering a single person or everyone. Make it always use int.
This commit is contained in:
Zack Middleton 2015-01-12 19:21:09 -06:00
parent f74479afe8
commit 84e792f453

View file

@ -3514,10 +3514,10 @@ static void UI_RunMenuScript(char **args) {
} else { } else {
int i; int i;
for (i = 0; i < uiInfo.myTeamCount; i++) { for (i = 0; i < uiInfo.myTeamCount; i++) {
if (Q_stricmp(UI_Cvar_VariableString("name"), uiInfo.teamNames[i]) == 0) { if (uiInfo.playerNumber == uiInfo.teamClientNums[i]) {
continue; continue;
} }
Com_sprintf( buff, sizeof( buff ), orders, uiInfo.teamNames[i] ); Com_sprintf( buff, sizeof( buff ), orders, uiInfo.teamClientNums[i] );
trap_Cmd_ExecuteText( EXEC_APPEND, buff ); trap_Cmd_ExecuteText( EXEC_APPEND, buff );
trap_Cmd_ExecuteText( EXEC_APPEND, "\n" ); trap_Cmd_ExecuteText( EXEC_APPEND, "\n" );
} }