throttle ready send

This commit is contained in:
ntr 2019-10-25 19:39:54 +11:00
parent 87ea0eb81f
commit cfd2caa4d3
2 changed files with 5 additions and 1 deletions

View File

@ -62,6 +62,7 @@ function Welcome() {
<p> <p>
Free to play, no pay to win. Register to start playing.<br /> Free to play, no pay to win. Register to start playing.<br />
</p> </p>
<a href='https://www.youtube.com/watch?v=IyPaDX69i2g'>Tutorial Playthrough on YouTube</a>
</div> </div>
{pageEl()} {pageEl()}
</section> </section>

View File

@ -1,6 +1,8 @@
const toast = require('izitoast'); const toast = require('izitoast');
const cbor = require('borc'); const cbor = require('borc');
const throttle = require('lodash/throttle');
const SOCKET_URL = const SOCKET_URL =
`${window.location.protocol === 'https:' ? 'wss://' : 'ws://'}${window.location.host}/api/ws`; `${window.location.protocol === 'https:' ? 'wss://' : 'ws://'}${window.location.host}/api/ws`;
@ -363,7 +365,8 @@ function createSocket(events) {
sendGameTarget, sendGameTarget,
sendInstanceAbandon, sendInstanceAbandon,
sendInstanceReady, // some weird shit happening in face off
sendInstanceReady: throttle(sendInstanceReady, 500),
sendInstancePractice, sendInstancePractice,
sendInstanceQueue, sendInstanceQueue,
sendInstanceState, sendInstanceState,