I’m trying to find a simple bool or similar antic to stop the server from running a useless function.
From what I understand, the Server creates a PlayerController for every player there is server side to keep track. The client however, only has THEIR Controller as they have no need to follow the Controller, just the Pawn of other players and AI. No problem. That client’s controller is running functions locally for simulation purposes on certain things without any need from the Server to tell it to do so.
However, without marking a function as Client (which if I understand correctly, means the SERVER is sending a request over the network for that Client to run a function locally for simulation) I am trying to find a way to run the function locally on the owner of the controller only.
Basically I have a function TraceUsable() that runs every tick to let you know if there is something infront of you that is usable or not. The server doesn’t need to run this function every tick for all the controllers as it’s just for UI purposes. It’ll only need run a Validation Server-Sided whenever the player actually presses the use button to make sure they’re not cheating.
So how do I prevent the server from running the function, while allowing the owning controller (which is the only controller available on the client) to call the function locally still? Again, if I set it to "Client’ then that means the server is constantly sending a RPC call that is just tying up bandwidth. There use to be a bNetOwner variable in UDK that I believe would be what I need, but I can’t seem to find a similar tag.
void AROTPlayerController::Tick(float DeltaTime)
{
if(bNetOwner)
TraceUsable();
}