Merge pull request #3349 from migiyubi/make-scene-restartable

Make scene restartable
This commit is contained in:
Richard Davey 2018-03-09 15:41:03 +00:00 committed by GitHub
commit 40818ba57b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,18 +105,15 @@ var ScenePlugin = new Class({
{
if (key === undefined) { key = this.key; }
if (key !== this.key)
if (this.settings.status !== CONST.RUNNING)
{
if (this.settings.status !== CONST.RUNNING)
{
this.manager.queueOp('stop', this.key);
this.manager.queueOp('start', key);
}
else
{
this.manager.stop(this.key);
this.manager.start(key, data);
}
this.manager.queueOp('stop', this.key);
this.manager.queueOp('start', key);
}
else
{
this.manager.stop(this.key);
this.manager.start(key, data);
}
return this;