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

Commit

Permalink
Hide coach agent model
Browse files Browse the repository at this point in the history
  • Loading branch information
marqdevx committed Mar 16, 2024
1 parent 9fe3edc commit 1d715bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ CON_COMMAND_CHAT(uncoach, "Undo slot coach")

if (!pTarget)
return;

pTarget->GetPawn()->m_clrRender(Color(255, 255, 255, 255));

//Check it is not existing already
FOR_EACH_VEC(coaches,i){
Expand Down
13 changes: 8 additions & 5 deletions src/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@ void UnregisterEventListeners()
g_vecEventListeners.Purge();
}



GAME_EVENT_F(player_team)
{
{
CCSPlayerController* pController = (CCSPlayerController *)g_pEntitySystem->GetBaseEntity((CEntityIndex)(pEvent->GetUint64("userid") + 1));

if (coaches.Count() < 1) return;

FOR_EACH_VEC(coaches,i){
if(pController->GetPlayerSlot() == coaches[i]->GetPlayerSlot()) pEvent->SetBool("silent", true); return;
if(pController->GetPlayerSlot() == coaches[i]->GetPlayerSlot()) {
pEvent->SetBool("silent", true);
coaches[i]->GetPawn()->m_clrRender(Color(255, 255, 255, 0)); //hides agent model
return;
}
//ClientPrint(pController, HUD_PRINTTALK, "coach slot %i", coaches[i]->GetPlayerSlot());
}
}
Expand Down

0 comments on commit 1d715bc

Please sign in to comment.