Skip to content

Commit

Permalink
add alive 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 84ce085 commit db67935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cs2_sdk/entity/ccsplayercontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class CCSPlayerController : public CBasePlayerController

SCHEMA_FIELD(CCSPlayerController_InGameMoneyServices*, m_pInGameMoneyServices)
SCHEMA_FIELD(CCSPlayerController_ActionTrackingServices*, m_pActionTrackingServices)
SCHEMA_FIELD(bool, m_bPawnIsAlive);

static CCSPlayerController* FromPawn(CCSPlayerPawn* pawn) { return (CCSPlayerController*)pawn->m_hController().Get(); }
};
2 changes: 1 addition & 1 deletion src/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ GAME_EVENT_F(round_end)
if(!pController)
continue;

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

Expand Down

0 comments on commit db67935

Please sign in to comment.