Skip to content

Commit

Permalink
add team check
Browse files Browse the repository at this point in the history
  • Loading branch information
Poggicek authored and xen-000 committed Oct 18, 2023
1 parent 57b502f commit 84ce085
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ GAME_EVENT_F(round_end)
if (!pPlayer)
continue;

sortedPlayers.AddToTail(pPlayer);
CCSPlayerController* pController = (CCSPlayerController*)g_pEntitySystem->GetBaseEntity(CEntityIndex(pPlayer->GetPlayerSlot().Get() + 1));

if(!pController)
continue;

if (pController->m_iTeamNum == CS_TEAM_CT)
sortedPlayers.AddToTail(pPlayer);
}

sortedPlayers.Sort(SortPlayerDamage);
Expand Down

0 comments on commit 84ce085

Please sign in to comment.