@@ -1512,11 +1512,7 @@ void NET_InitPlayers()
15121512 {
15131513 NET_InitPlayer (i , true);
15141514 }
1515- // Now switch player color of the host to what they normally use for SP games
1516- if ( getPlayerColour (NET_HOST_ONLY ) != war_GetSPcolor ())
1517- {
1518- changeColour (NET_HOST_ONLY , war_GetSPcolor ());
1519- }
1515+
15201516 NetPlay .hostPlayer = NET_HOST_ONLY ; // right now, host starts always at index zero
15211517 NetPlay .playercount = 0 ;
15221518 NetPlay .pMapFileHandle = NULL ;
@@ -1557,6 +1553,8 @@ static void NETSendPlayerInfoTo(uint32_t index, unsigned to)
15571553void NETSendAllPlayerInfoTo (unsigned int to )
15581554{
15591555 static uint32_t indices [MAX_PLAYERS ] = {0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 };
1556+ ASSERT_OR_RETURN ( , NetPlay .isHost == true, "Invalid call for non-host" );
1557+
15601558 NETSendNPlayerInfoTo (indices , ARRAY_SIZE (indices ), to );
15611559}
15621560
@@ -3702,6 +3700,11 @@ BOOL NEThostGame(const char* SessionName, const char* PlayerName,
37023700 NetPlay .players [0 ].connection = -1 ;
37033701 NetPlay .playercount = 1 ;
37043702 debug (LOG_NET , "Hosting but no comms" );
3703+ // Now switch player color of the host to what they normally use for SP games
3704+ if ( getPlayerColour (NET_HOST_ONLY ) != war_GetSPcolor ())
3705+ {
3706+ changeColour (NET_HOST_ONLY , war_GetSPcolor ());
3707+ }
37053708 return true;
37063709 }
37073710
@@ -3771,6 +3774,12 @@ BOOL NEThostGame(const char* SessionName, const char* PlayerName,
37713774
37723775 MultiPlayerJoin (selectedPlayer );
37733776
3777+ // Now switch player color of the host to what they normally use for SP games
3778+ if ( getPlayerColour (NET_HOST_ONLY ) != war_GetSPcolor ())
3779+ {
3780+ changeColour (NET_HOST_ONLY , war_GetSPcolor ());
3781+ }
3782+
37743783 allow_joining = true;
37753784
37763785 NETregisterServer (0 );
0 commit comments