Bad Cayor :P

This commit is contained in:
Olof Larsson 2015-03-05 18:37:29 +01:00
parent e16333b822
commit c83a8b8b11
3 changed files with 13 additions and 3 deletions

View File

@ -394,7 +394,7 @@ public class MassiveCoreEngineMain extends EngineAbstract
// double ms = (double)duration / 1000000D;
// String message = Txt.parse("<i>AsyncPlayerPreLoginEvent for %s <i>took <h>%.2f <i>ms.", event.getName(), ms);
// MassiveCore.get().log(message);
// NOTE: I get values between 5 and 20 ms.
// NOTE: I get values between 5 and 55 ms!
}
// Can not be cancelled.

View File

@ -674,6 +674,11 @@ public class Coll<E> implements CollInterface<E>
// Otherwise newly attached entities would be removed thinking it was a remote detach.
// Otherwise newly detached entities would be loaded thinking it was a remote attach.
Modification ret = this.identifiedModifications.get(id);
// DEBUG
// if (Bukkit.isPrimaryThread())
// {
// MassiveCore.get().log(Txt.parse("<a>examineId <k>Coll: <v>%s <k>Entity: <v>%s <k>Modification: <v>%s", this.getName(), id, ret));
// }
if (ret == Modification.LOCAL_ATTACH || ret == Modification.LOCAL_DETACH) return ret;
E localEntity = this.id2entity.get(id);
@ -762,7 +767,7 @@ public class Coll<E> implements CollInterface<E>
}
// DEBUG
// MassiveCore.get().log(Txt.parse("<k>Coll: <v>%s <k>Entity: <v>%s <k>Modification: <v>%s", this.getName(), id, modification));
// MassiveCore.get().log(Txt.parse("<a>syncId <k>Coll: <v>%s <k>Entity: <v>%s <k>Modification: <v>%s", this.getName(), id, modification));
switch (modification)
{

View File

@ -111,8 +111,13 @@ public abstract class Entity<E extends Entity<E>> implements Comparable<E>
if ( ! coll.inited()) return;
// UNKNOWN is very unimportant really.
// LOCAL_ATTACH is for example much more important and should not be replaced.
if ( ! coll.identifiedModifications.containsKey(id))
{
coll.identifiedModifications.put(id, Modification.UNKNOWN);
}
}
public Modification sync()
{