Skip to content

Commit c9e3560

Browse files
committed
Add unit display on timeline for AI (1v1 only)
1 parent 90b7c52 commit c9e3560

File tree

1 file changed

+4
-0
lines changed
  • app/assets/javascripts/angular/resources

1 file changed

+4
-0
lines changed

app/assets/javascripts/angular/resources/match.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
245245
this.entityIds = [];
246246
this.teams = {};
247247

248+
var twoPlayerMatch = this.playerCount === 2;
249+
248250
for(var ei in this.entities) {
249251
// console.log("ei", ei, this.armies_by_frame, this.entities, this.entities[ei].identity.name);
250252
if (this.armies_by_frame && this.entities[ei].identity) {
@@ -255,6 +257,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
255257
} else if (this.entities[ei].identity.id in this.armies_by_frame) {
256258
entityArmy = this.armies_by_frame[this.entities[ei].identity.id];
257259
// console.log("got abf for ei by id", ei, entityArmy);
260+
} else if (this.entities[ei].identity.name.match(/A.I./) && twoPlayerMatch) {
261+
entityArmy = this.armies_by_frame[0];
258262
}
259263
this.entities[ei].armies_by_frame = entityArmy;
260264
}

0 commit comments

Comments
 (0)