mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-20 02:24:45 +00:00
split air and reduce time
This commit is contained in:
parent
03ed518f07
commit
26046580b2
|
|
@ -128,13 +128,21 @@ class VehicleControl(vehicle: Vehicle)
|
|||
mountBehavior.apply(msg)
|
||||
mountCleanup(mount_point, player)
|
||||
|
||||
// For Issue 1133. Todo: There may be a better way to address the issue?
|
||||
case Mountable.TryDismount(user, seat_num, _) if (vehicle.History.find { entry => entry.isInstanceOf[SpawningActivity] } match {
|
||||
case Some(entry) if System.currentTimeMillis() - entry.time < 8500L => true
|
||||
// Issue 1133. Todo: There may be a better way to address the issue?
|
||||
case Mountable.TryDismount(user, seat_num, _) if GlobalDefinitions.isFlightVehicle(vehicle.Definition) &&
|
||||
(vehicle.History.find { entry => entry.isInstanceOf[SpawningActivity] } match {
|
||||
case Some(entry) if System.currentTimeMillis() - entry.time < 3000L => true
|
||||
case _ => false
|
||||
}) =>
|
||||
sender() ! Mountable.MountMessages(user, Mountable.CanNotDismount(vehicle, seat_num))
|
||||
|
||||
case Mountable.TryDismount(user, seat_num, _) if !GlobalDefinitions.isFlightVehicle(vehicle.Definition) &&
|
||||
(vehicle.History.find { entry => entry.isInstanceOf[SpawningActivity] } match {
|
||||
case Some(entry) if System.currentTimeMillis() - entry.time < 8500L => true
|
||||
case _ => false
|
||||
}) =>
|
||||
sender() ! Mountable.MountMessages(user, Mountable.CanNotDismount(vehicle, seat_num))
|
||||
|
||||
case msg @ Mountable.TryDismount(_, seat_num, _) =>
|
||||
dismountBehavior.apply(msg)
|
||||
dismountCleanup(seat_num)
|
||||
|
|
|
|||
Loading…
Reference in a new issue