mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
vehicle gating works again (#1231)
This commit is contained in:
parent
d219f903e6
commit
a4b7e77d9d
|
|
@ -2425,13 +2425,13 @@ class ZoningOperations(
|
||||||
* @param seat the mount index
|
* @param seat the mount index
|
||||||
*/
|
*/
|
||||||
def AvatarCreateInVehicle(tplayer: Player, vehicle: Vehicle, seat: Int): Unit = {
|
def AvatarCreateInVehicle(tplayer: Player, vehicle: Vehicle, seat: Int): Unit = {
|
||||||
|
log.debug(s"AvatarCreateInVehicle: ${tplayer.Name}")
|
||||||
val pdef = tplayer.avatar.definition
|
val pdef = tplayer.avatar.definition
|
||||||
val pguid = tplayer.GUID
|
val pguid = tplayer.GUID
|
||||||
val vguid = vehicle.GUID
|
val vguid = vehicle.GUID
|
||||||
tplayer.VehicleSeated = None
|
tplayer.VehicleSeated = None
|
||||||
tplayer.VehicleSeated = vguid
|
|
||||||
log.debug(s"AvatarCreateInVehicle: ${player.Name}")
|
|
||||||
sendResponse(OCM.detailed(tplayer))
|
sendResponse(OCM.detailed(tplayer))
|
||||||
|
tplayer.VehicleSeated = vguid
|
||||||
if (seat == 0 || vehicle.WeaponControlledFromSeat(seat).nonEmpty) {
|
if (seat == 0 || vehicle.WeaponControlledFromSeat(seat).nonEmpty) {
|
||||||
sendResponse(ObjectAttachMessage(vguid, pguid, seat))
|
sendResponse(ObjectAttachMessage(vguid, pguid, seat))
|
||||||
sessionLogic.general.accessContainer(vehicle)
|
sessionLogic.general.accessContainer(vehicle)
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ import shapeless.{::, HNil}
|
||||||
object ImplantEffects extends Enumeration {
|
object ImplantEffects extends Enumeration {
|
||||||
type Type = Value
|
type Type = Value
|
||||||
|
|
||||||
val SurgeEffects: ImplantEffects.Value = Value(9)
|
val SurgeEffects: ImplantEffects.Value = Value(9)
|
||||||
val PersonalShieldEffects: ImplantEffects.Value = Value(5)
|
val PersonalShieldEffects: ImplantEffects.Value = Value(5)
|
||||||
val DarklightEffects: ImplantEffects.Value = Value(3)
|
val DarklightEffects: ImplantEffects.Value = Value(3)
|
||||||
val RegenEffects: ImplantEffects.Value = Value(0)
|
val RegenEffects: ImplantEffects.Value = Value(0)
|
||||||
val NoEffects: ImplantEffects.Value = Value(1)
|
val NoEffects: ImplantEffects.Value = Value(1)
|
||||||
|
|
||||||
implicit val codec: Codec[ImplantEffects.Value] = PacketHelpers.createEnumerationCodec(this, uint4L)
|
implicit val codec: Codec[ImplantEffects.Value] = PacketHelpers.createEnumerationCodec(this, uint4)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -159,7 +159,7 @@ object CharacterData extends Marshallable[CharacterData] {
|
||||||
(
|
(
|
||||||
("uniform_upgrade" | UniformStyle.codec) >>:~ { style =>
|
("uniform_upgrade" | UniformStyle.codec) >>:~ { style =>
|
||||||
uint(bits = 3) :: //uniform_upgrade is actually interpreted as a 6u field, but the lower 3u seems to be discarded
|
uint(bits = 3) :: //uniform_upgrade is actually interpreted as a 6u field, but the lower 3u seems to be discarded
|
||||||
("command_rank" | uintL(bits = 3)) ::
|
("command_rank" | uint(bits = 3)) ::
|
||||||
("implant_effects" | listOfN(uint2, ImplantEffects.codec)) ::
|
("implant_effects" | listOfN(uint2, ImplantEffects.codec)) ::
|
||||||
("cosmetics" | conditional(BattleRank.showCosmetics(style), Cosmetic.codec))
|
("cosmetics" | conditional(BattleRank.showCosmetics(style), Cosmetic.codec))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
||||||
unk: Int,
|
unk: Int,
|
||||||
player_guid: PlanetSideGUID
|
player_guid: PlanetSideGUID
|
||||||
): CommonFieldData =
|
): CommonFieldData =
|
||||||
CommonFieldData(faction, bops = false, alternate = destroyed, v1 = unk > 1, None, jammered = false/*unk % 1 == 1*/, None, None, player_guid)
|
CommonFieldData(faction, bops = false, alternate = destroyed, v1 = unk > 1, None, jammered = unk > 0, None, None, player_guid)
|
||||||
|
|
||||||
def apply(
|
def apply(
|
||||||
faction: PlanetSideEmpire.Value,
|
faction: PlanetSideEmpire.Value,
|
||||||
|
|
@ -107,7 +107,7 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
||||||
): CommonFieldData = {
|
): CommonFieldData = {
|
||||||
val jammeredField = if (jammered) { Some(0) }
|
val jammeredField = if (jammered) { Some(0) }
|
||||||
else { None }
|
else { None }
|
||||||
CommonFieldData(faction, bops, destroyed, unk > 1, None, jammered = false/*unk % 1 == 1*/, None, jammeredField, player_guid)
|
CommonFieldData(faction, bops, destroyed, unk > 1, None, jammered = unk > 0, None, jammeredField, player_guid)
|
||||||
}
|
}
|
||||||
|
|
||||||
def codec(extra: Boolean): Codec[CommonFieldData] =
|
def codec(extra: Boolean): Codec[CommonFieldData] =
|
||||||
|
|
|
||||||
|
|
@ -608,7 +608,7 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
||||||
("unk7" | uint32L) ::
|
("unk7" | uint32L) ::
|
||||||
("unk8" | uint32L) ::
|
("unk8" | uint32L) ::
|
||||||
(("imprinting" | optional(isFalse, imprint_progress_codec)) >>:~ { imprinting =>
|
(("imprinting" | optional(isFalse, imprint_progress_codec)) >>:~ { imprinting =>
|
||||||
("unkA" | listOfN(uint16L, uint32L)) ::
|
("unkA" | listOfN(uint16L, uint32L)) ::
|
||||||
("unkB" | unkBCodec(
|
("unkB" | unkBCodec(
|
||||||
paddingCalculations(
|
paddingCalculations(
|
||||||
displaceByOptionTest(pad_length, imprinting, value = 5),
|
displaceByOptionTest(pad_length, imprinting, value = 5),
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,10 @@ object VehicleData extends Marshallable[VehicleData] {
|
||||||
|
|
||||||
private val driveState8u = uint8.xmap[DriveState.Value](
|
private val driveState8u = uint8.xmap[DriveState.Value](
|
||||||
n => DriveState(n),
|
n => DriveState(n),
|
||||||
n => n.id
|
{
|
||||||
|
case n if n.id < 0 => DriveState.Mobile.id
|
||||||
|
case n => n.id
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue