Skip to content

Commit

Permalink
bugfix: info obj passed in a wrong field to AI Script
Browse files Browse the repository at this point in the history
  • Loading branch information
jamro committed Aug 21, 2017
1 parent ff22630 commit 3be11bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions app/engine/AiWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,12 @@ module.exports = class AiWrapper {
mates: [self._tank.id],
};
}
var infoData = {
id: self._tank.id,
team: teamInfo
};
if(self._aiDefinition.initData) {
teamInfo.initData = self._aiDefinition.initData;
infoData.initData = self._aiDefinition.initData;
}
self._aiProcessingStart = (new Date()).getTime();
self._aiProcessingResolveCallback = resolve;
Expand All @@ -164,10 +168,7 @@ module.exports = class AiWrapper {
settings: {
SKIN: 'zebra'
},
info: {
id: self._tank.id,
team: teamInfo
},
info: infoData,
code: self._aiDefinition.code
});
}
Expand Down
Loading

0 comments on commit 3be11bf

Please sign in to comment.