Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Players that are logout from the server are not removed locally #3

Closed
David-Estevez opened this issue Oct 24, 2014 · 3 comments
Closed
Assignees
Labels

Comments

@David-Estevez
Copy link
Collaborator

The players that, for any reason, are logged out from the RdServer are never updated locally.

Two possible solutions are:

  • Remove local players with the players received from the server directly (without any checks)
  • Add a 'belief' parameter that is decreased each time the local player receives an update that does not include the player that was logged out
@jgvictores
Copy link
Member

Solution 1 seems okay for now.

Additionally, if a robotDevastation instance crashes, it is not logged out. Maybe add a heartbeat?

@David-Estevez
Copy link
Collaborator Author

Note for future @David-Estevez: implement check myself is in received player list.

@David-Estevez
Copy link
Collaborator Author

Done at af93a90. Note for future David is left as a separe issue (see #83).

PeterBowman added a commit that referenced this issue Apr 16, 2017
One could still create copies with the following code:

// Create singleton
MockImageManager::RegisterManager();
ImageManager * im = ImageManager::getImageManager(MockImageManager::id);

// Violate singleton's contract with copy constructor
MockImageManager * temp = (MockImageManager*)im; // for conciseness
MockImageManager mim1(*temp);                         // copy-ctor #1
MockImageManager mim2 = *temp;                        // copy-ctor #2
MockImageManager mim3 = MockImageManager(*temp);      // copy-ctor #3
MockImageManager *pmim = new MockImageManager(*temp); // copy-ctor #4

// Copy assignment operator
mim1 = mim3;

See also http://stackoverflow.com/a/6811055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants