Tick fires twice

Hi.

I use Tick to decrease a value over time.
While logging the value I realised that it logs twice.
I started on 0 and tick decrases it over time when it gets incremented, but when I increment the value the 2 logs are not the same anymore. One stays at the start value while the other counts the incremented one down.
If I start on 100 it counts the 100 down but runs out of sync when I increment it.

if (Role < ROLE_Authority)
	{
		UE_LOG(LogTemp, Warning, TEXT("cli curr %f"), CurrentAimErrorMultiplier);
	}
	else
	{
		UE_LOG(LogTemp, Warning, TEXT("serv curr %f"), CurrentAimErrorMultiplier);
	}

The log looks like this then:

LogTemp:Warning: serv curr 75.689728
LogTemp:Warning: serv curr 0.000000
LogTemp:Warning: cli curr 0.000000
LogTemp:Warning: cli curr 75.674194
LogTemp:Warning: serv curr 75.674278
LogTemp:Warning: serv curr 0.000000
LogTemp:Warning: cli curr 0.000000
LogTemp:Warning: cli curr 75.658745
LogTemp:Warning: serv curr 75.655838
LogTemp:Warning: serv curr 0.000000

This is totally weird to me since this does not happen in other classes.
What can be the reason for this?

Tick is a simulated function, meaning it’ll run on both client and server in a networked environment, so you’re seeing the print out of both the authority version of the class as well as the clients version.

As for the client never updating, my guess is that CurrentAimErrorMultiplier is only ever set on the authority (server) side but not replicated.

If you think this is a bug, write up a bug report and post it in the Bug Reports section. One of the Support guys will look at it and if it is a issue, they will log it for the developers to fix.

Make sure to be as detailed as possible with how to recreate the issue. As in, what classes you are extending from. Your environment settings. etc…

You can see an example here:

https://answers.unrealengine.com/questions/12363/how-do-i-report-a-bug.html

No that is the weird thing.
It does get set on client and server as you can see in the log and the code snippet.
Maybe the title is misleading, it should be “Tick fires four times” then ^^.

I copy pasted this to a different class and it is working perfectly there.

Also the variable does not get replicated.