Fixed quadtree insert error with static objects

This commit is contained in:
Treeku
2014-05-15 13:28:53 +01:00
parent c0f2c5dddb
commit 212d2cf38c
+5
View File
@@ -121,6 +121,7 @@ public class StaticService implements INetworkDispatch {
long objectId = core.objectService.getDOId(planetName, template, 0, buildingId, cellNumber, x, y, z);
SWGObject object = null;
MobileTemplate mobileTemplate = core.spawnService.getMobileTemplate(template);
if (mobileTemplate != null) {
@@ -149,6 +150,10 @@ public class StaticService implements INetworkDispatch {
System.err.println("StaticService: ObjectId " + objectId + " was taken for object with template " + object.getTemplate() + ". Replacement: " + object.getObjectID());
}
if (mobileTemplate != null) {
return object;
}
boolean checkCells = false; // shouldn't be needed; for debugging
if (object instanceof BuildingObject && checkCells) {