GCWZones work fully, completely in their entirety

- Correct deltas are sent
- Math is now correct
- Zone History is recorded
This commit is contained in:
Treeku
2013-08-23 23:29:15 +01:00
parent 05483cc8ed
commit 27294b5a41
20 changed files with 459 additions and 153 deletions
+10 -7
View File
@@ -35,21 +35,24 @@ import org.apache.mina.core.buffer.IoBuffer;
import resources.common.StringUtilities;
import com.sleepycat.persist.model.NotPersistent;
import com.sleepycat.persist.model.Persistent;
@SuppressWarnings("unused")
@Persistent
public class SWGMap<K, V> implements Map<K, V> {
private Map<K, V> map = new TreeMap<K, V>();
@NotPersistent
private int updateCounter;
private int updateCounter = 0;
private ObjectMessageBuilder messageBuilder;
private byte viewType;
private short updateType;
@NotPersistent
protected final Object objectMutex = new Object();
public SWGMap() { }
public SWGMap(ObjectMessageBuilder messageBuilder, int viewType, int updateType) {
this.messageBuilder = messageBuilder;
this.viewType = (byte) viewType;
@@ -65,10 +68,6 @@ public class SWGMap<K, V> implements Map<K, V> {
}
}
public SWGMap() {
}
public void clear() {
throw new UnsupportedOperationException();
}
@@ -195,6 +194,10 @@ public class SWGMap<K, V> implements Map<K, V> {
}
}
public Object getMutex() {
return objectMutex;
}
private byte[] item(int type, Object index, byte[] data, boolean useIndex, boolean useData) {
if (useIndex && !(index instanceof Byte) && !(index instanceof Short)
&& !(index instanceof Integer) && !(index instanceof Float)