diff --git a/common/src/main/scala/net/psforever/objects/serverobject/pad/process/VehicleSpawnControlSeatDriver.scala b/common/src/main/scala/net/psforever/objects/serverobject/pad/process/VehicleSpawnControlSeatDriver.scala index 6c6896c48..2b67fa471 100644 --- a/common/src/main/scala/net/psforever/objects/serverobject/pad/process/VehicleSpawnControlSeatDriver.scala +++ b/common/src/main/scala/net/psforever/objects/serverobject/pad/process/VehicleSpawnControlSeatDriver.scala @@ -76,7 +76,7 @@ class VehicleSpawnControlSeatDriver(pad : VehicleSpawnPad) extends VehicleSpawnC else { trace("driver lost, but operations can continue") } - context.system.scheduler.scheduleOnce(800 milliseconds, vehicleOverride, VehicleSpawnControl.Process.ServerVehicleOverride(entry)) + context.system.scheduler.scheduleOnce(250 milliseconds, vehicleOverride, VehicleSpawnControl.Process.ServerVehicleOverride(entry)) case msg @ (VehicleSpawnControl.ProcessControl.Reminder | VehicleSpawnControl.ProcessControl.GetNewOrder) => context.parent ! msg diff --git a/pslogin/src/main/scala/Maps.scala b/pslogin/src/main/scala/Maps.scala index cc0b77232..0fbcdd385 100644 --- a/pslogin/src/main/scala/Maps.scala +++ b/pslogin/src/main/scala/Maps.scala @@ -667,7 +667,7 @@ object Maps { LocalBuilding(81, FoundationBuilder(Building.Structure(StructureType.Platform))) LocalObject(1067, Terminal.Constructor(ground_vehicle_terminal)) LocalObject(712, - VehicleSpawnPad.Constructor(Vector3(3659.836f, 2589.875f, 92.0625f), Vector3(0f, 0f, 270.0f)) + VehicleSpawnPad.Constructor(Vector3(3724.0156f, 2589.875f, 92.0625f), Vector3(0f, 0f, 180.0f)) ) ObjectToBuilding(1067, 81) ObjectToBuilding(712, 81) diff --git a/pslogin/src/main/scala/WorldSessionActor.scala b/pslogin/src/main/scala/WorldSessionActor.scala index 8a80bb26e..dd40b5a2f 100644 --- a/pslogin/src/main/scala/WorldSessionActor.scala +++ b/pslogin/src/main/scala/WorldSessionActor.scala @@ -1045,6 +1045,7 @@ class WorldSessionActor extends Actor with MDCContextAware { sendResponse(PlanetsideAttributeMessage(vehicle_guid, 68, 0L)) //??? sendResponse(PlanetsideAttributeMessage(vehicle_guid, 113, 0L)) //??? ReloadVehicleAccessPermissions(vehicle) + ServerVehicleLock(vehicle) case VehicleSpawnPad.ServerVehicleOverrideStart(vehicle, pad) => val vdef = vehicle.Definition @@ -3896,11 +3897,34 @@ class WorldSessionActor extends Actor with MDCContextAware { tplayer.Armor == tplayer.MaxArmor } + /** + * Lock all applicable controls of the current vehicle. + * This includes forward motion, turning, and, if applicable, strafing. + * @param vehicle the vehicle being controlled + */ + def ServerVehicleLock(vehicle : Vehicle) : Unit = { + vehicle.Controlled = Some(0) + sendResponse(ServerVehicleOverrideMsg(true, true, false, false, 0, 1, 0, Some(0))) + } + + /** + * Place the current vehicle under the control of the server's commands. + * @param vehicle the vehicle + * @param speed how fast the vehicle is moving forward + * @param flight whether the vehicle is ascending or not, if the vehicle is an applicable type + */ def ServerVehicleOverride(vehicle : Vehicle, speed : Int = 0, flight : Int = 0) : Unit = { vehicle.Controlled = Some(speed) sendResponse(ServerVehicleOverrideMsg(true, true, false, false, flight, 0, speed, Some(0))) } + /** + * Place the current vehicle under the control of the driver's commands, + * but leave it in a cancellable auto-drive. + * @param vehicle the vehicle + * @param speed how fast the vehicle is moving forward + * @param flight whether the vehicle is ascending or not, if the vehicle is an applicable type + */ def DriverVehicleControl(vehicle : Vehicle, speed : Int = 0, flight : Int = 0) : Unit = { if(vehicle.Controlled.nonEmpty) { vehicle.Controlled = None @@ -3908,6 +3932,12 @@ class WorldSessionActor extends Actor with MDCContextAware { } } + /** + * Place the current vehicle under the control of the driver's commands, + * but leave it in a cancellable auto-drive. + * Stop all movement entirely. + * @param vehicle the vehicle + */ def TotalDriverVehicleControl(vehicle : Vehicle) : Unit = { if(vehicle.Controlled.nonEmpty) { vehicle.Controlled = None