5#ifndef LIBSPADES_PROTOCOL_H
6#define LIBSPADES_PROTOCOL_H
14#define VARIABLE_LENGTH 1
17#define LIBSPADES_PACKED __attribute__((packed))
20#define LIBSPADES_PACKED
584 uint8_t capturingTeam;
845 PacketTypePositionData = 0,
846 PacketTypeOrientationData = 1,
847 PacketTypeWorldUpdate = 2,
848 PacketTypeInputData = 3,
849 PacketTypeWeaponInput = 4,
852 PacketTypeGrenade = 6,
853 PacketTypeSetTool = 7,
854 PacketTypeSetColour = 8,
855 PacketTypeExistingPlayer = 9,
856 PacketTypeShortPlayerData = 10,
857 PacketTypeMoveObject = 11,
858 PacketTypeCreatePlayer = 12,
859 PacketTypeBlockAction = 13,
860 PacketTypeBlockLine = 14,
861 PacketTypeStateData = 15,
862 PacketTypeKillAction = 16,
863 PacketTypeChatMessage = 17,
864 PacketTypeMapStart = 18,
865 PacketTypeMapChunk = 19,
866 PacketTypePlayerLeft = 20,
867 PacketTypeTerritoryCapture = 21,
868 PacketTypeProgressBar = 22,
869 PacketTypeIntelCapture = 23,
870 PacketTypeIntelPickup = 24,
871 PacketTypeIntelDrop = 25,
872 PacketTypeRestock = 26,
873 PacketTypeFogColour = 27,
874 PacketTypeWeaponReload = 28,
875 PacketTypeChangeTeam = 29,
876 PacketTypeChangeWeapon = 30,
877 PacketTypeMapCached = 31,
881 PacketTypeHandShakeInit = 31,
882 PacketTypeHandShakeReturn = 32,
883 PacketTypeVersionRequest = 33,
885 PacketTypeVersionResponse = 34,
888 PacketTypeExtensionInfo = 60,
890 PacketTypePlayerProperties = 64,
891 PacketTypeEd25519Authentication = 65
897 SubPacketTypePlayerProperties = 0,
900 SubPacketTypeRequestAuthentication = 0,
901 SubPacketTypeEndAuthentication = 1,
902 SubPacketTypeSendPublicKey = 2,
903 SubPacketTypeSendNonce = 3,
904 SubPacketTypeSendSignature = 4
907enum WeaponType { WeaponTypeRifle = 0, WeaponTypeSMG = 1, WeaponTypeShotgun = 2 };
909enum BlockActionType {
910 BlockActionTypeBuild = 0,
911 BlockActionTypeSpadeGunDestroy = 1,
912 BlockActionTypeSpadeSecondaryDestroy = 2,
913 BlockActionTypeGrenadeDestroy = 3
916enum HurtType { HurtTypeFall = 0, HurtTypeWeapon = 1 };
918enum ChatType { ChatTypeAll = 0, ChatTypeTeam = 1, ChatTypeSystem = 2 };
923enum ProtocolVersion { ProtocolVersion75 = 3, ProtocolVersion76 = 4 };
925#define LIBSPADES_PROTOCOL_VERSION_10 0
926#define LIBSPADES_PROTOCOL_VERSION_21 0
927#define LIBSPADES_PROTOCOL_VERSION_22 0
929#define LIBSPADES_PROTOCOL_VERSION_26 0x40950dbb
930#define LIBSPADES_PROTOCOL_VERSION_30 0x7965ce91
931#define LIBSPADES_PROTOCOL_VERSION_31 0x7965ce91
932#define LIBSPADES_PROTOCOL_VERSION_32 0x7a8660d4
933#define LIBSPADES_PROTOCOL_VERSION_33 0x709cc6e3
934#define LIBSPADES_PROTOCOL_VERSION_35 0xf39348d7
935#define LIBSPADES_PROTOCOL_VERSION_36 0x4da4f41e
936#define LIBSPADES_PROTOCOL_VERSION_40 0xa3937cd0
937#define LIBSPADES_PROTOCOL_VERSION_41 0xa3937cd0
938#define LIBSPADES_PROTOCOL_VERSION_42 0x09e3c405
939#define LIBSPADES_PROTOCOL_VERSION_46 0x0e240254
940#define LIBSPADES_PROTOCOL_VERSION_47 0x9217d00e
941#define LIBSPADES_PROTOCOL_VERSION_48 0x187532bf
942#define LIBSPADES_PROTOCOL_VERSION_49 0xb2aa66f5
943#define LIBSPADES_PROTOCOL_VERSION_50 0x1fcb39d1
944#define LIBSPADES_PROTOCOL_VERSION_51 0x679b3c4d
945#define LIBSPADES_PROTOCOL_VERSION_52 0x9c8791f8
946#define LIBSPADES_PROTOCOL_VERSION_53 0x2aecbe65
947#define LIBSPADES_PROTOCOL_VERSION_54 0x4e849539
948#define LIBSPADES_PROTOCOL_VERSION_55 0x20791226
949#define LIBSPADES_PROTOCOL_VERSION_58 0xad004b4e
950#define LIBSPADES_PROTOCOL_VERSION_60_009 0x75894111
951#define LIBSPADES_PROTOCOL_VERSION_60_010 0xc7e8dab2
952#define LIBSPADES_PROTOCOL_VERSION_60_011 0xea5e9039
953#define LIBSPADES_PROTOCOL_VERSION_60_014 0x607521b0
954#define LIBSPADES_PROTOCOL_VERSION_60 LIBSPADES_PROTOCOL_VERSION_60_014
955#define LIBSPADES_PROTOCOL_VERSION_61_004 0x16165bae
956#define LIBSPADES_PROTOCOL_VERSION_61_005 0x8ab03b5f
957#define LIBSPADES_PROTOCOL_VERSION_61_006 0x9e592202
958#define LIBSPADES_PROTOCOL_VERSION_61 LIBSPADES_PROTOCOL_VERSION_61_006
959#define LIBSPADES_PROTOCOL_VERSION_62_003 0x13575615
960#define LIBSPADES_PROTOCOL_VERSION_62_006 0x3da3f698
961#define LIBSPADES_PROTOCOL_VERSION_62 LIBSPADES_PROTOCOL_VERSION_62_006
962#define LIBSPADES_PROTOCOL_VERSION_70_008 0x9f4fe987
963#define LIBSPADES_PROTOCOL_VERSION_70_009 0x7a4139b6
964#define LIBSPADES_PROTOCOL_VERSION_70_012 0xb0525b7e
966#define LIBSPADES_PROTOCOL_VERSION_70_017 0xdc05cbda
967#define LIBSPADES_PROTOCOL_VERSION_70 LIBSPADES_PROTOCOL_VERSION_70_017
968#define LIBSPADES_PROTOCOL_VERSION_75_003 1
969#define LIBSPADES_PROTOCOL_VERSION_75_004 1
970#define LIBSPADES_PROTOCOL_VERSION_75_007 1
971#define LIBSPADES_PROTOCOL_VERSION_75_009 1
972#define LIBSPADES_PROTOCOL_VERSION_75_010 2
973#define LIBSPADES_PROTOCOL_VERSION_75_011 2
974#define LIBSPADES_PROTOCOL_VERSION_75_013 3
975#define LIBSPADES_PROTOCOL_VERSION_75_015 3
976#define LIBSPADES_PROTOCOL_VERSION_75 LIBSPADES_PROTOCOL_VERSION_75_015
977#define LIBSPADES_PROTOCOL_VERSION_76_010 4
978#define LIBSPADES_PROTOCOL_VERSION_76 LIBSPADES_PROTOCOL_VERSION_76_010
989 KillTypeHeadshot = 1,
993 KillTypeTeamChange = 5,
994 KillTypeClassChange = 6
997enum WeaponInputType { WeaponInputTypePrimary = 1, WeaponInputTypeSecondary = 2 };
999enum HitType { HitTypeTorso = 0, HitTypeHead = 1, HitTypeArms = 2, HitTypeLegs = 3, HitTypeMelee = 4 };
1002 KeyStateTypeForward = 1,
1003 KeyStateTypeBackward = 2,
1004 KeyStateTypeLeft = 4,
1005 KeyStateTypeRight = 8,
1006 KeyStateTypeJump = 16,
1007 KeyStateTypeCrouch = 32,
1008 KeyStateTypeSneak = 64,
1009 KeyStateTypeSprint = 128
1016 ExtensionIDPlayerProperties = 0,
1019 ExtensionIDEd25519Authentication = 1,
1023 ExtensionID256Players = 192,
1024 ExtensionIDMessageTypes = 193,
1026 ExtensionIDKickReason = 194
1031enum MagazineAmmoSize { MagazineAmmoSizeRifle75 = 10, MagazineAmmoSizeSMG75 = 30, MagazineAmmoSizeShotgun75 = 6 };
1033enum ReserveAmmoSize { ReserveAmmoSizeRifle75 = 50, ReserveAmmoSizeSMG75 = 120, ReserveAmmoSizeShotgun75 = 48 };
1035enum FireDelayMilliseconds {
1036 FireDelayMillisecondsRifle75 = 500,
1037 FireDelayMillisecondsSMG75 = 100,
1038 FireDelayMillisecondsShotgun75 = 1000
1041enum PelletQuantity { PelletQuantityRifle75 = 1, PelletQuantitySMG75 = 1, PelletQuantityShotgun75 = 8 };
1043enum GamemodeType { GamemodeTypeCTF = 0, GamemodeTypeTC = 1 };
State data for the Capture-the-Flag gamemode.
Definition protocol.h:428
union IntelLocation team1Intel
The location of the first team's intel.
Definition protocol.h:439
uint8_t team2Score
The score (captures) of the second team.
Definition protocol.h:430
uint8_t heldIntels
Which teams have a player holding their intel.
Definition protocol.h:433
uint8_t captureLimit
The score that needs to be reached to finish the game.
Definition protocol.h:431
Vector3Float team1TentPosition
The position of the first team's tent.
Definition protocol.h:445
Vector3Float team2TentPosition
The position of the second team's tent.
Definition protocol.h:446
union IntelLocation team2Intel
The location of the second team's intel.
Definition protocol.h:442
uint8_t team1Score
The score (captures) of the first team.
Definition protocol.h:429
Extension entries for PacketExtensionInfo.
Definition protocol.h:684
uint8_t extensionVersion
The extension's version.
Definition protocol.h:686
uint8_t extensionID
The extension's ID.
Definition protocol.h:685
Definition protocol.h:416
Creates or destroys blocks.
Definition protocol.h:353
int32_t yPosition
The Y position of the block (forward-to-backward)
Definition protocol.h:378
uint8_t actionType
The action to be performed on the block.
Definition protocol.h:357
uint8_t playerID
The ID of the player who created/destroyed the block(s)
Definition protocol.h:355
int32_t zPosition
The Z position of the block (up-to-down)
Definition protocol.h:379
uint8_t packetID
13 (Client<->Server)
Definition protocol.h:354
int32_t xPosition
The X position of the block (left-to-right)
Definition protocol.h:377
Makes a line of blocks.
Definition protocol.h:402
uint32_t endYPosition
The Y position of the end point (forward-to-backward)
Definition protocol.h:411
uint32_t startXPosition
The X position of the start point (left-to-right)
Definition protocol.h:405
uint8_t packetID
14 (Client<->Server)
Definition protocol.h:403
uint32_t startYPosition
The Y position of the start point (forward-to-backward)
Definition protocol.h:407
uint8_t playerID
The ID of the player who made the block line.
Definition protocol.h:404
uint32_t startZPosition
The Z position of the start point (up-to-down)
Definition protocol.h:409
uint32_t endXPosition
The X position of the end point (left-to-right)
Definition protocol.h:410
uint32_t endZPosition
The Z position of the end point (up-to-down)
Definition protocol.h:413
Changes a player's team.
Definition protocol.h:644
uint8_t teamID
The team the player is changing to.
Definition protocol.h:650
uint8_t playerID
The ID of the player who is changing team.
Definition protocol.h:649
uint8_t packetID
29 (Client-->Server*) *OpenSpades supports receiving this packet, just with a very glitchy outcome.
Definition protocol.h:645
Changes a player's weapon.
Definition protocol.h:657
uint8_t packetID
30 (Client<->Server*)
Definition protocol.h:658
uint8_t playerID
The ID of the player who is changing weapon.
Definition protocol.h:664
uint8_t weaponID
The weapon the player is changing to.
Definition protocol.h:665
Sends a message in chat.
Definition protocol.h:524
uint8_t type
The type of message.
Definition protocol.h:527
uint8_t packetID
17 (Client<->Server)
Definition protocol.h:525
uint8_t playerID
The ID of the player who sent the message.
Definition protocol.h:526
char message[VARIABLE_LENGTH]
The contents of the chat message.
Definition protocol.h:533
Spawns and changes properties of a player.
Definition protocol.h:334
float xPosition
The X position of the player (left-to-right)
Definition protocol.h:339
float zPosition
The Z position to move the client player (up-to-down)
Definition protocol.h:342
char name[16]
The name of the player.
Definition protocol.h:344
uint8_t team
The player's team.
Definition protocol.h:338
uint8_t playerID
The ID of the player to spawn/modify.
Definition protocol.h:336
uint8_t packetID
12 (Client<--Server)
Definition protocol.h:335
float yPosition
The Y position to move the client player (forward-to-backward)
Definition protocol.h:340
uint8_t weapon
The player's weapon.
Definition protocol.h:337
Ends the authentication transaction and tells the client its permission level.
Definition protocol.h:807
uint8_t success
Equal to 1 if the client was successfully authenticated.
Definition protocol.h:810
char permissionLevel[VARIABLE_LENGTH]
NULL-terminated string encoded with UTF-8 that contains the permission level granted.
Definition protocol.h:811
uint8_t packetID
65
Definition protocol.h:808
uint8_t subPacketID
1 (Client<--Server)
Definition protocol.h:809
Informs the client of in-game players and the server of the joining client player.
Definition protocol.h:257
uint8_t blue
The blue colour value of the player's block.
Definition protocol.h:277
uint8_t green
The green colour value of the player's block.
Definition protocol.h:278
uint8_t team
The team of the player.
Definition protocol.h:260
uint32_t kills
The amount of points the player has.
Definition protocol.h:275
char name[16]
The name of the player.
Definition protocol.h:280
uint8_t playerID
The ID of the player.
Definition protocol.h:259
uint8_t red
The red colour value of the player's block.
Definition protocol.h:279
uint8_t weapon
The weapon of the player.
Definition protocol.h:262
uint8_t item
The held item of the player.
Definition protocol.h:268
uint8_t packetID
9 (Client<->Server)
Definition protocol.h:258
Tells the peer (client or server) about supported extensions to the AoS protocol.
Definition protocol.h:693
struct ExtensionInfoEntry entries[VARIABLE_LENGTH]
The list of supported extensions and their versions.
Definition protocol.h:696
uint8_t length
The amount of supported extensions.
Definition protocol.h:695
uint8_t packetID
60 (Client<->Server)
Definition protocol.h:694
Changes the colour of the fog.
Definition protocol.h:619
uint8_t packetID
27 (Client<--Server*)
Definition protocol.h:620
uint8_t g
The green colour value of the fog.
Definition protocol.h:628
uint8_t b
The blue colour value of the fog.
Definition protocol.h:627
uint8_t r
The red colour value of the fog.
Definition protocol.h:629
uint8_t a
The alpha colour value of the fog.
Definition protocol.h:625
Creates a grenade somewhere in the world.
Definition protocol.h:202
uint8_t playerID
The ID of the player who threw the grenade.
Definition protocol.h:204
float yVelocity
The Y velocity of the grenade (forward-to-backward)
Definition protocol.h:217
float xVelocity
The X velocity of the grenade (left-to-right)
Definition protocol.h:216
uint8_t packetID
6 (Client<->Server)
Definition protocol.h:203
float yPosition
The Y position to spawn the grenade (forward-to-backward)
Definition protocol.h:213
float fuseLength
The time in seconds from grenade creation until it detonates.
Definition protocol.h:205
float zVelocity
The Z velocity of the grenade (up-to-down)
Definition protocol.h:218
float zPosition
The Z position to spawn the grenade (up-to-down)
Definition protocol.h:215
float xPosition
The X position to spawn the grenade (left-to-right)
Definition protocol.h:212
A packet that must usually be answered with PacketHandShakeReturn to gain access to extensions.
Definition protocol.h:706
uint32_t challenge
4 bytes that must be copied over to the return packet.
Definition protocol.h:708
uint8_t packetID
31 (Client<--Server)
Definition protocol.h:707
The packet used to answer PacketHandShakeInit.
Definition protocol.h:718
uint8_t packetID
32 (Client-->Server)
Definition protocol.h:719
uint32_t challenge
4 bytes that must be copied over from the init packet.
Definition protocol.h:720
Tells the server that a player has been hit.
Definition protocol.h:156
uint8_t hitType
Where/how the player has been hit.
Definition protocol.h:159
uint8_t packetID
5 (Client-->Server)
Definition protocol.h:157
uint8_t playerID
The ID of the player who has been hit.
Definition protocol.h:158
Informs the client that a player has captured their enemy's intel.
Definition protocol.h:590
uint8_t packetID
23 (Client<--Server)
Definition protocol.h:591
uint8_t playerID
The ID of the player who has captured the intel.
Definition protocol.h:592
uint8_t winning
Whether the capture was the last needed to end the game.
Definition protocol.h:593
Informs the client that a player has dropped their enemy's intel.
Definition protocol.h:606
uint8_t playerID
The ID of the player who has dropped the intel.
Definition protocol.h:608
uint8_t packetID
25 (Client<--Server)
Definition protocol.h:607
Vector3Float position
The position of the intel.
Definition protocol.h:609
Informs the client that a player has picked up their enemy's intel.
Definition protocol.h:600
uint8_t playerID
The ID of the player who has picked up the intel.
Definition protocol.h:602
uint8_t packetID
24 (Client<--Server)
Definition protocol.h:601
Informs the client about the death of a player.
Definition protocol.h:498
uint8_t killType
How the player died.
Definition protocol.h:502
uint8_t respawnTime
The time in seconds until the player respawns.
Definition protocol.h:516
uint8_t playerID
The ID of the player who died.
Definition protocol.h:500
uint8_t killerID
The ID of the killer.
Definition protocol.h:501
uint8_t packetID
16 (Client<--Server)
Definition protocol.h:499
From protocol v0.76.
Definition protocol.h:676
uint8_t cached
Whether the map is stored in the client's cache or not.
Definition protocol.h:678
uint8_t packetID
31 (Client-->Server)
Definition protocol.h:677
Contains chunks of compressed map data.
Definition protocol.h:558
uint8_t mapData[VARIABLE_LENGTH]
The chunk of compressed map data.
Definition protocol.h:560
uint8_t packetID
19 (Client<--Server)
Definition protocol.h:559
A slightly more useful v0.76 equivalent of PacketMapStart.
Definition protocol.h:547
uint32_t crc32
Presumably the CRC32 code for the decompressed map.
Definition protocol.h:550
uint8_t packetID
18 (Client<--Server)
Definition protocol.h:548
uint32_t mapSize
The compressed map size in bytes.
Definition protocol.h:549
char mapName[16]
The name of the map.
Definition protocol.h:552
A seemingly useless packet to signify the start of the map download.
Definition protocol.h:540
uint8_t packetID
18 (Client<--Server)
Definition protocol.h:541
uint32_t mapSize
The size of the zlib stream in bytes.
Definition protocol.h:542
Moves objects.
Definition protocol.h:323
uint8_t packetID
11 (Client<--Server)
Definition protocol.h:324
Changes the orientation of the client player.
Definition protocol.h:83
float xOrientation
The X orientation to rotate the client player.
Definition protocol.h:87
float yOrientation
The Y orientation to rotate the client player.
Definition protocol.h:88
uint8_t packetID
1 (Client<->Server)*
Definition protocol.h:84
float zOrientation
The Z orientation to rotate the client player.
Definition protocol.h:89
Informs the client that a player has left the game.
Definition protocol.h:565
uint8_t packetID
20 (Client<--Server)
Definition protocol.h:566
uint8_t playerID
The ID of the player who left.
Definition protocol.h:567
Informs the client about stats of a player.
Definition protocol.h:785
uint8_t grenades
The amount of grenades the player has.
Definition protocol.h:791
uint8_t playerID
The ID of the player to inform the client about.
Definition protocol.h:788
uint8_t magazineAmmo
The amount of magazine ammunition the player has.
Definition protocol.h:792
uint8_t blocks
The amount of blocks the player has.
Definition protocol.h:790
uint8_t HP
The HP of the player.
Definition protocol.h:789
uint8_t reserveAmmo
The amount of reserve ammunition the player has.
Definition protocol.h:793
uint32_t score
The score the player has.
Definition protocol.h:794
uint8_t subPacketID
0 (Client<--Server)
Definition protocol.h:787
uint8_t packetID
64
Definition protocol.h:786
Changes the position of the client player.
Definition protocol.h:42
float zPosition
The Z position to move the client player (up-to-down)
Definition protocol.h:48
uint8_t packetID
0 (Client<->Server)
Definition protocol.h:43
float yPosition
The Y position to move the client player (forward-to-backward)
Definition protocol.h:46
float xPosition
The X position to move the client player (left-to-right)
Definition protocol.h:44
Definition protocol.h:581
uint8_t packetID
22 (Client<--Server)
Definition protocol.h:582
Requests the client to start an authentication transaction.
Definition protocol.h:801
uint8_t packetID
65
Definition protocol.h:802
uint8_t subPacketID
0 (Client<--Server)
Definition protocol.h:803
Informs the client that a player has restocked.
Definition protocol.h:613
uint8_t playerID
The ID of the player who has restocked.
Definition protocol.h:615
uint8_t packetID
26 (Client<--Server)
Definition protocol.h:614
Sends the client a nonce to sign after receiving its public key.
Definition protocol.h:827
uint8_t packetID
65
Definition protocol.h:828
uint8_t nonce[VARIABLE_LENGTH]
Data to be signed with the client's secret key.
Definition protocol.h:830
uint8_t subPacketID
3 (Client<--Server)
Definition protocol.h:829
Sends the clients's public key to the server in response to the request for authentication.
Definition protocol.h:817
uint8_t packetID
65
Definition protocol.h:818
uint8_t publicKey[32]
Ed25519 public key to be used for authentication.
Definition protocol.h:820
uint8_t subPacketID
2 (Client-->Server)
Definition protocol.h:819
Sends the server back the nonce sent the client, signed with the client's secret key.
Definition protocol.h:834
uint8_t packetID
65
Definition protocol.h:835
uint8_t signature[64]
The nonce sent by the server, signed with the client's secret key.
Definition protocol.h:837
uint8_t subPacketID
4 (Client-->Server)
Definition protocol.h:836
Changes the block colour of a player.
Definition protocol.h:237
uint8_t red
The red colour value of the player's block.
Definition protocol.h:246
uint8_t blue
The blue colour value of the player's block.
Definition protocol.h:240
uint8_t green
The green colour value of the player's block.
Definition protocol.h:245
uint8_t playerID
The ID of the player whose block colour has changed.
Definition protocol.h:239
uint8_t packetID
8 (Client<->Server)
Definition protocol.h:238
Changes the client player's HP.
Definition protocol.h:170
uint8_t HP
The amount of HP to change the client player to.
Definition protocol.h:172
uint8_t packetID
5 (Client<--Server)
Definition protocol.h:171
float sourceX
The X position of the damage source (left-to-right)
Definition protocol.h:178
uint8_t type
The reason for the damage.
Definition protocol.h:173
float sourceZ
The Z position of the damage source (up-to-down)
Definition protocol.h:181
float sourceY
The Y position of the damage source (forward-to-backward)
Definition protocol.h:179
Switches the client player's team/weapon from spectator mode.
Definition protocol.h:310
uint8_t playerID
The ID of the player who changed weapon/team.
Definition protocol.h:312
uint8_t team
The team to switch the player to.
Definition protocol.h:318
uint8_t packetID
10 (Client-->Server)
Definition protocol.h:311
uint8_t weapon
The weapon to switch the player to.
Definition protocol.h:319
Contains information about the game's state and the client player's ID.
Definition protocol.h:475
uint8_t team1_b
The blue colour value of the first team.
Definition protocol.h:481
union GamemodeData gamemodeData
The data for the gamemode's state.
Definition protocol.h:494
uint8_t team1_r
The red colour value of the first team.
Definition protocol.h:483
char team2Name[10]
The name of the second team.
Definition protocol.h:488
uint8_t team2_b
The blue colour value of the second team.
Definition protocol.h:484
uint8_t team2_g
The green colour value of the second team.
Definition protocol.h:485
uint8_t fog_g
The green colour value of the fog.
Definition protocol.h:479
uint8_t team2_r
The red colour value of the second team.
Definition protocol.h:486
uint8_t fog_r
The red colour value of the fog.
Definition protocol.h:480
uint8_t gamemode
The gamemode.
Definition protocol.h:489
uint8_t team1_g
The green colour value of the first team.
Definition protocol.h:482
uint8_t packetID
15 (Client<--Server)
Definition protocol.h:476
uint8_t playerID
The ID of the client player.
Definition protocol.h:477
uint8_t fog_b
The blue colour value of the fog.
Definition protocol.h:478
char team1Name[10]
The name of the first team.
Definition protocol.h:487
Informs the client that a territory has been captured.
Definition protocol.h:571
uint8_t packetID
21 (Client<--Server)
Definition protocol.h:572
uint8_t territoryID
Corresponds to territory index in StateData.
Definition protocol.h:573
uint8_t team
The team which captured the territory.
Definition protocol.h:575
uint8_t winning
Whether the capture was the last needed to end the game.
Definition protocol.h:574
Requests client information from the client if the Hand Shake was completed (if supported).
Definition protocol.h:733
uint8_t packetID
33 (Client<--Server)
Definition protocol.h:734
Informs the server about the details of the client.
Definition protocol.h:748
char operatingSystemInfo[VARIABLE_LENGTH]
A string intended to contain the operating system the client is running on.
Definition protocol.h:762
uint8_t versionMajor
The major version of the client.
Definition protocol.h:759
char client
A single byte used to identify the client.
Definition protocol.h:750
uint8_t versionMinor
The minor version of the client.
Definition protocol.h:760
uint8_t versionRevision
The revision of the client.
Definition protocol.h:761
uint8_t packetID
34 (Client-->Server)
Definition protocol.h:749
Informs the client that a player has reloaded their weapon.
Definition protocol.h:636
uint8_t reserveAmmo
The reserve ammunition count of the player who has reloaded.
Definition protocol.h:640
uint8_t packetID
28 (Client<->Server)
Definition protocol.h:637
uint8_t magazineAmmo
The magazine (in-gun) ammunition count of the player who has reloaded.
Definition protocol.h:639
uint8_t playerID
The ID of the player who has reloaded.
Definition protocol.h:638
Regularly sent packet containing positions and orientations of all players.
Definition protocol.h:117
struct PlayerPositionData players[MAX_PLAYERS]
Contains the actual data.
Definition protocol.h:119
uint8_t packetID
2 (Client<--Server)
Definition protocol.h:118
Definition protocol.h:101
State data for the Territorial Control gamemode.
Definition protocol.h:458
struct Territory territories[16]
The territories.
Definition protocol.h:460
uint8_t territoryCount
The quantity of territories in the game.
Definition protocol.h:459
Definition protocol.h:449
float yPosition
The Y position of the territory (forward-to-backward)
Definition protocol.h:451
float zPosition
The Z position of the territory (up-to-down)
Definition protocol.h:453
float xPosition
The X position of the territory (left-to-right)
Definition protocol.h:450
uint8_t team
The team of the territory.
Definition protocol.h:454
A union that contains the possible gamemodes for PacketStateData.
Definition protocol.h:467
struct CTFStateData ctfStateData
Capture-the-Flag mode.
Definition protocol.h:468
struct TCStateData tcStateData
Territorial Control mode.
Definition protocol.h:469
Definition protocol.h:422
uint8_t playerID
The ID of the player carrying the intel if any.
Definition protocol.h:423
Vector3Float position
The position of the intel if no player is carrying it.
Definition protocol.h:424