Skip to content

Commit

Permalink
fix incorrect level length calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Oct 6, 2023
1 parent 55f46cf commit eb4db5f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ inline uint64_t timeInMs() {
}

float BetterInfo::timeForLevelString(const std::string& levelString) {
std::string epicString;
try {
//todo: checked portals
auto a = timeInMs();
Expand All @@ -524,7 +525,7 @@ float BetterInfo::timeForLevelString(const std::string& levelString) {
std::string currentKey;
std::string keyID;

std::stringstream objectStream;
//std::stringstream objectStream;
float prevPortalX = 0;
int prevPortalId = 0;

Expand All @@ -536,13 +537,14 @@ float BetterInfo::timeForLevelString(const std::string& levelString) {
int objID = 0;
float xPos = 0;

/*objectStream.str("");
objectStream.clear();
objectStream << currentObject;
objectStream.seekp(0);
objectStream.seekg(0);
//std::stringstream objectStream(currentObject);
objectStream.seekg(0);*/
std::stringstream objectStream(currentObject);
while(getline(objectStream, currentKey, ',')) {

epicString += currentKey + "\n";

if(i % 2 == 0) keyID = currentKey;
else {
Expand Down

0 comments on commit eb4db5f

Please sign in to comment.