void UCheatManager::Walk() { APawn* Pawn = GetOuterAPlayerController()->GetPawn(); if (Pawn != NULL) { ACharacter* Character = Cast<ACharacter>(Pawn); if (Character) { Character->ClientCheatWalk(); if (!Character->IsLocallyControlled()) { Character->ClientCheatWalk_Implementation(); } } } }
void UCheatManager::Ghost() { APawn* Pawn = GetOuterAPlayerController()->GetPawn(); if (Pawn != NULL) { GetOuterAPlayerController()->ClientMessage(TEXT("You feel ethereal")); ACharacter* Character = Cast<ACharacter>(Pawn); if (Character) { Character->ClientCheatGhost(); if (!Character->IsLocallyControlled()) { Character->ClientCheatGhost_Implementation(); } } } }