Page MenuHomeFeedback Tracker

animationPhase values not being properly distributed to the other clients in a server
Assigned, WishlistPublic


There was an issue that came up after the last patch stating that emergency lights on mods had been working fine until 1.44 in which they would no longer work. Someone, Balu, stated in the other report said (after it was resolved) that the command "animationPhase" is not correctly putting the values to the server and all the other clients. I will just copy and paste his response here

"Ok, we were able to find what causes this strange behaviour.
The value of the "animationPhase" which is used to determine which siren and/or which light should be on is not properly send to all clients. In our example the animationPhase = 0.2 is set for the driver and everyone else receives values like 0.2000767 which causes the switch case(0.2) to fail.

But please Bohemia elaborate why this value is not propogated correctly."

So as he asked that if this could be answered and I would like it to be checked and so would a lot of us, as this is not a "Mod" issue as he stated because they had worked fine before the 1.44 update. May we please have an explanation as to why this is happening because it is making it hard to fix things like this when there is really nothing we can do about a value being placed in the server wrong. Thank you for your time reading this rant and I am sorry that I had to bring this up after it had been resolved before anyone could reply to figure out the real issue.


Legacy ID
Steps To Reproduce

Just test the animationPhase command and in theory (if the above is correct) it will not produce the same values to the other clients in the server.

Additional Information

I have seen that this is only happening to the blufor police vehicles and not the independent Ambulances which is quite odd as well.

Event Timeline

Ace16huey edited Steps To Reproduce. (Show Details)May 9 2015, 4:14 AM
Ace16huey edited Additional Information. (Show Details)
Ace16huey set Category to Multiplayer.
Ace16huey set Reproducibility to Always.
Ace16huey set Severity to None.
Ace16huey set Resolution to Open.
Ace16huey set Legacy ID to 2819418901.May 8 2016, 12:04 PM
Ace16huey edited a custom field.
Balu added a comment.May 11 2015, 4:07 PM

It is limited to the police vehicles because all these vehicles use the same script in which the animationPhase is a float value like 0.2 , 0.4, 0.6 and so on.
The Jonzie Ambulance instead uses integer values like 2, 4, 6 and so on.

Now the problem is that due to some reasons these float values are not transferred to all clients properly. Even numbers like the ones used in the ambulance script are transfered correctly.

I assume it has something to do with bandwith optimization. Which in general is a good thing but in this special case screwed us all over :D

Anyhow if u need a quick fix just edit the scripts in your pbo's to use even numbers or round the float values to a correct value like this:
_phase = _phase * 10;
_phase = round _phase;
_phase = _phase / 10;
This yields the correct value.

But this is rather annoying work because this has to be done for every vehicle and for multiply scripts like sirens, lights and so on

I was just thinking that during the day. Thank you for this info. I just hope that the other people with this issue get back to this as well as the sirens and lights are a big thing in these life mods.

Is there any update on this info or?

Any updates on a fix?

I have been waiting too. It must be an issue if no one knows what's going on

What is the fix...?

Who knows, bohemia will not comment on the eta of this fix. Sad. So may communitys just here in limbo waiting on people who fail to care or listen. Bohemia, if you start to care about your customers please take a look at this. My community has 2000 players, 100+ active daily and I know there are bigger communitys then us out there waiting on the same fix. Please just give us a update, something, anything.

Well the fix that Balu stated, does work. You have to put that in just about every file in the police car mods that use animationPhase. It took me a little while to do but I did it and everything is working correctly now. Hope that that will help all that need it

condition = "driver this == player && (this animationPhase 'ani_lightbar' != 0.1)";

				statement = "this animate ['ani_lightbar', 0.1], this animate ['ani_directional', 0.2]";

So you make the .1 and .2 whole numbers?

_phase = _phase * 10;
_phase = round _phase;
_phase = _phase / 10;

Put that right under where the _phase variable is and it should work. You may need to change the variables in on of the files because you have to do it 3 times. I don't remember which one it is

I can confirm the fix mentioned above has fixed the lighting issues on the server I am running.

However when the code 3 option is selected only the local client can hear it not other clients. I tried the above code in the sirens script aswell already. Is there another fix for this?

Take a look at the variable "_phase". Thay might not be the variable you need to use. The phase may be assigned to a different variable.