Calling NetMulticast function resets(?) playercontroller on client

I’m finding something strange when trying to test using a NetMulticast in playercontroller. I have the following:

CPlayerController.h



UFUNCTION(Reliable, NetMulticast)
		void MulticastRPCupdatePlayerState();
	void MulticastRPCupdatePlayerState_Implementation();


CPlayerController.cpp



void ACPlayerController::BeginPlay() {
	Super::BeginPlay();
	UKismetSystemLibrary::PrintString(this, TEXT("PC begin "), true, true, FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), 40.0);
}
void ACPlayerController::SetupInputComponent() {
	InputComponent->BindAction("Jump", IE_Pressed, this, &ACPlayerController::MulticastRPCupdatePlayerState);
}
void ACPlayerController::MulticastRPCupdatePlayerState_Implementation() {
	UKismetSystemLibrary::PrintString(this, TEXT("PC multicast "), true, true, FLinearColor(0.000000, 0.660000, 1.000000, 1.000000), 40.0);
}


When I start the game I get a messages from both server and client of “PC begin” (twice from server because client connected) which seems all fine and good. If I press “Jump” on client, client gives a message “PC multicast”, which is expected as well.

The strange part is when I press “Jump” key on the server than I get Server:“PC Multicast”; Client:“PC Multicast”; and THEN…Client:“PC begin”. The clients camera is also reset and any further controls pressed on the client do not register (including ESC to exit testing). The server camera and controls continue to work. Now why is it calling the BeginPlay on the playercontroller again on the client when calling the Multicast function? It’s like it’s resetting the playercontroller. Then keys don’t work and camera goes back to pawn (I have bAutoManageActiveCameraTarget=false in my playercontroller). So to reiterate:

“Jump” key pressed on server
Server:“PC multicast”
Client:“PC multicast”
Client:“PC begin”
All key presses stop working on client and bAutoManageActiveCameraTarget seems to go back to true.

Here is the full code (lots of junk because just been testing/learning) in case there is anything else that is causing this:

CPlayerController.h



#pragma once
#include "Runtime/Engine/Classes/Kismet/KismetSystemLibrary.h"
#include "InputCoreTypes.h"
#include "GameFramework/PlayerController.h"
#include "menu3DC.h"
#include "CPlayerState.h"
#include "CPlayerController.generated.h"

/**
*
*/
UCLASS()
class ECONOMICALLYVIABLE_API ACPlayerController : public APlayerController {
	GENERATED_BODY()

public:
		ACPlayerController();
	virtual void BeginPlay() override;
	//virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
	virtual void SetupInputComponent() override;
	void doJump();
	void stopJump();
	void MoveForwardBack(float);
	void MoveLeftRight(float);
	void RotateCharacter(float);
	void menuDown();
	void menuToggle();


	UFUNCTION(Reliable, NetMulticast)
		void MulticastRPCupdatePlayerState();
	void MulticastRPCupdatePlayerState_Implementation();


	ACPlayerState* currentPlayerState;

};


CPlayerController.cpp



#include "EconomicallyViable.h"
#include "CPlayerController.h"
#include "GameStateC.h"
ACPlayerController::ACPlayerController() {
	bAutoManageActiveCameraTarget = false;

}
void ACPlayerController::BeginPlay() {
	Super::BeginPlay();
	UKismetSystemLibrary::PrintString(this, TEXT("PC begin "), true, true, FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), 40.0);
}
void ACPlayerController::SetupInputComponent() {
	Super::SetupInputComponent();
	check(InputComponent); //dunno if needed after setupinputcomponent....
	EnableInput(this);

	InputComponent->BindAction("Jump", IE_Pressed, this, &ACPlayerController::MulticastRPCupdatePlayerState);


	InputComponent->BindAxis("LeftY", this, &ACPlayerController::MoveForwardBack);

	InputComponent->BindAxis("LeftX", this, &ACPlayerController::MoveLeftRight);
	InputComponent->BindAxis("RightY", this, &ACPlayerController::RotateCharacter);
	InputComponent->BindAxis("RightX", this, &ACPlayerController::RotateCharacter);

}
void ACPlayerController::MulticastRPCupdatePlayerState_Implementation() {
	UKismetSystemLibrary::PrintString(this, TEXT("PC multicast "), true, true, FLinearColor(0.000000, 0.660000, 1.000000, 1.000000), 40.0);
}
void ACPlayerController::menuToggle() {
	ACPlayerState* currentPlayerState = Cast<ACPlayerState>(this->PlayerState);
	Amenu3DC* thisMenu = currentPlayerState->playerMenu;
	thisMenu->menuToggle();

}
void ACPlayerController::menuDown() {
	AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
	if (GameState != nullptr) {
		ACharacter* MyPawn = Cast<ACharacter>(GetPawn());
		if (MyPawn) {
			AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
			Amenu3DC* thisMenu = currentPlayerState->playerMenu;
			GEngine->AddOnScreenDebugMessage(-1, 40, FColor::Red, FString::Printf(TEXT("playernum %i"), currentPlayerState->playerNumber));
		}
	}

}


