Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add unit display on timeline for AI (1v1 only)
  • Loading branch information
eric-hu committed Aug 3, 2015
commit c9e3560e61d89bb10f3a221313d0ffa77cb53ed1
4 changes: 4 additions & 0 deletions app/assets/javascripts/angular/resources/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
this.entityIds = [];
this.teams = {};

var twoPlayerMatch = this.playerCount === 2;

for(var ei in this.entities) {
// console.log("ei", ei, this.armies_by_frame, this.entities, this.entities[ei].identity.name);
if (this.armies_by_frame && this.entities[ei].identity) {
Expand All @@ -255,6 +257,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
} else if (this.entities[ei].identity.id in this.armies_by_frame) {
entityArmy = this.armies_by_frame[this.entities[ei].identity.id];
// console.log("got abf for ei by id", ei, entityArmy);
} else if (this.entities[ei].identity.name.match(/A.I./) && twoPlayerMatch) {
entityArmy = this.armies_by_frame[0];
}
this.entities[ei].armies_by_frame = entityArmy;
}
Expand Down