mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Added script for rori static spawns
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user