Answer to Your Question
Hi there!
There’s actually a really simple reason its not an infinite loop:
if (Role < ROLE_Authority)
{
ServerSetRunning(bNewRunning, bToggle);
}
Role < ROLE_Authority means this code only runs if you’re not the server.
The server calls the code, and skips that line, so its not an infinite loop
The purpose of the code structure is to say
"if you are not the server, then make sure the server does this too"
**Restructured Code For Clarity**
Personally I'd restructure the code to make the above sentence more clear
```
void AShooterCharacter::SetRunning(bool bNewRunning, bool bToggle)
{
//Set!
bWantsToRun = bNewRunning;
bWantsToRunToggled = bNewRunning && bToggle;
//Update!
UpdateRunSounds(bNewRunning);
//Make sure the server proxy runs this code too!
if (Role < ROLE_Authority)
{
ServerSetRunning(bNewRunning, bToggle);
}
//♥ Rama
}
```
Network Summary
This code basically lets the locally controlled proxy update itself via the server for all its other proxies on other people’s machines.
Rather than having the server calculate and know to tell everyone, the locally controlled proxy, who first calls SetRunning, then tells everyone over the network to update their version of the local proxy.
So if you are the player as client 3 and you set yourself to running, this code tells the rest of the network to update their version of your player character proxy.
This avoids the server having to calculate setRunning for everyone, which is impossible for locally controlled characters because only you as the player know when you want to SetRunning to be true so you can run!
This code structure puts you in control as a client and uses the server to tell everyone else that you’ve chosen to start running.

Rama