mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Serializer will now smartly send over network CArtifact* and CHero*. Unified handling of items stored in vector.
Started making support for Black Market / Artifact merchant.
This commit is contained in:
@@ -94,7 +94,7 @@ void CVCMIServer::newGame(CConnection *c)
|
||||
|
||||
StartInfo startInfoCpy = *si;
|
||||
gh.init(si,rand());
|
||||
c->setGS(gh.gs);
|
||||
c->addStdVecItems(gh.gs);
|
||||
|
||||
CConnection* cc; //tcp::socket * ss;
|
||||
for(int i=0; i<clients; i++)
|
||||
@@ -114,7 +114,7 @@ void CVCMIServer::newGame(CConnection *c)
|
||||
continue;
|
||||
}
|
||||
cc = new CConnection(s,NAME);
|
||||
cc->setGS(gh.gs);
|
||||
cc->addStdVecItems(gh.gs);
|
||||
}
|
||||
gh.conns.insert(cc);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ void CVCMIServer::loadGame( CConnection *c )
|
||||
tlog0 <<"Reading handlers"<<std::endl;
|
||||
|
||||
lf >> (gh.gs);
|
||||
c->setGS(gh.gs);
|
||||
c->addStdVecItems(gh.gs);
|
||||
tlog0 <<"Reading gamestate"<<std::endl;
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ void CVCMIServer::loadGame( CConnection *c )
|
||||
continue;
|
||||
}
|
||||
cc = new CConnection(s,NAME);
|
||||
cc->setGS(gh.gs);
|
||||
cc->addStdVecItems(gh.gs);
|
||||
}
|
||||
gh.conns.insert(cc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user