From 0049223ccb2e60f559f0734de7900db8e184a1a3 Mon Sep 17 00:00:00 2001 From: buginator Date: Sun, 5 Dec 2010 20:12:41 -0500 Subject: [PATCH] Use the host's SP color as the default color when hosting games. (cherry picked from commit 09ea0be7c30236809536db332be78b2967d3114d) Conflicts: lib/netplay/netplay.c --- lib/netplay/netplay.c | 6 ++++++ src/multiint.c | 9 +++++++-- src/multiint.h | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/netplay/netplay.c b/lib/netplay/netplay.c index cb93a145cad..60b43108c3c 100644 --- a/lib/netplay/netplay.c +++ b/lib/netplay/netplay.c @@ -49,6 +49,7 @@ #include "src/multijoin.h" #include "src/multiint.h" #include "src/multiplay.h" +#include "src/warzoneconfig.h" #ifdef WZ_OS_LINUX #include // Nonfatal runtime backtraces. @@ -297,6 +298,11 @@ void NET_InitPlayers() NETinitQueue(NETnetQueue(i)); } NETinitQueue(NETbroadcastQueue()); + // Now switch player color of the host to what they normally use for SP games + if ( getPlayerColour(NET_HOST_ONLY) != war_GetSPcolor()) + { + changeColour(NET_HOST_ONLY, war_GetSPcolor()); + } NetPlay.hostPlayer = NET_HOST_ONLY; // right now, host starts always at index zero NetPlay.playercount = 0; NetPlay.pMapFileHandle = NULL; diff --git a/src/multiint.c b/src/multiint.c index 080c73869b3..7d12240b14c 100644 --- a/src/multiint.c +++ b/src/multiint.c @@ -1645,7 +1645,7 @@ static BOOL changePosition(UBYTE player, UBYTE position) return false; } -static BOOL changeColour(UBYTE player, UBYTE col) +BOOL changeColour(UBYTE player, UBYTE col) { int i; @@ -3241,11 +3241,16 @@ BOOL startMultiOptions(BOOL bReenter) { teamChooserUp = -1; allowChangePosition = true; - for(i=0;i