Monstrofil / replays_unpack

51 stars 19 forks source link

Add CameraPosition packet support #16

Open Monstrofil opened 2 years ago

Monstrofil commented 2 years ago

Something like this, needs to be investigated futher and also checked for WoT and old WoWS versions.

0x24: Camera

....

class Camera(PrettyPrintObjectMixin):
    def __init__(self, stream):
            self.unknown1, = struct.unpack('f', stream.read(4))
            self.unknown2, = struct.unpack('f', stream.read(4))
            self.unknown3, = struct.unpack('f', stream.read(4))

            self.unknown4, = struct.unpack('f', stream.read(4))

            self.absolutePosition = Vector3(stream)

            self.fov, = struct.unpack('f', stream.read(4))
            self.position = Vector3(stream)
            self.direction = Vector3(stream)