Added script for rori static spawns

This commit is contained in:
Waverunner
2013-08-17 16:35:14 -04:00
parent 05483cc8ed
commit 473d5ac87e
3 changed files with 402 additions and 1 deletions
+10 -1
View File
@@ -50,10 +50,19 @@ public class StaticService implements INetworkDispatch {
}
public void spawnPlanetStaticObjs(String planet) {
Planet planetObj = (Planet) core.terrainService.getPlanetByName(planet);
core.scriptService.callScript("scripts/static_spawns", "addPlanetSpawns", planetObj.getName(), core, planetObj);
System.out.println("Loaded static objs for " + planetObj.getName());
//spawnObject("object/static/worldbuilding/structures/shared_mun_nboo_bank_destroyed.iff", "rori", (long) 0, (float) 5180.96, (float) 80, (float) 5583.95, (float) 0, (float) 1);
}
public void spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qY, float qW) {
Planet planet = core.terrainService.getPlanetByName(planetName);
System.out.println("template: " + template + " x: " + x + " y: " + y + " z: " + z);
if(planet == null) {
System.out.println("Cant spawn static object because planet is null");
return;
@@ -67,7 +76,7 @@ public class StaticService implements INetworkDispatch {
}
if(cellId == 0)
core.simulationService.add(object, x, z);
core.simulationService.add(object, (float) x, (float) y);
else {
SWGObject parent = core.objectService.getObject(cellId);
if(parent == null) {