Actor tick called twice or more before animation tick?

Hi. I’ve been developing a first person sword fighting game with LAN connection. One of the players acts as the server too. For moving the sword, we are using blend spaces from pose to pose and we move that position based on input.

For different reasons we are calculating velocity by getting the difference between the position of a socket this frame and the last frame. However, for some reason it looks like this is being called twice and not giving a chance to the animation to move the sword, resulting in velocity being 0 or close to 0 and this screws other calculations based on this value, but the thing is that this only happens on the second player (the player that joins the match).

Here is the code:

void AWeaponBase::UpdateSocketData()
{
	
	for (USocketData* socket : sockets)
	{
		socket->UpdateData(WeaponMesh->GetSocketLocation(socket->socketName));
		if (Role == ROLE_Authority)
		{
			ABaS_PlayerController* pC = Cast<ABaS_PlayerController>(ownerKnight->GetController());
			if (pC && pC->playerID == selectedPlayer && socket->socketName.ToString().Contains("tip"))
			{
				GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, FString::SanitizeFloat(socket->velocity));
			}
		}
	}
}

Gets called in the tick function:

void AWeaponBase::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	if (Role == ROLE_Authority)
	{
		if (bIsOnCooldown)
		{
			cooldownTimer += DeltaTime;
			//TODO: replace with collisionCooldown variable
			if (cooldownTimer > 0.5f)
			{
				cooldownTimer = 0;
				bIsOnCooldown = false;
			}
		}
		UpdateSocketData();
	}
}

USocketData is our own class and this is the function that calculates velocity:

void USocketData::UpdateData(const FVector& currentLocation)
{
	currentDirection = currentLocation - lastPosition;

	velocity = (currentLocation - lastPosition).Size();

	lastPosition = currentLocation;
}

Here are some screen shots:

This is the player 1 playing an idle animation. Note that the values being printed are never 0

This is player 2 doing an idle animation as well. Note the zeroes

This is player 2 again but now he is doing a swing. Note the higher values but there still are some odd zero values in there.

This is really important since we are using this value to calculate damage and this bug is resulting in doing virtually zero damage when it should be otherwise.
I’ve been trying to solve this all day with no success, maybe I’m forgetting something obvious. Any help will be immensely appreciated

Notes:

  • This calculations are server side.
  • All the data comes from server actors, not client actors
  • The screenshots show a stand alone editor window with the server.