Page MenuHomeWildfire Games

Fix GetClosestMember function of Formation.
AbandonedPublic

Authored by Freagarach on Wed, Jul 31, 10:39 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#5120
Summary

It seems that the problem causing the segfault has been fixed, hence this function can be fixed.
The bug and segfault were found in D1423.
I've tested some of my own and could not generate a segfault. The replay attached here also does not generate a segfault.

Test Plan

Verify that this is correct.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8666
Build 14201: Vulcan BuildJenkins
Build 14200: arc lint + arc unit

Event Timeline

Freagarach created this revision.Wed, Jul 31, 10:39 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 119| 119| 	this.formationMembersWithAura = []; // Members with a formation aura
| 120| 120| 	this.width = 0;
| 121| 121| 	this.depth = 0;
| 122|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 122|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 123| 123| 	this.twinFormations = [];
| 124| 124| 	// distance from which two twin formations will merge into one.
| 125| 125| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 119| 119| 	this.formationMembersWithAura = []; // Members with a formation aura
| 120| 120| 	this.width = 0;
| 121| 121| 	this.depth = 0;
| 122|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 122|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 123| 123| 	this.twinFormations = [];
| 124| 124| 	// distance from which two twin formations will merge into one.
| 125| 125| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 137| 137| 
| 138| 138| Formation.prototype.GetSize = function()
| 139| 139| {
| 140|    |-	return {"width": this.width, "depth": this.depth};
|    | 140|+	return { "width": this.width, "depth": this.depth};
| 141| 141| };
| 142| 142| 
| 143| 143| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 137| 137| 
| 138| 138| Formation.prototype.GetSize = function()
| 139| 139| {
| 140|    |-	return {"width": this.width, "depth": this.depth};
|    | 140|+	return {"width": this.width, "depth": this.depth };
| 141| 141| };
| 142| 142| 
| 143| 143| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return { "width":1, "depth": 1};
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return {"width": 1, "depth": 1};
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return {"width":1, "depth": 1 };
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 556| 556| 	if (!footprints.length)
| 557| 557| 		return {"width":1, "depth": 1};
| 558| 558| 
| 559|    |-	var r = {"width": 0, "depth": 0};
|    | 559|+	var r = { "width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
| 561| 561| 	{
| 562| 562| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 556| 556| 	if (!footprints.length)
| 557| 557| 		return {"width":1, "depth": 1};
| 558| 558| 
| 559|    |-	var r = {"width": 0, "depth": 0};
|    | 559|+	var r = {"width": 0, "depth": 0 };
| 560| 560| 	for (var shape of footprints)
| 561| 561| 	{
| 562| 562| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 582| 582| 	separation.depth *= this.separationMultiplier.depth;
| 583| 583| 
| 584| 584| 	if (this.columnar)
| 585|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 585|+		var sortingClasses = ["Cavalry", "Infantry"];
| 586| 586| 	else
| 587| 587| 		var sortingClasses = this.sortingClasses.slice();
| 588| 588| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 602| 602| 		{
| 603| 603| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 604| 604| 			{
| 605|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 605|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 606| 606| 				done = true;
| 607| 607| 				break;
| 608| 608| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 602| 602| 		{
| 603| 603| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 604| 604| 			{
| 605|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 605|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 606| 606| 				done = true;
| 607| 607| 				break;
| 608| 608| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 626| 626| 	if (this.columnar)
| 627| 627| 	{
| 628| 628| 		shape = "square";
| 629|    |-		cols = Math.min(count,3);
|    | 629|+		cols = Math.min(count, 3);
| 630| 630| 		shiftRows = false;
| 631| 631| 		centerGap = 0;
| 632| 632| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 721| 721| 	// calculating offset distances without a zero average makes no sense, as the formation
| 722| 722| 	// will jump to a different position any time
| 723| 723| 	var avgoffset = Vector2D.average(offsets);
| 724|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 724|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 725| 725| 
| 726| 726| 	// sort the available places in certain ways
| 727| 727| 	// the places first in the list will contain the heaviest units as defined by the order
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 790| 790| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 791| 791| {
| 792| 792| 	var offsetPositions = [];
| 793|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 793|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 794| 794| 	// calculate the world positions
| 795| 795| 	for (var o of offsets)
| 796| 796| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 790| 790| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 791| 791| {
| 792| 792| 	var offsetPositions = [];
| 793|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 793|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 794| 794| 	// calculate the world positions
| 795| 795| 	for (var o of offsets)
| 796| 796| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 807| 807| Formation.prototype.GetEstimatedOrientation = function(pos)
| 808| 808| {
| 809| 809| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 810|    |-	var r = {"sin": 0, "cos": 1};
|    | 810|+	var r = { "sin": 0, "cos": 1};
| 811| 811| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 812| 812| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 813| 813| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 807| 807| Formation.prototype.GetEstimatedOrientation = function(pos)
| 808| 808| {
| 809| 809| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 810|    |-	var r = {"sin": 0, "cos": 1};
|    | 810|+	var r = {"sin": 0, "cos": 1 };
| 811| 811| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 812| 812| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 813| 813| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 889| 889| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 890| 890| 		this.AddMembers(otherMembers);
| 891| 891| 		Engine.DestroyEntity(this.twinFormations[i]);
| 892|    |-		this.twinFormations.splice(i,1);
|    | 892|+		this.twinFormations.splice(i, 1);
| 893| 893| 	}
| 894| 894| 	// Switch between column and box if necessary
| 895| 895| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

binaries/data/mods/public/simulation/components/Formation.js
| 326| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 413| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 459| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 500| »   »   var·cmpUnitAI·=·Engine.QueryInterface(offset.ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 535| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 587| »   »   var·sortingClasses·=·this.sortingClasses.slice();
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 596| »   for·(var·i·in·active)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 611| »   »   »   types["Unknown"].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | ['Unknown'] is better written in dot notation.

binaries/data/mods/public/simulation/components/Formation.js
| 651| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 685| »   »   »   »   »   var·n·=·r·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 687| »   »   »   »   »   var·n·=·r·*·2·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 691| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'c' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 698| »   »   »   »   »   var·x·=·side·*·Math.ceil(c/2)·*·separation.width;
|    | [NORMAL] JSHintBear:
|    | 'x' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 701| »   »   »   »   »   if·(x·==·0)·//·don't·use·the·center·position·with·a·center·gap
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 703| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 709| »   »   »   »   offsets.push(new·Vector2D(x·+·r1,·z·+·r2));
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 689| »   »   »   if·(!shiftRows·&&·n·>·left)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 690| »   »   »   »   n·=·left;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 691| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 695| »   »   »   »   if·(n%2·==·0)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 705| »   »   »   »   var·column·=·Math.ceil(n/2)·+·Math.ceil(c/2)·*·side;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 715| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 744| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 588| »   sortingClasses.push("Unknown");
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 593| »   for·(var·i·=·0;·i·<·sortingClasses.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 594| »   »   types[sortingClasses[i]]·=·[];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 601| »   »   for·(var·c·=·0;·c·<·sortingClasses.length;·++c)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 603| »   »   »   if·(classes.indexOf(sortingClasses[c])·>·-1)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 605| »   »   »   »   types[sortingClasses[c]].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 744| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 746| »   »   var·t·=·types[sortingClasses[i-1]];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 851| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/274/display/redirect

Freagarach abandoned this revision.Wed, Jul 31, 10:50 AM

D1768. I should search more thoroughly the first time.