Skip to content

Commit

Permalink
fix: move the intent owner check from runner to processor side
Browse files Browse the repository at this point in the history
  • Loading branch information
artch committed Feb 2, 2017
1 parent 0f27eb4 commit 7df5e3f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function processRoom(roomId, intents, objects, terrain, gameTime, roomInfo, flag
continue;
}

if (!object || object._skip) continue;
if (!object || object._skip || object.user && object.user != userId) continue;

if (object.type == 'creep')
require('./processor/intents/creeps/intents')(object, objectIntents, objects, terrain, bulk, userBulk, roomController, stats, gameTime, roomInfo);
Expand Down
2 changes: 0 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,6 @@ exports.storeIntents = function(userId, userIntents, userRuntimeData) {
};
}

if(!(i in userRuntimeData.userObjects)) continue;

if(objectIntentsResult.move) {
objectIntents.move = {
direction: parseInt(objectIntentsResult.move.direction)
Expand Down

0 comments on commit 7df5e3f

Please sign in to comment.