Browse Source

bug #1994

tags/v0.12.0.17
Shaun 1 year ago
parent
commit
1c6ef84d3f
2 changed files with 11 additions and 8 deletions
  1. +11
    -4
      src/server/security/connections.js
  2. +0
    -4
      src/server/world/atlas.js

+ 11
- 4
src/server/security/connections.js View File

@@ -44,9 +44,13 @@ module.exports = {
}] }]
}); });


await new Promise(res => {
atlas.removeObject(player, false, res);
});
//If the player doesn't have a 'social' component, they are no longer in a threat
// Likely due to unzoning (character select screen)
if (player.components.some(c => c.type === 'social')) {
await new Promise(res => {
atlas.removeObject(player, false, res);
});
}
} }


if (player.name) { if (player.name) {
@@ -93,8 +97,11 @@ module.exports = {
keys.forEach(function (k) { keys.forEach(function (k) {
let val = player[k]; let val = player[k];
if (val && val.type) { if (val && val.type) {
if (['player', 'auth', 'syncer'].indexOf(val.type) === -1)
if (['player', 'auth', 'syncer'].indexOf(val.type) === -1) {
delete player[k]; delete player[k];

player.components.spliceWhere(c => c.type === val.type);
}
} }
}); });




+ 0
- 4
src/server/world/atlas.js View File

@@ -103,10 +103,6 @@ module.exports = {
if (callback) if (callback)
callbackId = this.registerCallback(callback); callbackId = this.registerCallback(callback);


const simple = obj.getSimple(true);
if (!simple.name)
console.log(`Object has no name: ${JSON.stringify(simple, null, '\t')}`);

sendMessageToThread({ sendMessageToThread({
threadId: obj.zoneId, threadId: obj.zoneId,
msg: { msg: {


Loading…
Cancel
Save