(svn r20542) -Codechange: generalise the setting of "p2" to the ClientID.

This commit is contained in:
rubidium
2010-08-18 17:06:45 +00:00
parent 7caedf7810
commit 8a9929d702
5 changed files with 36 additions and 50 deletions

View File

@@ -761,7 +761,7 @@ DEF_CONSOLE_CMD(ConResetCompany)
}
/* It is safe to remove this company */
DoCommandP(0, 2, index, CMD_COMPANY_CTRL);
DoCommandP(0, 2 | index << 16, 0, CMD_COMPANY_CTRL);
IConsolePrint(CC_DEFAULT, "Company deleted.");
return true;
@@ -1067,7 +1067,7 @@ DEF_CONSOLE_CMD(ConStartAI)
}
/* Start a new AI company */
DoCommandP(0, 1, INVALID_COMPANY, CMD_COMPANY_CTRL);
DoCommandP(0, 1 | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL);
return true;
}
@@ -1102,8 +1102,8 @@ DEF_CONSOLE_CMD(ConReloadAI)
}
/* First kill the company of the AI, then start a new one. This should start the current AI again */
DoCommandP(0, 2, company_id, CMD_COMPANY_CTRL);
DoCommandP(0, 1, company_id, CMD_COMPANY_CTRL);
DoCommandP(0, 2 | company_id << 16, 0, CMD_COMPANY_CTRL);
DoCommandP(0, 1 | company_id << 16, 0, CMD_COMPANY_CTRL);
IConsolePrint(CC_DEFAULT, "AI reloaded.");
return true;
@@ -1139,7 +1139,7 @@ DEF_CONSOLE_CMD(ConStopAI)
}
/* Now kill the company of the AI. */
DoCommandP(0, 2, company_id, CMD_COMPANY_CTRL);
DoCommandP(0, 2 | company_id << 16, 0, CMD_COMPANY_CTRL);
IConsolePrint(CC_DEFAULT, "AI stopped, company deleted.");
return true;