diff --git a/src/Components/Modules/Dvar.cpp b/src/Components/Modules/Dvar.cpp index 83f04fd2..9df6864f 100644 --- a/src/Components/Modules/Dvar.cpp +++ b/src/Components/Modules/Dvar.cpp @@ -162,7 +162,19 @@ namespace Components } }); - return Dvar::Register(name, "Unknown Soldier", Dvar::Flag(flag | Game::dvar_flag::DVAR_FLAG_SAVED).val, description).get(); + std::string username = "Unknown Soldier"; + + if (Steam::Proxy::SteamFriends) + { + const char* steamName = Steam::Proxy::SteamFriends->GetPersonaName(); + + if (steamName && !std::string(steamName).empty()) + { + username = steamName; + } + } + + return Dvar::Register(name, username.data(), Dvar::Flag(flag | Game::dvar_flag::DVAR_FLAG_SAVED).val, description).get(); } Dvar::Dvar()