This commit is contained in:
Treeku
2014-04-13 19:41:33 +01:00
20 changed files with 432 additions and 60 deletions
+3 -7
View File
@@ -397,8 +397,7 @@ public class ObjectService implements INetworkDispatch {
float positionY = core.terrainService.getHeight(planet.getID(), position.x, position.z)-1f;
Point3D newpoint = new Point3D(position.x,positionY,position.z);
object = new HarvesterObject(objectID, planet, Template, newpoint, orientation);
core.harvesterService.addHarvester(object);
object = new HarvesterObject(objectID, planet, Template, newpoint, orientation);
} else {
return null;
@@ -1027,7 +1026,6 @@ public class ObjectService implements INetworkDispatch {
CrcStringTableVisitor crcTable = ClientFileManager.loadFile("misc/object_template_crc_string_table.iff", CrcStringTableVisitor.class);
List<BuildingObject> persistentBuildings = new ArrayList<BuildingObject>();
Map<Long, Long> duplicate = new HashMap<Long, Long>();
Transaction txn = core.getDuplicateIdODB().getEnvironment().beginTransaction(null, null);
for (int i = 0; i < buildoutTable.getRowCount(); i++) {
@@ -1107,16 +1105,14 @@ public class ObjectService implements INetworkDispatch {
newObjectId = core.getDuplicateIdODB().get(key, String.class, DuplicateId.class).getObjectId();
} else {
newObjectId = generateObjectID();
Transaction txn = core.getDuplicateIdODB().getEnvironment().beginTransaction(null, null);
core.getDuplicateIdODB().put(new DuplicateId(key, newObjectId), String.class, DuplicateId.class, txn);
txn.commitSync();
}
duplicate.put(objectId, newObjectId);
objectId = newObjectId;
}
if(txn.isValid()) {
System.out.println("Committed doid transaction.");
txn.commitSync();
}
List<Long> containers = new ArrayList<Long>();
SWGObject object;