Skip to content

Commit

Permalink
Fix seeing a player when he's in sight and suddenly switches to your …
Browse files Browse the repository at this point in the history
…warring state.
  • Loading branch information
billstclair committed Apr 22, 2012
1 parent cca167e commit 83d789d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/lib/mazeServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,17 @@ function MazeServer() {
var updater = forEachUpdater('playerProps', args);
forEachKnower(player, updater);
addCanSee(player, true);
var key = posstr(player.pos);
var tab = canSeeTab[key];
if (tab) {
for (var i=0; i<tab.length; i++) {
var seer = tab[i];
var emitter = seer.emitter;
if (!seer.warring==!player.warring) {
addKnownPlayer(seer, player);
}
}
}
}

function shoot(emitter, args, socketid, fun) {
Expand Down

0 comments on commit 83d789d

Please sign in to comment.