Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

updated PlayerExtraInfo pattern #2

Merged
merged 4 commits into from Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions hitboxtracker/client/src/hud.h
Expand Up @@ -73,6 +73,9 @@ struct extra_player_info_t
float showhealth;
int health;
char location[32];
int sb_health;
int sb_account;
int has_defuse_kit;
};

// Macros to hook function calls into the HUD object
Expand Down
2 changes: 1 addition & 1 deletion hitboxtracker/client/src/modules/client.cpp
Expand Up @@ -57,7 +57,7 @@ extra_player_info_t **CClient::FindPlayerExtraInfo()
return nullptr;
}

pos = find_pattern(pos, 32, "\x0F\xBF\x04\x2A\x2A\x2A\x2A\x2A\xC3");
pos = find_pattern(pos, 64, "\x0F\xBF\x04\x2A\x2A\x2A\x2A\x2A\xC3");
if (!pos) {
return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions hitboxtracker/client/src/studio/GameStudioModelRenderer.cpp
Expand Up @@ -874,9 +874,9 @@ int CGameStudioModelRenderer::_StudioDrawPlayer(int flags, entity_state_t *pplay

if (cl_minmodels && cl_minmodels->value)
{
if (g_PlayerExtraInfo[pplayer->number].teamnumber == TEAM_CT)
if (g_PlayerExtraInfo[pplayer->number].teamnumber == TEAM_TERRORIST)
{
int modelindex = (cl_min_t && IsValidCTModelIndex(cl_min_t->value)) ? cl_min_t->value : CS_LEET;
int modelindex = (cl_min_t && IsValidTModelIndex(cl_min_t->value)) ? cl_min_t->value : CS_LEET;
m_pRenderModel = gEngfuncs.CL_LoadModel(sPlayerModelFiles[modelindex], nullptr);
}
else if (g_PlayerExtraInfo[pplayer->number].teamnumber == TEAM_CT)
Expand Down