File diff r661:49162bef3179 → r662:d42c2c6d320b
players.c
Show inline comments
 
@@ -659,24 +659,20 @@ int32 CmdPlayerCtrl(int x, int y, uint32
 
				if (ci->client_playas != 0 && ci->client_playas <= MAX_PLAYERS) {
 
					memcpy(_decode_parameters, ci->client_name, 32);
 
					/* XXX - What are the consequents of this? It is needed, but is it bad? */
 
					_docommand_recursive = 0;
 
					DoCommandP(0, ci->client_playas-1, 0, NULL, CMD_CHANGE_PRESIDENT_NAME | CMD_MSG(STR_700D_CAN_T_CHANGE_PRESIDENT));
 
				}
 
			} else {
 
				_network_playas = p->index + 1;
 
			}
 
		} else {
 
			if (_network_server) {
 
				NetworkClientInfo *ci;
 
				// UGLY! p2 is mis-used to fetch the client-id
 
				ci = &_network_client_info[p2];
 
				ci->client_playas = OWNER_SPECTATOR;
 
				NetworkUpdateClientInfo(ci->client_index);
 
			} else {
 
				_network_playas = OWNER_SPECTATOR;
 
			}
 
#endif /* ENABLE_NETWORK */
 
		}
 
		break;
 
	case 1: // make new ai player
 
		DoStartupNewPlayer(true);