]> git.cworth.org Git - empires-server/commit
Allow a player to reclaim a disconnected player of the same name
authorCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 17:36:39 +0000 (10:36 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 17:36:39 +0000 (10:36 -0700)
commit3740e6f5ca87eac244bc2969b19a37939e9efc28
tree897649e12b9c28c09257ba909f2c4c941ce7c164
parentd7b96ee0316021fa7a5e428950e2d8a9d8754582
Allow a player to reclaim a disconnected player of the same name

I've seen cases where players close their browser window, and then
re-open it with the URL only to find that they aren't actually in the
same session so they end up with an unwanted "Name01" name instead of
"Name" and lose access to their score.

We make things work the way users want here by letting them claim an
existing player object by simply using the same name.

Of course, this does assume nobody will want to do this
nefariously. I'm perfectly fine with that, (since the whole point of
all of this is to enable friendly games). If, at some point in the
future somebody cared to lock people out from doign this, then we can
imagine a future where:

1. Users could actually log in

2. Users could lock a game to only allow logged-in users
game.js