Fixed duplicate id issue(workaround) should fix some of the crashing, disabled vehicles for now(causing crashes), disabled some of the getObject spam

This commit is contained in:
Light2
2014-06-18 22:50:48 +02:00
parent e862a86345
commit 4f76d6593b
4 changed files with 15 additions and 8 deletions
+10 -1
View File
@@ -239,6 +239,15 @@ public class ObjectService implements INetworkDispatch {
boolean isSnapshot = false;
if(objectID != 0 && objectList.containsKey(objectID)) {
System.err.println("Trying to create object with duplicate Id");
try {
throw new Exception();
} catch(Exception e) {
e.printStackTrace();
}
}
if(objectID == 0)
objectID = generateObjectID();
else
@@ -472,7 +481,7 @@ public class ObjectService implements INetworkDispatch {
if (objectList.containsKey(objectID)) {
System.err.println("getObject(): object is null but objectList contains objectID key");
} else {
System.err.println("getObject(): object is null");
//System.err.println("getObject(): object is null");
}
}