void ACPlayerController::doJump() {
	AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
	if (GameState != nullptr) {
		ACharacter* MyPawn = Cast<ACharacter>(GetPawn());
		if (MyPawn) {
			if (MyPawn->CanJump()) { //not totally sure if check is needed, was in blueprints originally
				MyPawn->Jump();
			}
		}
	}

}

void ACPlayerController::stopJump() {
	AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
	if (GameState != nullptr) {
		ACharacter* MyPawn = Cast<ACharacter>(GetPawn());
		if (MyPawn) {
			MyPawn->StopJumping();
		}
	}

}

void ACPlayerController::MoveForwardBack(float Value) {
	AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
	if (GameState != nullptr) {
		ACharacter* MyPawn = Cast<ACharacter>(GetPawn());
		if (MyPawn) {
			if ((MyPawn->Controller != NULL) && (Value != 0.0f)) {
				FRotator CameraRotation = PlayerCameraManager->GetCameraRotation(); //Camera (mario) style rotation
																					// Limit pitch when walking/falling
				if (MyPawn->GetCharacterMovement()->IsMovingOnGround() || MyPawn->GetCharacterMovement()->IsFalling()) {
					CameraRotation.Pitch = 0.0f;
				}

				const FVector Direction = FRotationMatrix(CameraRotation).GetScaledAxis(EAxis::X);
				MyPawn->AddMovementInput(Direction, Value);

				if (FVector(GetInputAxisValue("RightY"), GetInputAxisValue("RightX"), 0.0).Size() < 0.1) {
					FVector ControllerAxisVector = FVector(GetInputAxisValue("LeftY"), GetInputAxisValue("LeftX"), 0.0);
					FRotator ControllerAxisRotator = ControllerAxisVector.Rotation();
					FQuat AQuat = FQuat(ControllerAxisRotator);
					FQuat BQuat = FQuat(CameraRotation);
					FRotator myRotate = FRotator(BQuat*AQuat);
					MyPawn->GetController()->SetControlRotation(myRotate);
				}
			}
		}
	}
}
void ACPlayerController::MoveLeftRight(float Value) {
	AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
	if (GameState != nullptr) {
		ACharacter* MyPawn = Cast<ACharacter>(GetPawn());
		if (MyPawn) {
			if ((MyPawn->Controller != NULL) && (Value != 0.0f)) {
				// For non camera controls (tank controls?) FRotator Rotation = MyPawn->Controller->GetControlRotation();
				FRotator CameraRotation = PlayerCameraManager->GetCameraRotation(); //Camera (mario) style rotation
																					// Limit pitch when walking/falling (test to see if needed in my implimentation)
				if (MyPawn->GetCharacterMovement()->IsMovingOnGround() || MyPawn->GetCharacterMovement()->IsFalling()) {
					CameraRotation.Pitch = 0.0f;
				}

				const FVector Direction = FRotationMatrix(CameraRotation).GetScaledAxis(EAxis::Y);
				MyPawn->AddMovementInput(Direction, Value);

				if (FVector(GetInputAxisValue("RightY"), GetInputAxisValue("RightX"), 0.0).Size() < 0.1) {
					FVector ControllerAxisVector = FVector(GetInputAxisValue("LeftY"), GetInputAxisValue("LeftX"), 0.0);
					FRotator ControllerAxisRotator = ControllerAxisVector.Rotation();
					FQuat AQuat = FQuat(ControllerAxisRotator);
					FQuat BQuat = FQuat(CameraRotation);
					FRotator myRotate = FRotator(BQuat*AQuat);
					MyPawn->GetController()->SetControlRotation(myRotate);
				}
			}
		}
	}
}

void ACPlayerController::RotateCharacter(float Value) {
	AGameStateC* GameState = GetWorld()->GetGameState<AGameStateC>();
	if (GameState != nullptr) {

		ACharacter* MyPawn = Cast<ACharacter>(GetPawn());
		if (MyPawn) {
			if ((MyPawn->Controller != NULL) && (Value != 0.0f)) {

				FRotator CameraRotation = PlayerCameraManager->GetCameraRotation();

				FVector ControllerAxisVector = FVector(GetInputAxisValue("RightY"), GetInputAxisValue("RightX"), 0.0);
				FRotator ControllerAxisRotator = ControllerAxisVector.Rotation();

				FQuat AQuat = FQuat(ControllerAxisRotator);
				FQuat BQuat = FQuat(CameraRotation);
				FRotator myRotate = FRotator(BQuat*AQuat);

				float axisVectorSize = ControllerAxisVector.Size();
				if (axisVectorSize > 0.3) { //!! try to prevent changing direction when snap releasing control.  Should test with on/off to see if necessary
					MyPawn->GetController()->SetControlRotation(myRotate);
				}

			}
		}
	}
}