properly kick mountable occupants from amenities when the base is hacked

This commit is contained in:
FateJH 2020-05-16 11:55:52 -04:00
parent f008b6c79d
commit 73965d13b6

View file

@ -7486,11 +7486,11 @@ class WorldSessionActor extends Actor
} }
value = start_num + deciseconds_remaining value = start_num + deciseconds_remaining
sendResponse(PlanetsideAttributeMessage(target_guid, 20, value)) sendResponse(PlanetsideAttributeMessage(target_guid, 20, value))
continent.GUID(player.VehicleSeated) match { GetMountableAndSeat(None, player) match {
case Some(mountable : Amenity with Mountable) => case (Some(mountable : Amenity), Some(seat)) if mountable.Owner.GUID == capture_terminal.Owner.GUID =>
if(mountable.Owner.GUID == capture_terminal.Owner.GUID) { mountable.Seats(seat).Occupant = None
continent.VehicleEvents ! VehicleServiceMessage(continent.Id, VehicleAction.KickPassenger(player.GUID, mountable.Seats.head._1, true, mountable.GUID)) player.VehicleSeated = None
} continent.VehicleEvents ! VehicleServiceMessage(continent.Id, VehicleAction.KickPassenger(player.GUID, mountable.Seats.head._1, true, mountable.GUID))
case _ => ; case _ => ;
} }
case _ => log.warn("HackCaptureTerminal: hack state monitor not defined") case _ => log.warn("HackCaptureTerminal: hack state monitor not defined")