mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-13 23:44:40 +00:00
fleshed out field details of COSM
This commit is contained in:
parent
49880ce476
commit
749d2d2c50
2 changed files with 21 additions and 6 deletions
|
|
@ -5,9 +5,21 @@ import net.psforever.packet.{GamePacketOpcode, Marshallable, PlanetSideGamePacke
|
||||||
import scodec.Codec
|
import scodec.Codec
|
||||||
import scodec.codecs._
|
import scodec.codecs._
|
||||||
|
|
||||||
final case class ChildObjectStateMessage(unk1 : Int,
|
/**
|
||||||
unk2 : Int,
|
* na
|
||||||
unk3 : Int)
|
* @param object_guid the object being manipulated (controlled)
|
||||||
|
* @param pitch the angle with respect to the sky and the ground towards which the object is directed;
|
||||||
|
* an 8-bit unsigned value;
|
||||||
|
* 0 is perfectly level and forward-facing, wrapping around at 255;
|
||||||
|
* positive rotation is occurs by rotating downwards from forward-facing
|
||||||
|
* @param yaw the angle with respect to the horizon towards which the object is directed;
|
||||||
|
* an 8-bit unsigned value;
|
||||||
|
* 0 is forward-facing, wrapping around at 255;
|
||||||
|
* positive rotation is clockwise of forward-facing
|
||||||
|
*/
|
||||||
|
final case class ChildObjectStateMessage(object_guid : PlanetSideGUID,
|
||||||
|
pitch : Int,
|
||||||
|
yaw : Int)
|
||||||
extends PlanetSideGamePacket {
|
extends PlanetSideGamePacket {
|
||||||
type Packet = ChildObjectStateMessage
|
type Packet = ChildObjectStateMessage
|
||||||
def opcode = GamePacketOpcode.ChildObjectStateMessage
|
def opcode = GamePacketOpcode.ChildObjectStateMessage
|
||||||
|
|
@ -16,8 +28,8 @@ final case class ChildObjectStateMessage(unk1 : Int,
|
||||||
|
|
||||||
object ChildObjectStateMessage extends Marshallable[ChildObjectStateMessage] {
|
object ChildObjectStateMessage extends Marshallable[ChildObjectStateMessage] {
|
||||||
implicit val codec : Codec[ChildObjectStateMessage] = (
|
implicit val codec : Codec[ChildObjectStateMessage] = (
|
||||||
("unk1" | uint16L) ::
|
("object_guid" | PlanetSideGUID.codec) ::
|
||||||
("unk2" | uint8L) ::
|
("pitch" | uint8L) ::
|
||||||
("unk3" | uint8L)
|
("yaw" | uint8L)
|
||||||
).as[ChildObjectStateMessage]
|
).as[ChildObjectStateMessage]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,9 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
||||||
case msg @ PlayerStateMessageUpstream(avatar_guid, pos, vel, unk1, aim_pitch, unk2, seq_time, unk3, is_crouching, is_jumping, unk4, is_cloaking, unk5, unk6) =>
|
case msg @ PlayerStateMessageUpstream(avatar_guid, pos, vel, unk1, aim_pitch, unk2, seq_time, unk3, is_crouching, is_jumping, unk4, is_cloaking, unk5, unk6) =>
|
||||||
//log.info("PlayerState: " + msg)
|
//log.info("PlayerState: " + msg)
|
||||||
|
|
||||||
|
case msg @ ChildObjectStateMessage(object_guid : PlanetSideGUID, pitch : Int, yaw : Int) =>
|
||||||
|
//log.info("ChildObjectState: " + msg)
|
||||||
|
|
||||||
case msg @ ChatMsg(messagetype, has_wide_contents, recipient, contents, note_contents) =>
|
case msg @ ChatMsg(messagetype, has_wide_contents, recipient, contents, note_contents) =>
|
||||||
// TODO: Prevents log spam, but should be handled correctly
|
// TODO: Prevents log spam, but should be handled correctly
|
||||||
if (messagetype != ChatMessageType.CMT_TOGGLE_GM) {
|
if (messagetype != ChatMessageType.CMT_TOGGLE_GM) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue