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