One list but how its diffrent in client side and server side

Hi,
we add and remove from lists (myUnits and muBuildings) twice
one time from server and one time from client
how it works
Isn’t it one list? why its different in both sides

Hi there,
An instance of those lists appears on the Server and on each Client. This is important since each client (and server) needs to have it’s own versions to identify it’s own units and buildings. Then we do authority checks to make sure that the units and buildings are only removed from each list once, and that they are removed from the correct list.

1 Like

so lists are not different and it includes all units but we (client) have access to part of it
so size of list’s and content of list is same?

The lists are different. There is a version of the list on the server, that is different than the version of the list on the client. Each server/client creates the list and adds/removes only the appropriate units to their version of the list.

1 Like

Thanks :heart_decoration:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms