Catching errors in socket callbacks
Catching errors in socket callbacks to avoid having the server crashing when an error occurs.
This commit is contained in:
parent
b50f28176e
commit
256fa51e24
3 changed files with 73 additions and 54 deletions
|
@ -62,7 +62,7 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
|
|||
|
||||
let activeEvents = this.userInputManager.getEventListForGameTick();
|
||||
let speedMultiplier = activeEvents.get(UserInputEvent.SpeedUp) ? 25 : 9;
|
||||
let moveAmount = speedMultiplier * delta;
|
||||
let moveAmount = speedMultiplier * 20;
|
||||
|
||||
let x = 0;
|
||||
let y = 0;
|
||||
|
@ -102,6 +102,5 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
|
|||
this.setX(MessageUserPosition.position.x);
|
||||
this.setY(MessageUserPosition.position.y);
|
||||
this.setDepth(MessageUserPosition.position.y);
|
||||
this.updatePlayerNamePosition(MessageUserPosition.position.x, MessageUserPosition.position.y);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue