mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-28 10:43:37 +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.codecs._
|
||||
|
||||
final case class ChildObjectStateMessage(unk1 : Int,
|
||||
unk2 : Int,
|
||||
unk3 : Int)
|
||||
/**
|
||||
* na
|
||||
* @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 {
|
||||
type Packet = ChildObjectStateMessage
|
||||
def opcode = GamePacketOpcode.ChildObjectStateMessage
|
||||
|
|
@ -16,8 +28,8 @@ final case class ChildObjectStateMessage(unk1 : Int,
|
|||
|
||||
object ChildObjectStateMessage extends Marshallable[ChildObjectStateMessage] {
|
||||
implicit val codec : Codec[ChildObjectStateMessage] = (
|
||||
("unk1" | uint16L) ::
|
||||
("unk2" | uint8L) ::
|
||||
("unk3" | uint8L)
|
||||
("object_guid" | PlanetSideGUID.codec) ::
|
||||
("pitch" | uint8L) ::
|
||||
("yaw" | uint8L)
|
||||
).as[ChildObjectStateMessage]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue