diff --git a/EscapeTheBackroomsGUiTest/Cheat.h b/EscapeTheBackroomsGUiTest/Cheat.h index a56e27d..48cfec6 100644 --- a/EscapeTheBackroomsGUiTest/Cheat.h +++ b/EscapeTheBackroomsGUiTest/Cheat.h @@ -2606,9 +2606,9 @@ namespace Cheat { int isOwner = StateBP->PlayerId == PlayerStuff::PlayerList[0].PlayerID && StateBP->PlayerId < PlayerController->PlayerState->PlayerId; - std::string Role = isOwner ? " (Owner)" : ""; + std::wstring Role = isOwner ? L" (Owner)" : L""; - UsefullFuncs::DrawBoxOnActor(Canvas, CurrentEnemy, isOwner ? UsefullFuncs::RGBATOFLinear(0, 255, 255, 255) : UsefullFuncs::RGBATOFLinear(0, 255, 0, 255), true, UsefullFuncs::stringToWideString(std::string(StateBP->PlayerNamePrivate.ToString() + Role)).c_str()); + UsefullFuncs::DrawBoxOnActor(Canvas, CurrentEnemy, isOwner ? UsefullFuncs::RGBATOFLinear(0, 255, 255, 255) : UsefullFuncs::RGBATOFLinear(0, 255, 0, 255), true, std::wstring(PlayerStuff::Player::SanitizeWString(StateBP->PlayerNamePrivate.ToWString()) + Role).c_str()); } diff --git a/EscapeTheBackroomsGUiTest/Settings.h b/EscapeTheBackroomsGUiTest/Settings.h index 047701d..73e5cdb 100644 --- a/EscapeTheBackroomsGUiTest/Settings.h +++ b/EscapeTheBackroomsGUiTest/Settings.h @@ -167,13 +167,7 @@ namespace PlayerStuff { this->IsSpectator = true; } - int Sizecc = name.size(); - for (size_t i = 0; i < 14; i++) - { - if (i >= Sizecc) break; - - Sanitizedname += name[i]; - } + this->Sanitizedname = SanitizeWString(Name); auto LocString = LocToWString(location); @@ -196,6 +190,21 @@ namespace PlayerStuff { } } + static std::wstring SanitizeWString(std::wstring Input) { + std::wstring output = L""; + + int Sizecc = Input.size(); + + for (size_t i = 0; i < 14; i++) + { + if (i >= Sizecc) break; + + output += Input[i]; + } + + return output; + } + static std::vector LocToWString(SDK::FVector loc) { std::vector Location;