mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
During first worldUpdate set doll positions after spawning players
Otherwise we get a warning.
This commit is contained in:
parent
a5f828a861
commit
016c48ec3b
2 changed files with 5 additions and 5 deletions
|
|
@ -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();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue