@@ -1512,11 +1512,7 @@ void NET_InitPlayers()
1512
1512
{
1513
1513
NET_InitPlayer (i , true);
1514
1514
}
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
+
1520
1516
NetPlay .hostPlayer = NET_HOST_ONLY ; // right now, host starts always at index zero
1521
1517
NetPlay .playercount = 0 ;
1522
1518
NetPlay .pMapFileHandle = NULL ;
@@ -1557,6 +1553,8 @@ static void NETSendPlayerInfoTo(uint32_t index, unsigned to)
1557
1553
void NETSendAllPlayerInfoTo (unsigned int to )
1558
1554
{
1559
1555
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
+
1560
1558
NETSendNPlayerInfoTo (indices , ARRAY_SIZE (indices ), to );
1561
1559
}
1562
1560
@@ -3702,6 +3700,11 @@ BOOL NEThostGame(const char* SessionName, const char* PlayerName,
3702
3700
NetPlay .players [0 ].connection = -1 ;
3703
3701
NetPlay .playercount = 1 ;
3704
3702
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
+ }
3705
3708
return true;
3706
3709
}
3707
3710
@@ -3771,6 +3774,12 @@ BOOL NEThostGame(const char* SessionName, const char* PlayerName,
3771
3774
3772
3775
MultiPlayerJoin (selectedPlayer );
3773
3776
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
+
3774
3783
allow_joining = true;
3775
3784
3776
3785
NETregisterServer (0 );
0 commit comments