Fix protocol inconsistency for remote client

This patch corrects server’s behaviour so remote client can successfully connect to. Also it fixes bugs.vcmi.eu/view.php?id=1308.

Index: server/CVCMIServer.cpp
===================================================================
--- server/CVCMIServer.cpp	(revision 3432)
+++ server/CVCMIServer.cpp	(working copy)
@@ -205,10 +205,10 @@
 	initConnection(pc);
 	upcomingConnection = nullptr;
 
+	startListeningThread(pc);
+
 	*pc << (ui8)pc->connectionID << curmap;
 
-	startListeningThread(pc);
-
 	announceTxt(pc->name + " joins the game");
 	auto pj = new PlayerJoined();
 	pj->playerName = pc->name;

Thank you for the patch, I’ll get to it within a few days.
[ATM I’m finishing up my MSc thesis, no time for vcmi. :frowning: ]

Committed as part of r3436.
Sorry again for the delay.

disableSmartVectorMemberSerialization is used twice: github.com/vcmi/vcmi/commit/4be … fea48cb514

Looks like one should be enableSmartVectorMemberSerialization instead.

Why? Both replaced calls were setting the flag to false, so there will be no change in behaviour.
It is set to true by the CSerializer::addStdVecItems. Huh… I guess I should’ve add that method directly to CSerializer and then call enable from addStdVecItems.