class DLGFILTER_Deaths extends DialoguePlayerFilter;

function float CalcPlayerValue(KF_PlayerDialogue Dialogue, int DlgIdx, PlayerReplicationInfo PRI)
{
	local Controller C;
	local float TopValue;
	
	for ( C = PRI.Level.ControllerList; C != None; C = C.NextController ) {
		if ( C.PlayerReplicationInfo != none )
			TopValue = fmax(TopValue, C.PlayerReplicationInfo.Deaths);
	}
	
	if ( TopValue == 0.0 )
		return 0.0;
		
	return Value * PRI.Deaths / TopValue;
}

defaultproperties
{
}
