Fixed rules parsing on Windows

This commit is contained in:
Xawotihs
2011-10-01 15:06:24 +00:00
parent b36653787e
commit d47ece1202
+1 -3
View File
@@ -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)