Skip to content

Commit

Permalink
Entity local callbacks unusable on server client
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXFeeD committed Nov 15, 2023
1 parent 5b03005 commit 5302235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/entities/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Minimap.markAsUnacceptableEntity = function(type) {

const entities = [];

Callback.addCallback(isOutdated ? "EntityRemoved" : "EntityRemovedLocal", function(entity) {
Callback.addCallback("EntityRemoved", function(entity) {
if (Minimap.isAcceptableEntity(entity)) {
let index = entities.indexOf(entity);
if (index > -1) {
Expand All @@ -38,7 +38,7 @@ Callback.addCallback(isOutdated ? "EntityRemoved" : "EntityRemovedLocal", functi
}
});

Callback.addCallback(isOutdated ? "EntityAdded" : "EntityAddedLocal", function(entity) {
Callback.addCallback("EntityAdded", function(entity) {
if (Minimap.isAcceptableEntity(entity)) {
// Entity uid may be added only once
entities[entities.length] = entity;
Expand Down

0 comments on commit 5302235

Please sign in to comment.