So I was studying the Shootergame code and was wondering about this:
If ServerSetRunning_Implementation() is called, which calls SetRunning(), which calls ServerSetRunning(), wouldn't that cause an infinite loop?
Second question:
Is there a Blueprint equivalent to these _Implementation/_Validate functions?
Thank you.
Code:
void AShooterCharacter::SetRunning(bool bNewRunning, bool bToggle){ bWantsToRun = bNewRunning; bWantsToRunToggled = bNewRunning && bToggle; if (Role < ROLE_Authority){ ServerSetRunning(bNewRunning, bToggle); } UpdateRunSounds(bNewRunning); } bool AShooterCharacter::ServerSetRunning_Validate(bool bNewRunning, bool bToggle){ return true; } void AShooterCharacter::ServerSetRunning_Implementation(bool bNewRunning, bool bToggle){ SetRunning(bNewRunning, bToggle); }
Second question:
Is there a Blueprint equivalent to these _Implementation/_Validate functions?
Thank you.
Comment