I am using UE5, within my Tick Function I’m using the if (IsLocallyControlled()) statement, but my authority is still being called within it. I recently added !HasAuthority() to the Statement with an AND, but I feel like LocallyControlled should take care of it by itself right?
void AGoKart::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
//If it's the client not the server
if (IsLocallyControlled())
{
FGoKartMove Move = CreateMove(DeltaTime);
UnacknowledgedMoves.Add(Move);
UE_LOG(LogTemp, Warning, TEXT("Role: %s"), *GetEnumText(GetLocalRole()));
UE_LOG(LogTemp, Warning, TEXT("Queue Length: %d"), UnacknowledgedMoves.Num());
Server_SendMove(Move);
SimulateMove(Move);
}
DrawDebugString(GetWorld(), FVector(0, 0, 100), GetEnumText(GetLocalRole()), this, FColor::White, DeltaTime);
}