Closed mrfishie closed 9 years ago
Actually, the TogglePerspectivePacket (https://github.com/rjwut/ArtClientLib/wiki/Artemis-Packet-Protocol%3A-TogglePerspectivePacket) handled that, although there was no way to explicitly specify which view you wanted; you could only toggle it from one to the other. Perhaps this is new as of version 2.1.5?
From what I can tell, TogglePerspectivePacket tells the server to change perspective.. this SetPerspectivePacket tells any main screens that the ships perspective should be changed (i.e it is emitted from the server when a client sends TogglePerspective).
Ah, okay, that makes sense. In the past I've followed the convention set by the original author of the library, where any classes named Set[Foo]Packet always originated from the client, so when I saw the name you gave this one, I had incorrectly assumed that it originated from the client. I may end up changing the name to avoid confusion.
Ah ok. I never noticed that... Sorry for the confusion! Perhaps simply 'PerspectivePacket' would be a better name?
Yeah, I'll come up with something. Thanks for the issue!
I noticed that there was no documentation for any packet sent from the server to set the perspective of the main screen. After some inspection with artemis-glitter, I found the packet in question:
Type: 0xf754c8fe (game message)
Subtype: 0x12
Direction: server->client (in)
Payload: Perspective (int) - 1 for third-person, 0 for first-person
I have added a page on the protocol documentation wiki.
This should probably be added to the lib.