From 5b46a5135c7ea1cf735ad33189c5eab08b6b6940 Mon Sep 17 00:00:00 2001 From: thesupremecommander Date: Tue, 23 Dec 2014 00:22:41 -0500 Subject: [PATCH 1/3] Fix infinite recursion. --- src/modules/playeraliases.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/modules/playeraliases.cpp b/src/modules/playeraliases.cpp index 04c8703..bfafea1 100644 --- a/src/modules/playeraliases.cpp +++ b/src/modules/playeraliases.cpp @@ -68,7 +68,21 @@ bool PlayerAliases::GetPlayerInfoOverride(int ent_num, player_info_t *pinfo) { RETURN_META_VALUE(MRES_IGNORED, false); } - CSteamID playerSteamID = player.GetSteamID(); + static EUniverse universe = k_EUniverseInvalid; + + if (universe == k_EUniverseInvalid) { + if (Interfaces::pSteamAPIContext->SteamUtils()) { + universe = Interfaces::pSteamAPIContext->SteamUtils()->GetConnectedUniverse(); + } + else { + PRINT_TAG(); + Warning("Steam libraries not available - assuming public universe for user Steam IDs!\n"); + + universe = k_EUniversePublic; + } + } + + CSteamID playerSteamID = CSteamID(pinfo->friendsID, 1, universe, k_EAccountTypeIndividual); TFTeam team = player.GetTeam(); std::string playerAlias = GetAlias(playerSteamID, pinfo->name); From 80d4d65d2f65f49957a7f5a8297e36e0daea6f9f Mon Sep 17 00:00:00 2001 From: thesupremecommander Date: Tue, 23 Dec 2014 00:24:10 -0500 Subject: [PATCH 2/3] Bump version. --- src/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index 5a2fc0f..803b8dd 100644 --- a/src/common.h +++ b/src/common.h @@ -122,5 +122,5 @@ inline std::string ConvertTreeToString(std::vector tree) { return string; } -#define PLUGIN_VERSION "0.23.0" +#define PLUGIN_VERSION "0.23.1" #define PRINT_TAG() ConColorMsg(Color(0, 153, 153, 255), "[StatusSpec] ") \ No newline at end of file From 2d1f4b6a515342f58ce4195742716a4163bd273a Mon Sep 17 00:00:00 2001 From: thesupremecommander Date: Tue, 23 Dec 2014 00:24:18 -0500 Subject: [PATCH 3/3] Update changelog. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 42880dc..4a88d53 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ a Team Fortress 2 client plugin that augments game spectating Changelog --------- +**0.23.1** +* player aliases + * fix infinite recursion + **0.23.0** * general * major modularization - modules check dependencies and fail separately