Skip to content

Commit

Permalink
Fix GetOption not always working
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Aug 30, 2024
1 parent fedea31 commit 6f82cd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion SurrealEngine/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ void Engine::Run()
actorTravelInfo.push_back(std::move(objInfo));
}
std::string playerName = pawn->PlayerReplicationInfo()->PlayerName();
LogMessage("Adding travel data for player '" + playerName + "'");
travelInfo[playerName] = ObjectTravelInfo::ToString(actorTravelInfo);
}
}
Expand Down Expand Up @@ -548,7 +549,7 @@ void Engine::LoginPlayer()
else if (playerName.empty())
LogMessage("Skipping travel transfer. Player name is empty");
else
LogMessage("Skipping travel transfer. Player not found in travel info");
LogMessage("Skipping travel transfer. Player '" + playerName + "' not found in travel info");
}
}

Expand Down
4 changes: 3 additions & 1 deletion SurrealEngine/UObject/UnrealURL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ bool UnrealURL::HasOption(const std::string& name) const
return false;
}

std::string UnrealURL::GetOption(const std::string& name) const
std::string UnrealURL::GetOption(std::string name) const
{
for (char& c : name) c = std::tolower(c);

for (const std::string& option : Options)
{
if (option.size() >= name.size() + 1 && option[name.size()] == '=')
Expand Down
2 changes: 1 addition & 1 deletion SurrealEngine/UObject/UnrealURL.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UnrealURL

void AddOrReplaceOption(const std::string& newvalue);
bool HasOption(const std::string& name) const;
std::string GetOption(const std::string& name) const;
std::string GetOption(std::string name) const;
std::string GetAddressURL() const;
std::string GetOptions() const;
std::string GetPortal() const;
Expand Down

0 comments on commit 6f82cd8

Please sign in to comment.