(svn r23602) -Add: support for DEITY commands, commands where no real company was involved in (Rubidium)

This commit is contained in:
truebrain
2011-12-19 20:50:36 +00:00
parent 561b25d031
commit 577fe0238e
3 changed files with 11 additions and 9 deletions

View File

@@ -609,7 +609,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
/* If the company isn't valid it may only do server command or start a new company!
* The server will ditch any server commands a client sends to it, so effectively
* this guards the server from executing functions for an invalid company. */
if (_game_mode == GM_NORMAL && !exec_as_spectator && !Company::IsValidID(_current_company)) {
if (_game_mode == GM_NORMAL && !exec_as_spectator && !Company::IsValidID(_current_company) && !(_current_company == OWNER_DEITY && (cmd_flags & CMD_DEITY) != 0)) {
return_dcpi(CMD_ERROR, false);
}