void ASPlayerController::Suicide() { if (IsInState(NAME_Playing)) { ServerSuicide(); } }
void AVehiclePawn::Suicide() { if( GetWorld() != NULL ) { AVehicleGameMode* const MyGame = GetWorld()->GetAuthGameMode<AVehicleGameMode>(); if( ( MyGame != NULL )&& ( MyGame->IsRaceActive() == true ) ) { ServerSuicide(); } } }