mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
Overhauled Mounts (still buggy)
This commit is contained in:
@@ -80,6 +80,8 @@ import resources.objects.player.PlayerObject;
|
||||
import resources.objects.tangible.TangibleObject;
|
||||
import resources.common.*;
|
||||
import resources.common.collidables.AbstractCollidable;
|
||||
import resources.datatables.DisplayType;
|
||||
import resources.datatables.Options;
|
||||
import resources.datatables.PlayerFlags;
|
||||
import resources.datatables.Posture;
|
||||
import services.ai.LairActor;
|
||||
@@ -333,8 +335,9 @@ public class SimulationService implements INetworkDispatch {
|
||||
|
||||
CreatureObject object = (CreatureObject) client.getParent();
|
||||
|
||||
if (object.mounted)
|
||||
object=object.getMountedVehicle();
|
||||
if (core.mountService.isMounted(object)) {
|
||||
object = (CreatureObject) object.getContainer();
|
||||
}
|
||||
|
||||
Point3D newPos;
|
||||
Point3D oldPos;
|
||||
@@ -432,8 +435,14 @@ public class SimulationService implements INetworkDispatch {
|
||||
System.out.println("NULL Object");
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureObject object = (CreatureObject) client.getParent();
|
||||
|
||||
if (core.mountService.isMounted(object)) {
|
||||
object.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount"), DisplayType.Broadcast);
|
||||
core.mountService.dismount(object, (CreatureObject) object.getContainer());
|
||||
}
|
||||
|
||||
Point3D newPos = new Point3D(dataTransform.getXPosition(), dataTransform.getYPosition(), dataTransform.getZPosition());
|
||||
if(Float.isNaN(newPos.x) || Float.isNaN(newPos.y) || Float.isNaN(newPos.z))
|
||||
return;
|
||||
@@ -747,6 +756,7 @@ public class SimulationService implements INetworkDispatch {
|
||||
return;
|
||||
|
||||
final CreatureObject object = (CreatureObject) client.getParent();
|
||||
SWGObject container = object.getContainer();
|
||||
PlayerObject ghost = (PlayerObject) object.getSlottedObject("ghost");
|
||||
|
||||
if(object.getAttachment("proposer") != null)
|
||||
@@ -763,16 +773,13 @@ public class SimulationService implements INetworkDispatch {
|
||||
core.combatService.handleEndDuel(object, opponent, true);
|
||||
}
|
||||
}
|
||||
System.out.print(object.getAttachment("activeVehicleID"));
|
||||
|
||||
if(object.getAttachment("activeVehicleID") != null)
|
||||
{
|
||||
if(object.isMounted()) object.getMountedVehicle().unmount(object);
|
||||
long vehicleID = ((java.math.BigInteger) object.getAttachment("activeVehicleID")).longValue();
|
||||
core.objectService.destroyObject(vehicleID);
|
||||
object.setAttachment("activeVehicleID", null);
|
||||
if (core.mountService.isMounted(object)) {
|
||||
core.mountService.dismount(object, (CreatureObject) container);
|
||||
}
|
||||
|
||||
core.mountService.storeAll(object);
|
||||
|
||||
/*
|
||||
object.createTransaction(core.getCreatureODB().getEnvironment());
|
||||
core.getCreatureODB().put(object, Long.class, CreatureObject.class, object.getTransaction());
|
||||
|
||||
Reference in New Issue
Block a user