mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-02 15:53:11 -05:00
Acknowledge receiving requests from the server
There will be a more detailed explanation of this in the corresponding server commit.
This commit is contained in:
@@ -188,7 +188,7 @@ $serverlibrary = $serverlibs[$serverprotocol];
|
||||
<script src="<?php echo $serverlibrary; ?>"></script>
|
||||
<script src="/js/teambuilder.js?v0.7.12"></script>
|
||||
<script src="/js/ladder.js?v0.8.2"></script>
|
||||
<script src="/js/sim.js?v0.8.2"></script>
|
||||
<script src="/js/sim.js?v0.8.3"></script>
|
||||
|
||||
<script>
|
||||
document.getElementById('loading-message').innerHTML += ' DONE<br />Connecting to login server...';
|
||||
|
||||
@@ -220,6 +220,7 @@ function BattleRoom(id, elem) {
|
||||
}
|
||||
};
|
||||
this.init = function (data) {
|
||||
this.version = (data.version !== undefined) ? data.version : 0;
|
||||
if (selfR.battle.activityQueue) {
|
||||
// re-initialize
|
||||
selfR.battleEnded = false;
|
||||
@@ -323,6 +324,9 @@ function BattleRoom(id, elem) {
|
||||
}
|
||||
if (update.request) {
|
||||
selfR.me.request = update.request;
|
||||
if (selfR.version > 0) {
|
||||
selfR.send('/ackrequest ' + selfR.me.request.rqid);
|
||||
}
|
||||
selfR.me.request.requestType = 'move';
|
||||
if (selfR.me.request.forceSwitch) {
|
||||
selfR.me.request.requestType = 'switch';
|
||||
|
||||
Reference in New Issue
Block a user