Only sending move events if the player actually moved
authorDavid Négrier <d.negrier@thecodingmachine.com>
Mon, 4 May 2020 21:11:59 +0000 (23:11 +0200)
committerDavid Négrier <d.negrier@thecodingmachine.com>
Mon, 4 May 2020 21:11:59 +0000 (23:11 +0200)
commit86abdfe30b53baf07e1da56f3ca8fb6056979f61
tree9f7787a5408b050f539adbd601b604ef66f3d3e8
parentb51ce518477950db685c761fea30753138f9567f
Only sending move events if the player actually moved

If the player did not move a pixel (and if it did not change direction), then do not send an event to save bandwidth and processing.
front/src/Phaser/Entity/PlayableCaracter.ts
front/src/Phaser/Player/Player.ts