mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
Stub out ControlSync to prevent client from leaving
Still have no idea what these packets are actually doing...
This commit is contained in:
parent
6ea1d157af
commit
11298c1a46
|
|
@ -5,7 +5,7 @@ import net.psforever.packet.{ControlPacketOpcode, Marshallable, PlanetSideContro
|
|||
import scodec.Codec
|
||||
import scodec.codecs._
|
||||
|
||||
final case class ControlSyncResp(timeDiff : Int, unk : Long,
|
||||
final case class ControlSyncResp(timeDiff : Int, serverTick : Long,
|
||||
field1 : Long, field2 : Long, field3 : Long, field4 : Long)
|
||||
extends PlanetSideControlPacket {
|
||||
type Packet = ControlSyncResp
|
||||
|
|
@ -16,7 +16,7 @@ final case class ControlSyncResp(timeDiff : Int, unk : Long,
|
|||
object ControlSyncResp extends Marshallable[ControlSyncResp] {
|
||||
implicit val codec : Codec[ControlSyncResp] = (
|
||||
("time_diff" | uint16) ::
|
||||
("unk" | uint32) ::
|
||||
("server_tick" | uint32) ::
|
||||
("field1" | int64) ::
|
||||
("field2" | int64) ::
|
||||
("field3" | int64) ::
|
||||
|
|
|
|||
|
|
@ -68,6 +68,11 @@ class LoginSessionActor extends Actor with MDCContextAware {
|
|||
case Successful(v) =>
|
||||
handlePkt(v)
|
||||
}
|
||||
case sync @ ControlSync(diff, unk, f1, f2, f3, f4, fa, fb) =>
|
||||
log.debug(s"SYNC: ${sync}")
|
||||
val serverTick = Math.abs(System.nanoTime().toInt) // limit the size to prevent encoding error
|
||||
sendResponse(PacketCoding.CreateControlPacket(ControlSyncResp(diff, serverTick,
|
||||
fa, fb, fb, fa)))
|
||||
case MultiPacket(packets) =>
|
||||
packets.foreach { pkt =>
|
||||
PacketCoding.DecodePacket(pkt) match {
|
||||
|
|
|
|||
Loading…
Reference in a new issue