mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Minor change to enable a V8 optimization
This commit is contained in:
@@ -449,7 +449,7 @@ gdjs.RuntimeGame.prototype.startStandardGameLoop = function() {
|
||||
currentScene.loadFromScene(firstsceneData);
|
||||
|
||||
//Uncomment to profile the first x frames of the game.
|
||||
/*var x = 500;
|
||||
/*var x = 250;
|
||||
console.profile("Stepping for " + x + " frames")
|
||||
for(var i = 0; i < x; ++i) {
|
||||
currentScene.renderAndStep();
|
||||
|
@@ -314,8 +314,7 @@ gdjs.RuntimeScene.prototype._updateObjectsPreEvents = function() {
|
||||
gdjs.RuntimeScene.prototype._updateObjects = function() {
|
||||
this._cacheOrClearRemovedInstances();
|
||||
|
||||
var allObjectsLists = this._instances.entries();
|
||||
this.updateObjectsForces(allObjectsLists);
|
||||
this.updateObjectsForces();
|
||||
|
||||
//It is *mandatory* to create and iterate on a external list of all objects, as the automatisms
|
||||
//may delete the objects.
|
||||
@@ -348,8 +347,8 @@ gdjs.RuntimeScene.prototype.getName = function() {
|
||||
* Update the objects positions according to their forces
|
||||
* @method updateObjectsForces
|
||||
*/
|
||||
gdjs.RuntimeScene.prototype.updateObjectsForces = function(objects) {
|
||||
var allObjectsLists = objects ? objects : this._instances.entries();
|
||||
gdjs.RuntimeScene.prototype.updateObjectsForces = function() {
|
||||
var allObjectsLists = this._instances.entries();
|
||||
|
||||
for( var i = 0, len = allObjectsLists.length;i<len;++i) {
|
||||
for( var j = 0, listLen = allObjectsLists[i][1].length;j<listLen;++j) {
|
||||
|
Reference in New Issue
Block a user