The image explains it all. My fire mode changes on owning client and server but other clients don’t see it. If server changes it’s weapon, nobody sees. Fire mode is an replicated enumaration.
Here is the dropbox link for the people can’t see the image
Okey. What happens (step by step).
- Client 1 change FireMode
- Client 1 tell Server change FireMode on server
- Server change FireMode
- Server replicate FireMode to client 2 and 3 (forexample)
- Client 1 made update weapon
- Client 1 tell server update weapon
- Server update weapon
Thats all. So. Weapon was updated only on Client 1 (step 5) and server (step 7). Server autoreplicate FireMode on clients, but it never tell update weapon to client. So client 2 and 3 have correct vars, but their models was never updated.
- Force server tell clients updates their weapons (Multicast or Clients RPC on every controller)
- Make FireMode “RepNotify Replicate” with call “Weapon Update” inside “FireMode onRep”…
Firstly, thanks for the explanation.
But the problem is, other clients don’t have correct vars. I made a small debug print string to test it. Looks like only owning client and server has the right versions and not even auto-replicated from server to clients and i can’t understand why. But both component and variable have replication.
Edit: I tried to add print string to RepNotify, other clients don’t even fire that print string. Only input client and server do.
Is there any network bug about blueprintable components? Because my weapon is a component made with blueprint, Component Replicates is True on that.
But i just moved my Fire Mode enumaration to character and it replicates properly to other clients too.
I found the bug report and it couldn’t made it’s way to 4.7 hotfixes as i see. Blueprint components can’t replicate their variables. Here is the link to it.
What is a “player weapon”? its some another actor or what?
It’s a blueprintable component, this feature came with 4.7. As i say comment below, i tried to move my enumaration to character and it replicated properly with same setup. I just found that there is a bug on last launcher 4.7 version has a bug that blueprint components can’t replicate their variables even though activating Componenent Replicates. I posted bug report too. It’s fixed but couldn’t make it’s way to 4.7.6 i guess.