Actor "trace back" only works on one client

Every playerState has a “current selected ACity instance” variable. When an ACity is spawned (On server), server writes a pointer to this ACity to PlayerStates “current selected…” and replicates this value to client (owner only). That works on all Clients. All clients can access this pointer and do stuff with it.
To switch between different citys, player clicks one he whats to do things on. Since server has to know, that all upcoming rpc calls should now concern a (maybe) different ACity instance, Client sends a RPC call to server telling him, which ACity he clicked. Then again, this ACity pointer is set as “current selected City” and replicated back to client. But this only works on EXACTLY one client. Sometimes client 1, sometimes client 2… On other ones, server replicates just a NULL-Pointer after client sended a clicked ACity. Also, only on one client ( one code works on) city-pointer gets “converted” when passed to server ( memory adresses are not same, eg game converted clients city pointer to servers city pointer), whereas on every other client pointer-adress stays exactly same. A.) why and B.) why does this work so far? How comes that this object really exists on server? and C.) why does this only happen on one client? I would understand it if it would happen on every client, but on every one EXCEPT one?
Internally, server accepts all pointers and works correctly with them…

A special case is, when I use a non dedicated server and spawn an instance over servers game instance, “current focused City” replication always correctly replicates pointer (but correctly doesn’t mean it’s ACity instance originally spawned, but it doesn’t replicate a NULL pointer as it does to clients)

As I mentioned, Clients are all exactly same, every initialisation follows exact same process. And effect is exactly same, on dedicated and listen server. I can’t explain this behaviour and fear it is a Engine-Bug… Or am I missing something? Everything is set to bAlwaysRelevant already. I checked all ENetRoles at different stages of code, every client has same Role-Values…

I really appreciate some information about that…

Hi ,

Can you let us see code in .h and .cpp files for classes involved? Or screenshots of Event Graphs if you’re doing it through Blueprints. Thanks!

Hi ,

We haven’t heard back from you in a while, so I’m resolving this post for tracking purposes. If you’re still having trouble communicating this information from Server to all Clients, please feel free to respond with .h and .cpp files requested above and we can investigate. Thanks!