What is the best way to test if a player death in TTT is the final, round-winning death of a TTT round? My current solution (which feels ugly and inefficient) is to count up how many players are left alive in each role and check the role of the dead player, in a PlayerDeath hook. It crossed my mind to delay the check a few seconds and use GetRoundState(), but with slow motion setting up the timer with the right delay is a little finicky. There is a hook for the round ending, but how would I get the data of the last death?
Are there some utility functions somewhere that can help? Where would I find them (I have found util.GetAlivePlayers() and CountTraitors())?
Any help would be appreciated.