During first worldUpdate set doll positions after spawning players

Otherwise we get a warning.
This commit is contained in:
logsol 2016-10-01 14:01:12 +02:00
parent a5f828a861
commit 016c48ec3b
2 changed files with 5 additions and 5 deletions

View file

@ -78,10 +78,6 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque
GameController.prototype.onClientReadyResponse = function(options) {
var i;
if (options.worldUpdate) {
this.onWorldUpdate(options.worldUpdate);
}
if (options.runtimeItems) {
for (i = 0; i < options.runtimeItems.length; i++) {
@ -107,6 +103,10 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque
}
}
if (options.worldUpdate) { // needs to stay after onSpawnPlayer otherwise others doll will not be there
this.onWorldUpdate(options.worldUpdate);
}
//this.audioPlayer = new AudioPlayer(Settings.AUDIO_PATH + "city.mp3");
//this.audioPlayer.play();
};