Fixed some annoying stuff

This commit is contained in:
Unknown
2024-04-20 15:54:40 +02:00
parent 1b9ac3f30a
commit b8e4ef7c04
2 changed files with 18 additions and 9 deletions

View File

@ -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<std::wstring> LocToWString(SDK::FVector loc) {
std::vector<std::wstring> Location;