mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-19 14:43:37 +00:00
Merge pull request #1091 from Fate-JH/event-fixes
May 20th Event Fixes (maybe)
This commit is contained in:
commit
c22d86acef
5 changed files with 34 additions and 26 deletions
|
|
@ -65,10 +65,10 @@ object Vehicles {
|
|||
case Some(player: Player) =>
|
||||
if (player.avatar.vehicle.contains(guid)) {
|
||||
player.avatar.vehicle = None
|
||||
vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
player.Name,
|
||||
VehicleAction.Ownership(player.GUID, PlanetSideGUID(0))
|
||||
)
|
||||
// vehicle.Zone.VehicleEvents ! VehicleServiceMessage(
|
||||
// player.Name,
|
||||
// VehicleAction.Ownership(player.GUID, PlanetSideGUID(0))
|
||||
// )
|
||||
}
|
||||
vehicle.AssignOwnership(None)
|
||||
val empire = VehicleLockState.Empire.id
|
||||
|
|
@ -118,17 +118,18 @@ object Vehicles {
|
|||
}
|
||||
|
||||
/**
|
||||
* Disassociate a player from a vehicle that he owns without associating a different player as the owner.
|
||||
* Set the vehicle's driver mount permissions and passenger and gunner mount permissions to "allow empire,"
|
||||
* then reload them for all clients.
|
||||
* This is the vehicle side of vehicle ownership removal.
|
||||
* @param player the player
|
||||
*/
|
||||
* Disassociate a player from a vehicle that he owns without associating a different player as the owner.
|
||||
* Set the vehicle's driver mount permissions and passenger and gunner mount permissions to "allow empire,"
|
||||
* then reload them for all clients.
|
||||
* This is the vehicle side of vehicle ownership removal.
|
||||
* @param player the player
|
||||
* @param vehicle the vehicle
|
||||
*/
|
||||
def Disown(player: Player, vehicle: Vehicle): Option[Vehicle] = {
|
||||
val pguid = player.GUID
|
||||
if (vehicle.Owner.contains(pguid)) {
|
||||
vehicle.AssignOwnership(None)
|
||||
vehicle.Zone.VehicleEvents ! VehicleServiceMessage(player.Name, VehicleAction.Ownership(pguid, PlanetSideGUID(0)))
|
||||
//vehicle.Zone.VehicleEvents ! VehicleServiceMessage(player.Name, VehicleAction.Ownership(pguid, PlanetSideGUID(0)))
|
||||
val vguid = vehicle.GUID
|
||||
val empire = VehicleLockState.Empire.id
|
||||
(0 to 2).foreach(group => {
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ object Deployment {
|
|||
* Two sequences are defined.
|
||||
* The more elaborate sequence proceeds from `Mobile --> Deploying --> Deployed --> Undeploying --> Mobile`.
|
||||
* This is the standard in-game deploy cycle.
|
||||
* The sequence void of complexity is `State7 --> State7`.
|
||||
* `State7` is an odd condition possessed mainly by vehicles that do not deploy.
|
||||
* All other sequences are void of complexity and should not mutate from their original value.
|
||||
* @param from_state the original deployment state
|
||||
* @return the deployment state that is being transitioned
|
||||
*/
|
||||
|
|
@ -91,7 +90,7 @@ object Deployment {
|
|||
case DriveState.Deploying => DriveState.Deployed
|
||||
case DriveState.Deployed => DriveState.Undeploying
|
||||
case DriveState.Undeploying => DriveState.Mobile
|
||||
case DriveState.State7 => DriveState.State7
|
||||
case _ => from_state
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue