Skip to content

Commit

Permalink
Merge branch 'release/0.23.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
thesupremecommander committed Dec 23, 2014
2 parents 753b52c + 2d1f4b6 commit 89031ca
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ inline std::string ConvertTreeToString(std::vector<std::string> 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] ")
16 changes: 15 additions & 1 deletion src/modules/playeraliases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 89031ca

Please sign in to comment.