Anonymous Login
2017-05-25 16:14 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001885OpenClonkEngine - Networkpublic2017-02-03 10:12
ReporterMaikel 
Assigned ToMaikel 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
Product Versiongit master 
Target Versiongit masterFixed in Versiongit master 
Summary0001885: Allowing script players to join in network rounds.
DescriptionThis is definitely useful in defense scenarios. But also in general I think. I don't know about possible side-effects though.
TagsNo tags attached.
Attached Files
  • patch file icon league_scriptplr_join.patch (1,434 bytes) 2017-01-18 19:17 -
    diff --git a/src/network/C4Network2Players.cpp b/src/network/C4Network2Players.cpp
    index b061173..270e1c9 100644
    --- a/src/network/C4Network2Players.cpp
    +++ b/src/network/C4Network2Players.cpp
    @@ -190,16 +190,14 @@ void C4Network2Players::HandlePlayerInfoUpdRequest(const class C4ClientPlayerInf
     	while ((pPlrInfo = OwnInfoPacket.GetPlayerInfo(iPlrInfo++))) pPlrInfo->ResetLeagueProjectedGain();
     	if (Game.Parameters.isLeague())
     	{
    -		// lobby only
    -		if (!::Network.isLobbyActive())
    -			return;
     		// check league authentication for new players
     		for (int i = 0; i < OwnInfoPacket.GetPlayerCount(); i++)
    +		{
     			if (!rInfoList.GetPlayerInfoByID(OwnInfoPacket.GetPlayerInfo(i)->GetID()))
     			{
     				C4PlayerInfo *pInfo = OwnInfoPacket.GetPlayerInfo(i);
    -				// remove player infos without authentication
    -				if (!::Network.LeaguePlrAuthCheck(pInfo))
    +				// remove normal (non-script) player infos without authentication or when not in the lobby
    +				if (pInfo->GetType() != C4PT_Script && (!::Network.isLobbyActive() || !::Network.LeaguePlrAuthCheck(pInfo)))
     				{
     					OwnInfoPacket.RemoveIndexedInfo(i);
     					i--;
    @@ -208,6 +206,7 @@ void C4Network2Players::HandlePlayerInfoUpdRequest(const class C4ClientPlayerInf
     					// always reset authentication ID after check - it's not needed anymore
     					pInfo->SetAuthID("");
     			}
    +		}
     	}
     	// send updates to all other clients and reset update flags
     	SendUpdatedPlayers();
    
    patch file icon league_scriptplr_join.patch (1,434 bytes) 2017-01-18 19:17 +

-Relationships
+Relationships

-Notes

~0005601

Maikel (developer)

I uploaded a possible way to fix this, and I tested this in league mode but am unsure of possible side effects. Could someone have a look?

~0005602

Maikel (developer)

Reminder sent to: Sven2

~0005610

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/4d6be35c32fd8215551ef506e676db23e11c22ce

Changeset 4d6be35 by Maikel de Vries <mdt.maikel@gmail.com>
allow script players to join in network rounds (0001885)

+Notes

-Issue History
Date Modified Username Field Change
2017-01-18 18:57 Maikel New Issue
2017-01-18 19:17 Maikel File Added: league_scriptplr_join.patch
2017-01-18 19:18 Maikel Note Added: 0005601
2017-01-18 19:18 Maikel Note Added: 0005602
2017-02-02 21:48 occ Note Added: 0005610
2017-02-03 10:12 Maikel Assigned To => Maikel
2017-02-03 10:12 Maikel Status new => resolved
2017-02-03 10:12 Maikel Resolution open => fixed
2017-02-03 10:12 Maikel Fixed in Version => git master
+Issue History