economy.c
changeset 4880 aac84a9dcd03
parent 4878 4d4f76a898fd
child 5067 f3816e74ad32
equal deleted inserted replaced
4879:fd6c2ff772c6 4880:aac84a9dcd03
   418 			if (IsHumanPlayer(owner) && !_networking) {
   418 			if (IsHumanPlayer(owner) && !_networking) {
   419 				p->bankrupt_asked = 255;
   419 				p->bankrupt_asked = 255;
   420 				p->bankrupt_timeout = 0x456;
   420 				p->bankrupt_timeout = 0x456;
   421 			} else {
   421 			} else {
   422 #ifdef ENABLE_NETWORK
   422 #ifdef ENABLE_NETWORK
       
   423 				/* If we are the server make sure it is clear that this player is not active */
   423 				if (IsHumanPlayer(owner) && _network_server) {
   424 				if (IsHumanPlayer(owner) && _network_server) {
   424 					// If we are the server, make sure it is clear that his player is no
   425 					const NetworkClientState *cs;
   425 					//  longer with us!
       
   426 					NetworkClientInfo *ci;
       
   427 					NetworkClientState *cs;
       
   428 					/* Find all clients that were in control of this company */
   426 					/* Find all clients that were in control of this company */
   429 					FOR_ALL_CLIENTS(cs) {
   427 					FOR_ALL_CLIENTS(cs) {
   430 						ci = DEREF_CLIENT_INFO(cs);
   428 						NetworkClientInfo *ci = DEREF_CLIENT_INFO(cs);
   431 						if (ci->client_playas == owner) {
   429 						if (ci->client_playas == owner) {
   432 							ci->client_playas = PLAYER_SPECTATOR;
   430 							ci->client_playas = PLAYER_SPECTATOR;
   433 							// Send the new info to all the clients
   431 							// Send the new info to all the clients
   434 							NetworkUpdateClientInfo(_network_own_client_index);
   432 							NetworkUpdateClientInfo(_network_own_client_index);
   435 						}
   433 						}