Server events are only run on client

Hello!

I’m having problems understanding something I thought I’d already understood. Basically, for some reason, my Server Reliable RPC is being called on the client. My player controller establishes 2 functions. The first one (TryAssignPlayerSeat) is called on the client from the input system (confirmed by the VS debug break as Role_AutonomousProxy), however the second one (Server_TryAssignPlayerSeat) is ALSO called on the client and not on the server.

Header

UCLASS()
class AFirstProjectPlayerController : public APlayerController
{
	GENERATED_BODY()

public:
	AFirstProjectPlayerController();

	UFUNCTION(BlueprintCallable)
	void TryAssignPlayerSeat(int32 PlayerSeatIndex);
	UFUNCTION(Server, Reliable)
	void Server_TryAssignPlayerSeat(int32 PlayerSeatIndex);
...
};

CPP

void AFirstProjectPlayerController::TryAssignPlayerSeat(int32 PlayerSeatIndex)
{
	Server_TryAssignPlayerSeat(PlayerSeatIndex);
}

void AFirstProjectPlayerController::Server_TryAssignPlayerSeat_Implementation(int32 PlayerSeatIndex)
{
	//Called... on client? Why?
}

I thought this was pretty much boilerplate vanilla RPC stuff, with nothing very funky going on. What am I missing?

I also have the same behavior with fully blueprinted events:


Notice top left specifies this is happening on the client. Additionally, no other breaks are triggered.

I’m debugging with PIE as Play as Client with 1 Client.

Extra information:

Changing PIE configuration and multiplayer options gives the exact same result.

I have also confirmed this is all happening on the main thread.

Using a completely fresh Player Controller type parented to the engine’s type directly also yields the same result.

Using console and calling ServerExec also seems to be functional and call the function on the server. However, my own function, which is exactly the same, is not.

Replying here since I’ve found the solution:

Apparently the new version of the Enhanced Input System will flag all delegate executed functions as Local instead of Remote.

Adding “PublicDefinitions.Add(“ENABLE_EDITOR_CALLABLE_INPUT_DELEGATES=0”);” in the EnhancedInput.Build.cs as mentionned in the EnhancedInputComponent.h will fix the problem by reverting the new behavior.