add setname client command
This commit is contained in:
parent
52e1673e3e
commit
1af386d9f5
10 changed files with 50 additions and 11 deletions
|
@ -19,7 +19,7 @@ class Connection {
|
|||
});
|
||||
|
||||
socket.on('setName', data => {
|
||||
this.player.name = data.name.slice(0, 20) || 'Fish';
|
||||
this.player.name = ('' + data).slice(0, 20) || 'Fish';
|
||||
});
|
||||
|
||||
socket.on('inputs', data => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue