I get an error on the line with “MutableThis->ClientPredictionData = new FNetworkPredictionData_Client_MyMovement();” It says that the default constructor was deleted. In visual studio it says the only other overload function was to pass in a reference to an FNetworkPredictionData_Client_MyMovement. I need to make the movement component recognize my custom addmove() so the I can sprint and double jump in my networked game.
class FNetworkPredictionData_Client* UMyCharacterMovementComponent::GetPredictionData_Client() const
{
check(PawnOwner != NULL);
check(PawnOwner->Role < ROLE_Authority);
if (!ClientPredictionData)
{
UMyCharacterMovementComponent* MutableThis = const_cast<UMyCharacterMovementComponent*>(this);
MutableThis->ClientPredictionData = new FNetworkPredictionData_Client_MyMovement();
MutableThis->ClientPredictionData->MaxSmoothNetUpdateDist = 92.f;
MutableThis->ClientPredictionData->NoSmoothNetUpdateDist = 140.f;
}
return ClientPredictionData;
}