Reorganized vehicle spawning process and wrote tests for process.

This commit is contained in:
FateJH 2018-04-15 22:37:35 -04:00
parent c87273c351
commit 5d5c609a2f
11 changed files with 709 additions and 237 deletions

View file

@ -1025,9 +1025,6 @@ class WorldSessionActor extends Actor with MDCContextAware {
case VehicleSpawnPad.StartPlayerSeatedInVehicle(vehicle, pad) =>
val vehicle_guid = vehicle.GUID
if(pad.Railed) {
sendResponse(ObjectAttachMessage(pad.GUID, vehicle_guid, 3))
}
sendResponse(PlanetsideAttributeMessage(vehicle_guid, 22, 1L)) //mount points off?
sendResponse(PlanetsideAttributeMessage(vehicle_guid, 21, player.GUID.guid)) //fte and ownership?
@ -1053,7 +1050,13 @@ class WorldSessionActor extends Actor with MDCContextAware {
sendResponse(GenericObjectActionMessage(pad.GUID, 92)) //reset spawn pad
sendResponse(ServerVehicleOverrideMsg.Auto(vehicle.Definition.AutoPilotSpeed2))
case VehicleSpawnPad.PeriodicReminder(msg) =>
case VehicleSpawnPad.PeriodicReminder(cause, data) =>
val msg : String = (cause match {
case VehicleSpawnPad.Reminders.Blocked =>
s"The vehicle spawn where you placed your order is blocked. ${data.getOrElse("")}"
case VehicleSpawnPad.Reminders.Queue =>
s"Your position in the vehicle spawn queue is ${data.get}."
})
sendResponse(ChatMsg(ChatMessageType.CMT_OPEN, true, "", msg, None))
case ListAccountCharacters =>

View file

@ -81,11 +81,7 @@ class DeconstructionActor extends Actor {
vehiclesToScrap.foreach(entry => {
val vehicle = entry.vehicle
val zone = entry.zone
<<<<<<< 18a068c10272376450c412425118c86612af7397
vehicle.Position = Vector3.Zero //somewhere it will not disturb anything
=======
vehicle.Position = Vector3.Zero
>>>>>>> Splitting single vehicle spawn control process into several subtasks with their own control Actor objects. Importing SouNourS copy of ServerVehicleOverrideMessage packet and tests.
entry.zone.Transport ! Zone.Vehicle.Despawn(vehicle)
context.parent ! DeconstructionActor.DeleteVehicle(vehicle.GUID, zone.Id) //call up to the main event system
taskResolver ! DeconstructionTask(vehicle, zone)