Fixed rules parsing on Windows
This commit is contained in:
@@ -112,10 +112,9 @@ RulesState::RulesState()
|
|||||||
void RulesState::parsePlayerState(int playerId, string s)
|
void RulesState::parsePlayerState(int playerId, string s)
|
||||||
{
|
{
|
||||||
stringstream stream(s);
|
stringstream stream(s);
|
||||||
|
streampos pos = stream.tellg();
|
||||||
stream >> *(playerData[playerId].player);
|
stream >> *(playerData[playerId].player);
|
||||||
|
|
||||||
while(std::getline(stream, s))
|
|
||||||
{
|
|
||||||
size_t limiter = s.find("=");
|
size_t limiter = s.find("=");
|
||||||
if (limiter == string::npos) limiter = s.find(":");
|
if (limiter == string::npos) limiter = s.find(":");
|
||||||
string areaS;
|
string areaS;
|
||||||
@@ -137,7 +136,6 @@ void RulesState::parsePlayerState(int playerId, string s)
|
|||||||
{
|
{
|
||||||
//ERROR
|
//ERROR
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rules::addExtraRules(GameObserver* g)
|
void Rules::addExtraRules(GameObserver* g)
|
||||||
|
|||||||
Reference in New Issue
Block a user