Browse Source

modding #1927: Indicate new object spawns

merge-requests/598/head
kckckc 2 years ago
parent
commit
b5423d7101
2 changed files with 10 additions and 1 deletions
  1. +2
    -0
      src/server/objects/objBase.js
  2. +8
    -1
      src/server/world/syncer.js

+ 2
- 0
src/server/objects/objBase.js View File

@@ -7,6 +7,8 @@ module.exports = {

eventListeners: [],

new: true,

addComponent: function (type, blueprint, isTransfer) {
let cpn = this[type];
if (!cpn) {


+ 8
- 1
src/server/world/syncer.js View File

@@ -31,7 +31,11 @@ module.exports = {
updateZoneEmpty: function (objects, oList, oLen) {
for (let i = 0; i < oLen; i++) {
let o = oList[i];
if (!o.destroyed)

if (o.new)
delete o.new;

if (!o.destroyed)
continue;

objects.removeObject(o);
@@ -146,6 +150,9 @@ module.exports = {
}
}

if (o.new)
delete o.new;

if (sendTo)
queueFunction(sync, toList);
if (sendComplete)


Loading…
Cancel
Save