From bea1a0aad268166cc43648dfcebc2bc52a7ff85e Mon Sep 17 00:00:00 2001 From: FateJH Date: Thu, 9 Feb 2017 22:43:52 -0500 Subject: [PATCH] updated comments to BroadcastWarpgateUpdate to reflect new information --- .../game/BroadcastWarpgateUpdateMessage.scala | 36 +++++++++---------- .../src/main/scala/WorldSessionActor.scala | 4 --- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/common/src/main/scala/net/psforever/packet/game/BroadcastWarpgateUpdateMessage.scala b/common/src/main/scala/net/psforever/packet/game/BroadcastWarpgateUpdateMessage.scala index e4c07a4f..dc8d8a31 100644 --- a/common/src/main/scala/net/psforever/packet/game/BroadcastWarpgateUpdateMessage.scala +++ b/common/src/main/scala/net/psforever/packet/game/BroadcastWarpgateUpdateMessage.scala @@ -6,29 +6,27 @@ import scodec.Codec import scodec.codecs._ /** - * Promotes a Broadcast Warpgate. - * - * Change the map name of a warpgate into "Broadcast Warpgate." + * Promotes a warpgate's "broadcast" functionality.
+ *
+ * Change the map name of a warpgate into "Broadcast" when the proper state is set. * If a proper warpgate is not designated, nothing happens. - * The input state is a byte starting at `00` where the first valid "on" state is `20`. - * Subsequent "on" states are '40' values apart - '20', '60', 'A0', and 'E0'. - * 'C0' is an uncommon value. - * All other numbers (seem to) default to the normal map designation for the warpgate. - * - * Exploration: is this packet merely cosmetic or does it change the functionality of a warpgate too? - * Exploration: are there any differences between the states besides "on" and "off"? - * + * If not set, the map name of the warpgate will default to whatever is normally written on the map. + * The map designation of geowarps is not affected by this packet.
+ *
+ * Exploration:
+ * I believe these `Boolean` values actually indicate some measure of warpgate operation. + * Geowarps, for example, though their appearance does not change, recieve this packet. + * Moreover, they can operate as a receiving-end broadcast gate. * @param continent_guid identifies the zone (continent) * @param building_guid identifies the warpgate (see `BuildingInfoUpdateMessage`) - * @param state1 na - * @param state2 na - * @param is_broadcast if true, the gate replaces its destination text with "Broadcast;" - * the owner faction may shortcut between disconnected gates along the intercontinental lattice + * @param unk1 na + * @param unk2 na + * @param is_broadcast if true, the gate replaces its destination text with "Broadcast" */ final case class BroadcastWarpgateUpdateMessage(continent_guid : PlanetSideGUID, building_guid : PlanetSideGUID, - state1 : Boolean, - state2 : Boolean, + unk1 : Boolean, + unk2 : Boolean, is_broadcast : Boolean) extends PlanetSideGamePacket { type Packet = BroadcastWarpgateUpdateMessage @@ -40,8 +38,8 @@ object BroadcastWarpgateUpdateMessage extends Marshallable[BroadcastWarpgateUpda implicit val codec : Codec[BroadcastWarpgateUpdateMessage] = ( ("continent_guid" | PlanetSideGUID.codec) :: ("building_guid" | PlanetSideGUID.codec) :: - ("state1" | bool) :: - ("state2" | bool) :: + ("unk1" | bool) :: + ("unk2" | bool) :: ("is_broadcast" | bool) ).as[BroadcastWarpgateUpdateMessage] } diff --git a/pslogin/src/main/scala/WorldSessionActor.scala b/pslogin/src/main/scala/WorldSessionActor.scala index b4eafb6e..6652cd55 100644 --- a/pslogin/src/main/scala/WorldSessionActor.scala +++ b/pslogin/src/main/scala/WorldSessionActor.scala @@ -191,10 +191,6 @@ class WorldSessionActor extends Actor with MDCContextAware { sendResponse(PacketCoding.CreateGamePacket(0, ContinentalLockUpdateMessage(PlanetSideGUID(13), PlanetSideEmpire.VS))) // "The VS have captured the VS Sanctuary." sendResponse(PacketCoding.CreateGamePacket(0, BroadcastWarpgateUpdateMessage(PlanetSideGUID(13), PlanetSideGUID(1), false, false, true))) // VS Sanctuary: Inactive Warpgate -> Broadcast Warpgate - sendRawResponse(hex"A0 03 00 03 00 06 00 00 00 01 80 00 00 00 10 00 00 00 00 00 00 40") - sendRawResponse(hex"CD 03 00 03 00 00 00 00") - sendResponse(PacketCoding.CreateGamePacket(0, BroadcastWarpgateUpdateMessage(PlanetSideGUID(3), PlanetSideGUID(3), true, false, true))) - sendResponse(PacketCoding.CreateGamePacket(0,BuildingInfoUpdateMessage( PlanetSideGUID(6), //Ceryshen PlanetSideGUID(2), //Anguta