gm sees anims and crouch bfr

This commit is contained in:
ScrawnyRonnie 2025-07-30 10:39:50 -04:00
parent 2b1d01c4ba
commit aa31d6e395
5 changed files with 25 additions and 1 deletions

View file

@ -187,6 +187,9 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID => pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID =>
pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendResponse(EmoteMsg(avatarGuid, emote))) pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendResponse(EmoteMsg(avatarGuid, emote)))
} }
pZone.AllPlayers.collect { case t if t.GUID != player.GUID && !t.allowInteraction =>
pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendResponse(EmoteMsg(avatarGuid, emote)))
}
} }
def handleDropItem(pkt: DropItemMessage): Unit = { def handleDropItem(pkt: DropItemMessage): Unit = {

View file

@ -205,6 +205,9 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID => pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID =>
pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendResponse(EmoteMsg(avatarGuid, emote))) pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendResponse(EmoteMsg(avatarGuid, emote)))
} }
pZone.AllPlayers.collect { case t if t.GUID != player.GUID && !t.allowInteraction =>
pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendResponse(EmoteMsg(avatarGuid, emote)))
}
} }
def handleDropItem(pkt: DropItemMessage): Unit = { def handleDropItem(pkt: DropItemMessage): Unit = {

View file

@ -3782,6 +3782,9 @@ class ZoningOperations(
pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID => pZone.blockMap.sector(player).livePlayerList.collect { case t if t.GUID != player.GUID =>
pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendGenericObjectActionMessage(t.GUID, player.GUID, GenericObjectActionEnum.PlayerDeconstructs)) pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendGenericObjectActionMessage(t.GUID, player.GUID, GenericObjectActionEnum.PlayerDeconstructs))
} }
pZone.AllPlayers.collect { case t if t.GUID != player.GUID && !t.allowInteraction =>
pZone.LocalEvents ! LocalServiceMessage(t.Name, LocalAction.SendGenericObjectActionMessage(t.GUID, player.GUID, GenericObjectActionEnum.PlayerDeconstructs))
}
} }
def stopDeconstructing(): Unit = { def stopDeconstructing(): Unit = {

View file

@ -10,7 +10,7 @@ import net.psforever.objects.serverobject.transfer.TransferContainer
import net.psforever.objects.serverobject.structures.WarpGate import net.psforever.objects.serverobject.structures.WarpGate
import net.psforever.objects.vehicles._ import net.psforever.objects.vehicles._
import net.psforever.objects.zones.Zone import net.psforever.objects.zones.Zone
import net.psforever.packet.game.{ChatMsg, HackMessage, HackState, HackState1, HackState7, TriggeredSound} import net.psforever.packet.game.{ChatMsg, FrameVehicleStateMessage, GenericObjectActionEnum, GenericObjectActionMessage, HackMessage, HackState, HackState1, HackState7, TriggeredSound, VehicleStateMessage}
import net.psforever.types.{ChatMessageType, DriveState, PlanetSideEmpire, PlanetSideGUID, Vector3} import net.psforever.types.{ChatMessageType, DriveState, PlanetSideEmpire, PlanetSideGUID, Vector3}
import net.psforever.services.Service import net.psforever.services.Service
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage} import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
@ -274,6 +274,20 @@ object Vehicles {
VehicleAction.KickPassenger(player.GUID, 4, unk2 = false, tGuid) VehicleAction.KickPassenger(player.GUID, 4, unk2 = false, tGuid)
) )
} }
// In case BFR is occupied and may or may not be crouched
if (GlobalDefinitions.isBattleFrameVehicle(target.Definition) && target.Seat(0).isDefined) {
zone.LocalEvents ! LocalServiceMessage(
zoneid,
LocalAction.SendGenericObjectActionMessage(PlanetSideGUID(-1), target.GUID, GenericObjectActionEnum.BFRShieldsDown))
zone.LocalEvents ! LocalServiceMessage(
zoneid,
LocalAction.SendResponse(
FrameVehicleStateMessage(target.GUID, 0, target.Position, target.Orientation, Some(Vector3(0f, 0f, 0f)), unk2=false, 0, 0, is_crouched=true, is_airborne=false, ascending_flight=false, 10, 0, 0)))
zone.LocalEvents ! LocalServiceMessage(
zoneid,
LocalAction.SendResponse(
VehicleStateMessage(target.GUID, 0, target.Position, target.Orientation, Some(Vector3(0f, 0f, 0f)), None, 0, 0, 15, is_decelerating=false, is_cloaked=false)))
}
}) })
// If the vehicle can fly and is flying: deconstruct it; and well played to whomever managed to hack a plane in mid air // If the vehicle can fly and is flying: deconstruct it; and well played to whomever managed to hack a plane in mid air
if (target.Definition.CanFly && target.isFlying) { if (target.Definition.CanFly && target.isFlying) {

View file

@ -92,4 +92,5 @@ object GenericObjectActionEnum extends Enumeration {
*/ */
val FlagSpawned = Value(14) val FlagSpawned = Value(14)
val PlayerDeconstructs = Value(6) val PlayerDeconstructs = Value(6)
val BFRShieldsDown = Value(45)
} }