Change aircraft deconstruction on bail to go through vehicle's actor instead of directly to VehicleEvents actor (#416)

This commit is contained in:
Mazo 2020-05-04 04:46:33 +01:00 committed by GitHub
parent 8046fbe0ba
commit f9ba930007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6037,8 +6037,7 @@ class WorldSessionActor extends Actor
//todo: kick cargo passengers out. To be added after PR #216 is merged
obj match {
case v : Vehicle if bailType == BailType.Bailed && seat_num == 0 && v.Flying =>
continent.VehicleEvents ! VehicleServiceMessage.Decon(RemoverActor.ClearSpecific(List(obj), continent))
continent.VehicleEvents ! VehicleServiceMessage.Decon(RemoverActor.AddTask(obj, continent, Some(0 seconds))) // Immediately deconstruct vehicle
v.Actor ! Vehicle.Deconstruct(None) //immediate deconstruction
case _ => ;
}