# HG changeset patch # User Adam Kaminski # Date 1622389772 14400 # Sun May 30 11:49:32 2021 -0400 # Node ID ff3e0e56d6fdb644f0534e12a3faedd52160120e # Parent b4a148568293fe11868c4d476332a1eff03a5645 Fixed SetTeamProperty(team, TPROP_CARRIER) not working properly on the server in online games. diff -r b4a148568293 -r ff3e0e56d6fd src/g_shared/a_pickups.cpp --- a/src/g_shared/a_pickups.cpp Sat May 29 10:02:31 2021 -0400 +++ b/src/g_shared/a_pickups.cpp Sun May 30 11:49:32 2021 -0400 @@ -1257,8 +1257,8 @@ } // [BC] Finally, refresh the HUD. - if ( NETWORK_GetState( ) != NETSTATE_SERVER ) - SCOREBOARD_RefreshHUD( ); + // [AK] The server also needs to update the team carriers. + SCOREBOARD_RefreshHUD( ); // [Dusk] If it's a key, share it to others if sv_sharekeys is on. Note: // we store the key as having been found even if shared keys is off. This diff -r b4a148568293 -r ff3e0e56d6fd src/p_user.cpp --- a/src/p_user.cpp Sat May 29 10:02:31 2021 -0400 +++ b/src/p_user.cpp Sun May 30 11:49:32 2021 -0400 @@ -2096,8 +2096,9 @@ // Tell the clients that this player no longer possesses a flag. if (( bLeavingGame == false ) && ( NETWORK_GetState( ) == NETSTATE_SERVER )) SERVERCOMMANDS_TakeInventory( player - players, TEAM_GetItem( i ), 0 ); - if ( NETWORK_GetState( ) != NETSTATE_SERVER ) - SCOREBOARD_RefreshHUD( ); + + // [AK] The server also needs to update the team carriers. + SCOREBOARD_RefreshHUD( ); // Spawn a new flag. pTeamItem = Spawn( TEAM_GetItem( i ), x, y, z, NO_REPLACE ); @@ -2149,8 +2150,9 @@ // Tell the clients that this player no longer possesses a flag. if (( bLeavingGame == false ) && ( NETWORK_GetState( ) == NETSTATE_SERVER )) SERVERCOMMANDS_TakeInventory( player - players, pInventory->GetClass( ), 0 ); - if ( NETWORK_GetState( ) != NETSTATE_SERVER ) - SCOREBOARD_RefreshHUD( ); + + // [AK] The server also needs to update the team carriers. + SCOREBOARD_RefreshHUD( ); // Spawn a new flag. pTeamItem = Spawn( PClass::FindClass( "WhiteFlag" ), x, y, z, ALLOW_REPLACE ); diff -r b4a148568293 -r ff3e0e56d6fd src/team.cpp --- a/src/team.cpp Sat May 29 10:02:31 2021 -0400 +++ b/src/team.cpp Sun May 30 11:49:32 2021 -0400 @@ -614,8 +614,9 @@ if ( NETWORK_GetState( ) == NETSTATE_SERVER ) SERVERCOMMANDS_TakeInventory( ULONG( pPlayer - players ), TEAM_GetItem( ulTeamIdx ), 0 ); - else - SCOREBOARD_RefreshHUD( ); + + // [AK] The server also needs to update the team carriers. + SCOREBOARD_RefreshHUD( ); // Respawn the skull. SkullOrigin = TEAM_GetItemOrigin( ulTeamIdx );