Merge pull request #443 from Fate-JH/turret-kick2

Kick Occupants From Amenities When Facility Is Hacked (properly)
This commit is contained in:
Mazo 2020-05-16 18:56:49 +01:00 committed by GitHub
commit 4fa2be151b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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, seat, true, mountable.GUID))
case _ => ; case _ => ;
} }
case _ => log.warn("HackCaptureTerminal: hack state monitor not defined") case _ => log.warn("HackCaptureTerminal: hack state monitor not defined")