Wouldn't this cause errors on a dedicated server?

Wouldn’t this approach cause an error on a dedicated server?
If the game is only going to be played with a listen server the implementation is fine, but with a dedicated server the GetPlayerController call will not work because we are doing a multicast RPC. The server will try to get a player controller and fail. Of course we can just do a quick HasAuthority check and only disable input if the check returns false, but I wanted to call it out just in case someone else tries to test this with a dedicated server.

Hi and welcome to the community.
You’re probably right that it might cause issues but I can’t be sure. The course isn’t aimed at dedicated servers really so the code wouldn’t have tested that way.

They generally would have different considerations and you would approach things differently.

Privacy & Terms