├── go.mod ├── utils.go ├── go.sum ├── flat ├── GameSpeedOption.go ├── MaxScore.go ├── GravityOption.go ├── BallSizeOption.go ├── BallTypeOption.go ├── OvertimeOption.go ├── BallWeightOption.go ├── BoostStrengthOption.go ├── CollisionShape.go ├── MatchLength.go ├── BallMaxSpeedOption.go ├── GameMessage.go ├── BallBouncinessOption.go ├── SeriesLengthOption.go ├── RespawnTimeOption.go ├── TileState.go ├── BoostOption.go ├── PlayerClass.go ├── DemolishOption.go ├── GameMode.go ├── RumbleOption.go ├── RenderType.go ├── Bool.go ├── Float.go ├── ExistingMatchBehavior.go ├── HumanPlayer.go ├── RLBotPlayer.go ├── PartyMemberBotPlayer.go ├── SphereShape.go ├── DesiredBoostState.go ├── DropshotTile.go ├── PsyonixBotPlayer.go ├── DesiredBallState.go ├── ConsoleCommand.go ├── Vector3.go ├── BallRigidBodyState.go ├── Rotator.go ├── PlayerSpectate.go ├── BoostPad.go ├── TeamInfo.go ├── QuickChatMessages.go ├── GameMessageWrapper.go ├── CylinderShape.go ├── TinyBall.go ├── PlayerInput.go ├── Quaternion.go ├── BoostPadState.go ├── PlayerRigidBodyState.go ├── BoxShape.go ├── BallPrediction.go ├── Vector3Partial.go ├── RenderGroup.go ├── RotatorPartial.go ├── PredictionSlice.go ├── TinyPacket.go ├── RigidBodyTick.go ├── Color.go ├── DropShotBallInfo.go ├── FieldInfo.go ├── PlayerStatEvent.go ├── ReadyMessage.go ├── Physics.go ├── DesiredCarState.go ├── MessagePacket.go ├── DesiredGameInfoState.go ├── DesiredPhysics.go ├── PlayerInputChange.go ├── GoalInfo.go ├── BallInfo.go ├── GameMap.go ├── QuickChat.go ├── RigidBodyState.go ├── ScoreInfo.go ├── PlayerConfiguration.go ├── Touch.go ├── TinyPlayer.go ├── DesiredGameState.go ├── LoadoutPaint.go ├── RenderMessage.go ├── GameTickPacket.go ├── ControllerState.go ├── GameInfo.go ├── MatchSettings.go ├── QuickChatSelection.go ├── PlayerInfo.go └── MutatorSettings.go ├── LICENSE ├── debug.go ├── socket.go ├── README.md └── constants.go /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/Trey2k/RLBotGo 2 | 3 | go 1.16 4 | 5 | require github.com/google/flatbuffers v2.0.0+incompatible 6 | -------------------------------------------------------------------------------- /utils.go: -------------------------------------------------------------------------------- 1 | package RLBotGo 2 | 3 | // convert a bool to a byte. Useful for converting structs to flatbuffers 4 | var boolToByte = map[bool]byte{false: 0, true: 1} 5 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/google/flatbuffers v2.0.0+incompatible h1:dicJ2oXwypfwUGnB2/TYWYEKiuk9eYQlQO/AnOHl5mI= 2 | github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= 3 | -------------------------------------------------------------------------------- /flat/GameSpeedOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | GameSpeedOptionDefault = 0 7 | GameSpeedOptionSlo_Mo = 1 8 | GameSpeedOptionTime_Warp = 2 9 | ) 10 | 11 | var EnumNamesGameSpeedOption = map[int]string{ 12 | GameSpeedOptionDefault:"Default", 13 | GameSpeedOptionSlo_Mo:"Slo_Mo", 14 | GameSpeedOptionTime_Warp:"Time_Warp", 15 | } 16 | 17 | -------------------------------------------------------------------------------- /flat/MaxScore.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | MaxScoreUnlimited = 0 7 | MaxScoreOne_Goal = 1 8 | MaxScoreThree_Goals = 2 9 | MaxScoreFive_Goals = 3 10 | ) 11 | 12 | var EnumNamesMaxScore = map[int]string{ 13 | MaxScoreUnlimited:"Unlimited", 14 | MaxScoreOne_Goal:"One_Goal", 15 | MaxScoreThree_Goals:"Three_Goals", 16 | MaxScoreFive_Goals:"Five_Goals", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/GravityOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | GravityOptionDefault = 0 7 | GravityOptionLow = 1 8 | GravityOptionHigh = 2 9 | GravityOptionSuper_High = 3 10 | ) 11 | 12 | var EnumNamesGravityOption = map[int]string{ 13 | GravityOptionDefault:"Default", 14 | GravityOptionLow:"Low", 15 | GravityOptionHigh:"High", 16 | GravityOptionSuper_High:"Super_High", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/BallSizeOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BallSizeOptionDefault = 0 7 | BallSizeOptionSmall = 1 8 | BallSizeOptionLarge = 2 9 | BallSizeOptionGigantic = 3 10 | ) 11 | 12 | var EnumNamesBallSizeOption = map[int]string{ 13 | BallSizeOptionDefault:"Default", 14 | BallSizeOptionSmall:"Small", 15 | BallSizeOptionLarge:"Large", 16 | BallSizeOptionGigantic:"Gigantic", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/BallTypeOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BallTypeOptionDefault = 0 7 | BallTypeOptionCube = 1 8 | BallTypeOptionPuck = 2 9 | BallTypeOptionBasketball = 3 10 | ) 11 | 12 | var EnumNamesBallTypeOption = map[int]string{ 13 | BallTypeOptionDefault:"Default", 14 | BallTypeOptionCube:"Cube", 15 | BallTypeOptionPuck:"Puck", 16 | BallTypeOptionBasketball:"Basketball", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/OvertimeOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | OvertimeOptionUnlimited = 0 7 | OvertimeOptionFive_Max_First_Score = 1 8 | OvertimeOptionFive_Max_Random_Team = 2 9 | ) 10 | 11 | var EnumNamesOvertimeOption = map[int]string{ 12 | OvertimeOptionUnlimited:"Unlimited", 13 | OvertimeOptionFive_Max_First_Score:"Five_Max_First_Score", 14 | OvertimeOptionFive_Max_Random_Team:"Five_Max_Random_Team", 15 | } 16 | 17 | -------------------------------------------------------------------------------- /flat/BallWeightOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BallWeightOptionDefault = 0 7 | BallWeightOptionLight = 1 8 | BallWeightOptionHeavy = 2 9 | BallWeightOptionSuper_Light = 3 10 | ) 11 | 12 | var EnumNamesBallWeightOption = map[int]string{ 13 | BallWeightOptionDefault:"Default", 14 | BallWeightOptionLight:"Light", 15 | BallWeightOptionHeavy:"Heavy", 16 | BallWeightOptionSuper_Light:"Super_Light", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/BoostStrengthOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BoostStrengthOptionOne = 0 7 | BoostStrengthOptionOneAndAHalf = 1 8 | BoostStrengthOptionTwo = 2 9 | BoostStrengthOptionTen = 3 10 | ) 11 | 12 | var EnumNamesBoostStrengthOption = map[int]string{ 13 | BoostStrengthOptionOne:"One", 14 | BoostStrengthOptionOneAndAHalf:"OneAndAHalf", 15 | BoostStrengthOptionTwo:"Two", 16 | BoostStrengthOptionTen:"Ten", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/CollisionShape.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | CollisionShapeNONE = 0 7 | CollisionShapeBoxShape = 1 8 | CollisionShapeSphereShape = 2 9 | CollisionShapeCylinderShape = 3 10 | ) 11 | 12 | var EnumNamesCollisionShape = map[int]string{ 13 | CollisionShapeNONE:"NONE", 14 | CollisionShapeBoxShape:"BoxShape", 15 | CollisionShapeSphereShape:"SphereShape", 16 | CollisionShapeCylinderShape:"CylinderShape", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/MatchLength.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | MatchLengthFive_Minutes = 0 7 | MatchLengthTen_Minutes = 1 8 | MatchLengthTwenty_Minutes = 2 9 | MatchLengthUnlimited = 3 10 | ) 11 | 12 | var EnumNamesMatchLength = map[int]string{ 13 | MatchLengthFive_Minutes:"Five_Minutes", 14 | MatchLengthTen_Minutes:"Ten_Minutes", 15 | MatchLengthTwenty_Minutes:"Twenty_Minutes", 16 | MatchLengthUnlimited:"Unlimited", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/BallMaxSpeedOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BallMaxSpeedOptionDefault = 0 7 | BallMaxSpeedOptionSlow = 1 8 | BallMaxSpeedOptionFast = 2 9 | BallMaxSpeedOptionSuper_Fast = 3 10 | ) 11 | 12 | var EnumNamesBallMaxSpeedOption = map[int]string{ 13 | BallMaxSpeedOptionDefault:"Default", 14 | BallMaxSpeedOptionSlow:"Slow", 15 | BallMaxSpeedOptionFast:"Fast", 16 | BallMaxSpeedOptionSuper_Fast:"Super_Fast", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/GameMessage.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | GameMessageNONE = 0 7 | GameMessagePlayerStatEvent = 1 8 | GameMessagePlayerSpectate = 2 9 | GameMessagePlayerInputChange = 3 10 | ) 11 | 12 | var EnumNamesGameMessage = map[int]string{ 13 | GameMessageNONE:"NONE", 14 | GameMessagePlayerStatEvent:"PlayerStatEvent", 15 | GameMessagePlayerSpectate:"PlayerSpectate", 16 | GameMessagePlayerInputChange:"PlayerInputChange", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/BallBouncinessOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BallBouncinessOptionDefault = 0 7 | BallBouncinessOptionLow = 1 8 | BallBouncinessOptionHigh = 2 9 | BallBouncinessOptionSuper_High = 3 10 | ) 11 | 12 | var EnumNamesBallBouncinessOption = map[int]string{ 13 | BallBouncinessOptionDefault:"Default", 14 | BallBouncinessOptionLow:"Low", 15 | BallBouncinessOptionHigh:"High", 16 | BallBouncinessOptionSuper_High:"Super_High", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/SeriesLengthOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | SeriesLengthOptionUnlimited = 0 7 | SeriesLengthOptionThree_Games = 1 8 | SeriesLengthOptionFive_Games = 2 9 | SeriesLengthOptionSeven_Games = 3 10 | ) 11 | 12 | var EnumNamesSeriesLengthOption = map[int]string{ 13 | SeriesLengthOptionUnlimited:"Unlimited", 14 | SeriesLengthOptionThree_Games:"Three_Games", 15 | SeriesLengthOptionFive_Games:"Five_Games", 16 | SeriesLengthOptionSeven_Games:"Seven_Games", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/RespawnTimeOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | RespawnTimeOptionThree_Seconds = 0 7 | RespawnTimeOptionTwo_Seconds = 1 8 | RespawnTimeOptionOne_Seconds = 2 9 | RespawnTimeOptionDisable_Goal_Reset = 3 10 | ) 11 | 12 | var EnumNamesRespawnTimeOption = map[int]string{ 13 | RespawnTimeOptionThree_Seconds:"Three_Seconds", 14 | RespawnTimeOptionTwo_Seconds:"Two_Seconds", 15 | RespawnTimeOptionOne_Seconds:"One_Seconds", 16 | RespawnTimeOptionDisable_Goal_Reset:"Disable_Goal_Reset", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /flat/TileState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | TileStateUnknown = 0 7 | /// The default state of the tiles. 8 | TileStateFilled = 1 9 | /// The state when a tile has been damaged. 10 | TileStateDamaged = 2 11 | /// The state of a tile when it is open and a goal can be scored. 12 | TileStateOpen = 3 13 | ) 14 | 15 | var EnumNamesTileState = map[int]string{ 16 | TileStateUnknown:"Unknown", 17 | TileStateFilled:"Filled", 18 | TileStateDamaged:"Damaged", 19 | TileStateOpen:"Open", 20 | } 21 | 22 | -------------------------------------------------------------------------------- /flat/BoostOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | BoostOptionNormal_Boost = 0 7 | BoostOptionUnlimited_Boost = 1 8 | BoostOptionSlow_Recharge = 2 9 | BoostOptionRapid_Recharge = 3 10 | BoostOptionNo_Boost = 4 11 | ) 12 | 13 | var EnumNamesBoostOption = map[int]string{ 14 | BoostOptionNormal_Boost:"Normal_Boost", 15 | BoostOptionUnlimited_Boost:"Unlimited_Boost", 16 | BoostOptionSlow_Recharge:"Slow_Recharge", 17 | BoostOptionRapid_Recharge:"Rapid_Recharge", 18 | BoostOptionNo_Boost:"No_Boost", 19 | } 20 | 21 | -------------------------------------------------------------------------------- /flat/PlayerClass.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | PlayerClassNONE = 0 7 | PlayerClassRLBotPlayer = 1 8 | PlayerClassHumanPlayer = 2 9 | PlayerClassPsyonixBotPlayer = 3 10 | PlayerClassPartyMemberBotPlayer = 4 11 | ) 12 | 13 | var EnumNamesPlayerClass = map[int]string{ 14 | PlayerClassNONE:"NONE", 15 | PlayerClassRLBotPlayer:"RLBotPlayer", 16 | PlayerClassHumanPlayer:"HumanPlayer", 17 | PlayerClassPsyonixBotPlayer:"PsyonixBotPlayer", 18 | PlayerClassPartyMemberBotPlayer:"PartyMemberBotPlayer", 19 | } 20 | 21 | -------------------------------------------------------------------------------- /flat/DemolishOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | DemolishOptionDefault = 0 7 | DemolishOptionDisabled = 1 8 | DemolishOptionFriendly_Fire = 2 9 | DemolishOptionOn_Contact = 3 10 | DemolishOptionOn_Contact_FF = 4 11 | ) 12 | 13 | var EnumNamesDemolishOption = map[int]string{ 14 | DemolishOptionDefault:"Default", 15 | DemolishOptionDisabled:"Disabled", 16 | DemolishOptionFriendly_Fire:"Friendly_Fire", 17 | DemolishOptionOn_Contact:"On_Contact", 18 | DemolishOptionOn_Contact_FF:"On_Contact_FF", 19 | } 20 | 21 | -------------------------------------------------------------------------------- /flat/GameMode.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | GameModeSoccer = 0 7 | GameModeHoops = 1 8 | GameModeDropshot = 2 9 | GameModeHockey = 3 10 | GameModeRumble = 4 11 | GameModeHeatseeker = 5 12 | GameModeGridiron = 6 13 | ) 14 | 15 | var EnumNamesGameMode = map[int]string{ 16 | GameModeSoccer:"Soccer", 17 | GameModeHoops:"Hoops", 18 | GameModeDropshot:"Dropshot", 19 | GameModeHockey:"Hockey", 20 | GameModeRumble:"Rumble", 21 | GameModeHeatseeker:"Heatseeker", 22 | GameModeGridiron:"Gridiron", 23 | } 24 | 25 | -------------------------------------------------------------------------------- /flat/RumbleOption.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | RumbleOptionNo_Rumble = 0 7 | RumbleOptionDefault = 1 8 | RumbleOptionSlow = 2 9 | RumbleOptionCivilized = 3 10 | RumbleOptionDestruction_Derby = 4 11 | RumbleOptionSpring_Loaded = 5 12 | RumbleOptionSpikes_Only = 6 13 | RumbleOptionSpike_Rush = 7 14 | ) 15 | 16 | var EnumNamesRumbleOption = map[int]string{ 17 | RumbleOptionNo_Rumble:"No_Rumble", 18 | RumbleOptionDefault:"Default", 19 | RumbleOptionSlow:"Slow", 20 | RumbleOptionCivilized:"Civilized", 21 | RumbleOptionDestruction_Derby:"Destruction_Derby", 22 | RumbleOptionSpring_Loaded:"Spring_Loaded", 23 | RumbleOptionSpikes_Only:"Spikes_Only", 24 | RumbleOptionSpike_Rush:"Spike_Rush", 25 | } 26 | 27 | -------------------------------------------------------------------------------- /flat/RenderType.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | RenderTypeDrawLine2D = 1 7 | RenderTypeDrawLine3D = 2 8 | RenderTypeDrawLine2D_3D = 3 9 | RenderTypeDrawRect2D = 4 10 | RenderTypeDrawRect3D = 5 11 | RenderTypeDrawString2D = 6 12 | RenderTypeDrawString3D = 7 13 | RenderTypeDrawCenteredRect3D = 8 14 | ) 15 | 16 | var EnumNamesRenderType = map[int]string{ 17 | RenderTypeDrawLine2D:"DrawLine2D", 18 | RenderTypeDrawLine3D:"DrawLine3D", 19 | RenderTypeDrawLine2D_3D:"DrawLine2D_3D", 20 | RenderTypeDrawRect2D:"DrawRect2D", 21 | RenderTypeDrawRect3D:"DrawRect3D", 22 | RenderTypeDrawString2D:"DrawString2D", 23 | RenderTypeDrawString3D:"DrawString3D", 24 | RenderTypeDrawCenteredRect3D:"DrawCenteredRect3D", 25 | } 26 | 27 | -------------------------------------------------------------------------------- /flat/Bool.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Bool struct { 10 | _tab flatbuffers.Struct 11 | } 12 | 13 | func (rcv *Bool) Init(buf []byte, i flatbuffers.UOffsetT) { 14 | rcv._tab.Bytes = buf 15 | rcv._tab.Pos = i 16 | } 17 | 18 | func (rcv *Bool) Table() flatbuffers.Table { 19 | return rcv._tab.Table 20 | } 21 | 22 | func (rcv *Bool) Val() byte { 23 | return rcv._tab.GetByte(rcv._tab.Pos + flatbuffers.UOffsetT(0)) 24 | } 25 | func (rcv *Bool) MutateVal(n byte) bool { 26 | return rcv._tab.MutateByte(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) 27 | } 28 | 29 | func CreateBool(builder *flatbuffers.Builder, val byte) flatbuffers.UOffsetT { 30 | builder.Prep(1, 1) 31 | builder.PrependByte(val) 32 | return builder.Offset() 33 | } 34 | -------------------------------------------------------------------------------- /flat/Float.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Float struct { 10 | _tab flatbuffers.Struct 11 | } 12 | 13 | func (rcv *Float) Init(buf []byte, i flatbuffers.UOffsetT) { 14 | rcv._tab.Bytes = buf 15 | rcv._tab.Pos = i 16 | } 17 | 18 | func (rcv *Float) Table() flatbuffers.Table { 19 | return rcv._tab.Table 20 | } 21 | 22 | func (rcv *Float) Val() float32 { 23 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(0)) 24 | } 25 | func (rcv *Float) MutateVal(n float32) bool { 26 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) 27 | } 28 | 29 | func CreateFloat(builder *flatbuffers.Builder, val float32) flatbuffers.UOffsetT { 30 | builder.Prep(4, 4) 31 | builder.PrependFloat32(val) 32 | return builder.Offset() 33 | } 34 | -------------------------------------------------------------------------------- /flat/ExistingMatchBehavior.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | /// Restart the match if any match settings differ. This is the default because old RLBot always worked this way. 7 | ExistingMatchBehaviorRestart_If_Different = 0 8 | /// Always restart the match, even if config is identical 9 | ExistingMatchBehaviorRestart = 1 10 | /// Never restart an existing match, just try to remove or spawn cars to match the configuration. 11 | /// If we are not in the middle of a match, a match will be started. Handy for LAN matches. 12 | ExistingMatchBehaviorContinue_And_Spawn = 2 13 | ) 14 | 15 | var EnumNamesExistingMatchBehavior = map[int]string{ 16 | ExistingMatchBehaviorRestart_If_Different:"Restart_If_Different", 17 | ExistingMatchBehaviorRestart:"Restart", 18 | ExistingMatchBehaviorContinue_And_Spawn:"Continue_And_Spawn", 19 | } 20 | 21 | -------------------------------------------------------------------------------- /flat/HumanPlayer.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A normal human player 10 | type HumanPlayer struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsHumanPlayer(buf []byte, offset flatbuffers.UOffsetT) *HumanPlayer { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &HumanPlayer{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *HumanPlayer) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *HumanPlayer) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func HumanPlayerStart(builder *flatbuffers.Builder) { 31 | builder.StartObject(0) 32 | } 33 | func HumanPlayerEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 34 | return builder.EndObject() 35 | } 36 | -------------------------------------------------------------------------------- /flat/RLBotPlayer.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A bot controlled by the RLBot framework 10 | type RLBotPlayer struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsRLBotPlayer(buf []byte, offset flatbuffers.UOffsetT) *RLBotPlayer { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &RLBotPlayer{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *RLBotPlayer) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *RLBotPlayer) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func RLBotPlayerStart(builder *flatbuffers.Builder) { 31 | builder.StartObject(0) 32 | } 33 | func RLBotPlayerEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 34 | return builder.EndObject() 35 | } 36 | -------------------------------------------------------------------------------- /flat/PartyMemberBotPlayer.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A player that Rocket League treats as human, e.g. has a dedicated camera and can do training mode, 10 | /// but is actually controlled by a bot. 11 | type PartyMemberBotPlayer struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsPartyMemberBotPlayer(buf []byte, offset flatbuffers.UOffsetT) *PartyMemberBotPlayer { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &PartyMemberBotPlayer{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func (rcv *PartyMemberBotPlayer) Init(buf []byte, i flatbuffers.UOffsetT) { 23 | rcv._tab.Bytes = buf 24 | rcv._tab.Pos = i 25 | } 26 | 27 | func (rcv *PartyMemberBotPlayer) Table() flatbuffers.Table { 28 | return rcv._tab 29 | } 30 | 31 | func PartyMemberBotPlayerStart(builder *flatbuffers.Builder) { 32 | builder.StartObject(0) 33 | } 34 | func PartyMemberBotPlayerEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 35 | return builder.EndObject() 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Trey Moller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /debug.go: -------------------------------------------------------------------------------- 1 | package RLBotGo 2 | 3 | func (socket *RLBot) DebugMessageAdd(text string) error { 4 | 5 | if socket.debugRenderGroup == nil { 6 | socket.debugRenderGroup = &RenderGroup{Id: 1} 7 | } 8 | renderGroup := socket.debugRenderGroup 9 | 10 | var message RenderMessage 11 | message.Color = Color{A: 255, R: 46, G: 255, B: 0} 12 | var start float32 = 20 * float32(len(renderGroup.RenderMessages)) 13 | message.Start = Vector3{X: 0, Y: start, Z: 0} 14 | message.End = Vector3{X: 0, Y: start + 1, Z: 0} 15 | message.ScaleX = 1 16 | message.ScaleY = 1 17 | message.IsFilled = true 18 | message.RenderType = RenderType_DrawString2D 19 | message.Text = text 20 | renderGroup.RenderMessages = append(renderGroup.RenderMessages, message) 21 | 22 | return socket.SendMessage(DataType_RenderGroup, socket.debugRenderGroup) 23 | } 24 | 25 | func (socket *RLBot) DebugMessageClear() error { 26 | if socket.debugRenderGroup == nil { 27 | socket.debugRenderGroup = &RenderGroup{Id: 1} 28 | } 29 | renderGroup := socket.debugRenderGroup 30 | 31 | renderGroup.RenderMessages = []RenderMessage{} 32 | 33 | return socket.SendMessage(DataType_RenderGroup, socket.debugRenderGroup) 34 | } 35 | -------------------------------------------------------------------------------- /flat/SphereShape.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type SphereShape struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsSphereShape(buf []byte, offset flatbuffers.UOffsetT) *SphereShape { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &SphereShape{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *SphereShape) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *SphereShape) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *SphereShape) Diameter() float32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 33 | } 34 | return 0.0 35 | } 36 | 37 | func (rcv *SphereShape) MutateDiameter(n float32) bool { 38 | return rcv._tab.MutateFloat32Slot(4, n) 39 | } 40 | 41 | func SphereShapeStart(builder *flatbuffers.Builder) { 42 | builder.StartObject(1) 43 | } 44 | func SphereShapeAddDiameter(builder *flatbuffers.Builder, diameter float32) { 45 | builder.PrependFloat32Slot(0, diameter, 0.0) 46 | } 47 | func SphereShapeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 48 | return builder.EndObject() 49 | } 50 | -------------------------------------------------------------------------------- /flat/DesiredBoostState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DesiredBoostState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDesiredBoostState(buf []byte, offset flatbuffers.UOffsetT) *DesiredBoostState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DesiredBoostState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DesiredBoostState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DesiredBoostState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DesiredBoostState) RespawnTime(obj *Float) *Float { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := o + rcv._tab.Pos 33 | if obj == nil { 34 | obj = new(Float) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func DesiredBoostStateStart(builder *flatbuffers.Builder) { 43 | builder.StartObject(1) 44 | } 45 | func DesiredBoostStateAddRespawnTime(builder *flatbuffers.Builder, respawnTime flatbuffers.UOffsetT) { 46 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(respawnTime), 0) 47 | } 48 | func DesiredBoostStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 49 | return builder.EndObject() 50 | } 51 | -------------------------------------------------------------------------------- /flat/DropshotTile.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DropshotTile struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDropshotTile(buf []byte, offset flatbuffers.UOffsetT) *DropshotTile { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DropshotTile{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DropshotTile) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DropshotTile) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | /// The amount of damage the tile has sustained. 30 | func (rcv *DropshotTile) TileState() int8 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 34 | } 35 | return 0 36 | } 37 | 38 | /// The amount of damage the tile has sustained. 39 | func (rcv *DropshotTile) MutateTileState(n int8) bool { 40 | return rcv._tab.MutateInt8Slot(4, n) 41 | } 42 | 43 | func DropshotTileStart(builder *flatbuffers.Builder) { 44 | builder.StartObject(1) 45 | } 46 | func DropshotTileAddTileState(builder *flatbuffers.Builder, tileState int8) { 47 | builder.PrependInt8Slot(0, tileState, 0) 48 | } 49 | func DropshotTileEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 50 | return builder.EndObject() 51 | } 52 | -------------------------------------------------------------------------------- /flat/PsyonixBotPlayer.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A psyonix bot, e.g. All Star bot 10 | type PsyonixBotPlayer struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsPsyonixBotPlayer(buf []byte, offset flatbuffers.UOffsetT) *PsyonixBotPlayer { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &PsyonixBotPlayer{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *PsyonixBotPlayer) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *PsyonixBotPlayer) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *PsyonixBotPlayer) BotSkill() float32 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 34 | } 35 | return 0.0 36 | } 37 | 38 | func (rcv *PsyonixBotPlayer) MutateBotSkill(n float32) bool { 39 | return rcv._tab.MutateFloat32Slot(4, n) 40 | } 41 | 42 | func PsyonixBotPlayerStart(builder *flatbuffers.Builder) { 43 | builder.StartObject(1) 44 | } 45 | func PsyonixBotPlayerAddBotSkill(builder *flatbuffers.Builder, botSkill float32) { 46 | builder.PrependFloat32Slot(0, botSkill, 0.0) 47 | } 48 | func PsyonixBotPlayerEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 49 | return builder.EndObject() 50 | } 51 | -------------------------------------------------------------------------------- /flat/DesiredBallState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DesiredBallState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDesiredBallState(buf []byte, offset flatbuffers.UOffsetT) *DesiredBallState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DesiredBallState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DesiredBallState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DesiredBallState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DesiredBallState) Physics(obj *DesiredPhysics) *DesiredPhysics { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 | if obj == nil { 34 | obj = new(DesiredPhysics) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func DesiredBallStateStart(builder *flatbuffers.Builder) { 43 | builder.StartObject(1) 44 | } 45 | func DesiredBallStateAddPhysics(builder *flatbuffers.Builder, physics flatbuffers.UOffsetT) { 46 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(physics), 0) 47 | } 48 | func DesiredBallStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 49 | return builder.EndObject() 50 | } 51 | -------------------------------------------------------------------------------- /flat/ConsoleCommand.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A console command which we will try to execute inside Rocket League. 10 | /// See https://github.com/RLBot/RLBot/wiki/Console-Commands for a list of known commands. 11 | type ConsoleCommand struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsConsoleCommand(buf []byte, offset flatbuffers.UOffsetT) *ConsoleCommand { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &ConsoleCommand{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func (rcv *ConsoleCommand) Init(buf []byte, i flatbuffers.UOffsetT) { 23 | rcv._tab.Bytes = buf 24 | rcv._tab.Pos = i 25 | } 26 | 27 | func (rcv *ConsoleCommand) Table() flatbuffers.Table { 28 | return rcv._tab 29 | } 30 | 31 | func (rcv *ConsoleCommand) Command() []byte { 32 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 33 | if o != 0 { 34 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 35 | } 36 | return nil 37 | } 38 | 39 | func ConsoleCommandStart(builder *flatbuffers.Builder) { 40 | builder.StartObject(1) 41 | } 42 | func ConsoleCommandAddCommand(builder *flatbuffers.Builder, command flatbuffers.UOffsetT) { 43 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(command), 0) 44 | } 45 | func ConsoleCommandEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 46 | return builder.EndObject() 47 | } 48 | -------------------------------------------------------------------------------- /flat/Vector3.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Vector3 struct { 10 | _tab flatbuffers.Struct 11 | } 12 | 13 | func (rcv *Vector3) Init(buf []byte, i flatbuffers.UOffsetT) { 14 | rcv._tab.Bytes = buf 15 | rcv._tab.Pos = i 16 | } 17 | 18 | func (rcv *Vector3) Table() flatbuffers.Table { 19 | return rcv._tab.Table 20 | } 21 | 22 | func (rcv *Vector3) X() float32 { 23 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(0)) 24 | } 25 | func (rcv *Vector3) MutateX(n float32) bool { 26 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) 27 | } 28 | 29 | func (rcv *Vector3) Y() float32 { 30 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(4)) 31 | } 32 | func (rcv *Vector3) MutateY(n float32) bool { 33 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(4), n) 34 | } 35 | 36 | func (rcv *Vector3) Z() float32 { 37 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(8)) 38 | } 39 | func (rcv *Vector3) MutateZ(n float32) bool { 40 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(8), n) 41 | } 42 | 43 | func CreateVector3(builder *flatbuffers.Builder, x float32, y float32, z float32) flatbuffers.UOffsetT { 44 | builder.Prep(4, 12) 45 | builder.PrependFloat32(z) 46 | builder.PrependFloat32(y) 47 | builder.PrependFloat32(x) 48 | return builder.Offset() 49 | } 50 | -------------------------------------------------------------------------------- /flat/BallRigidBodyState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Rigid body state for the ball. 10 | type BallRigidBodyState struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsBallRigidBodyState(buf []byte, offset flatbuffers.UOffsetT) *BallRigidBodyState { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &BallRigidBodyState{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *BallRigidBodyState) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *BallRigidBodyState) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *BallRigidBodyState) State(obj *RigidBodyState) *RigidBodyState { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 34 | if obj == nil { 35 | obj = new(RigidBodyState) 36 | } 37 | obj.Init(rcv._tab.Bytes, x) 38 | return obj 39 | } 40 | return nil 41 | } 42 | 43 | func BallRigidBodyStateStart(builder *flatbuffers.Builder) { 44 | builder.StartObject(1) 45 | } 46 | func BallRigidBodyStateAddState(builder *flatbuffers.Builder, state flatbuffers.UOffsetT) { 47 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(state), 0) 48 | } 49 | func BallRigidBodyStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 50 | return builder.EndObject() 51 | } 52 | -------------------------------------------------------------------------------- /flat/Rotator.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Expresses the rotation state of an object in Euler angles, with values in radians. 10 | type Rotator struct { 11 | _tab flatbuffers.Struct 12 | } 13 | 14 | func (rcv *Rotator) Init(buf []byte, i flatbuffers.UOffsetT) { 15 | rcv._tab.Bytes = buf 16 | rcv._tab.Pos = i 17 | } 18 | 19 | func (rcv *Rotator) Table() flatbuffers.Table { 20 | return rcv._tab.Table 21 | } 22 | 23 | func (rcv *Rotator) Pitch() float32 { 24 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(0)) 25 | } 26 | func (rcv *Rotator) MutatePitch(n float32) bool { 27 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) 28 | } 29 | 30 | func (rcv *Rotator) Yaw() float32 { 31 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(4)) 32 | } 33 | func (rcv *Rotator) MutateYaw(n float32) bool { 34 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(4), n) 35 | } 36 | 37 | func (rcv *Rotator) Roll() float32 { 38 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(8)) 39 | } 40 | func (rcv *Rotator) MutateRoll(n float32) bool { 41 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(8), n) 42 | } 43 | 44 | func CreateRotator(builder *flatbuffers.Builder, pitch float32, yaw float32, roll float32) flatbuffers.UOffsetT { 45 | builder.Prep(4, 12) 46 | builder.PrependFloat32(roll) 47 | builder.PrependFloat32(yaw) 48 | builder.PrependFloat32(pitch) 49 | return builder.Offset() 50 | } 51 | -------------------------------------------------------------------------------- /flat/PlayerSpectate.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Notification when the local player is spectating another player. 10 | type PlayerSpectate struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsPlayerSpectate(buf []byte, offset flatbuffers.UOffsetT) *PlayerSpectate { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &PlayerSpectate{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *PlayerSpectate) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *PlayerSpectate) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | /// index of the player that is being spectated. Will be -1 if not spectating anyone. 31 | func (rcv *PlayerSpectate) PlayerIndex() int32 { 32 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 33 | if o != 0 { 34 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 35 | } 36 | return 0 37 | } 38 | 39 | /// index of the player that is being spectated. Will be -1 if not spectating anyone. 40 | func (rcv *PlayerSpectate) MutatePlayerIndex(n int32) bool { 41 | return rcv._tab.MutateInt32Slot(4, n) 42 | } 43 | 44 | func PlayerSpectateStart(builder *flatbuffers.Builder) { 45 | builder.StartObject(1) 46 | } 47 | func PlayerSpectateAddPlayerIndex(builder *flatbuffers.Builder, playerIndex int32) { 48 | builder.PrependInt32Slot(0, playerIndex, 0) 49 | } 50 | func PlayerSpectateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 51 | return builder.EndObject() 52 | } 53 | -------------------------------------------------------------------------------- /flat/BoostPad.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type BoostPad struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsBoostPad(buf []byte, offset flatbuffers.UOffsetT) *BoostPad { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &BoostPad{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *BoostPad) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *BoostPad) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *BoostPad) Location(obj *Vector3) *Vector3 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := o + rcv._tab.Pos 33 | if obj == nil { 34 | obj = new(Vector3) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *BoostPad) IsFullBoost() byte { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | return rcv._tab.GetByte(o + rcv._tab.Pos) 46 | } 47 | return 0 48 | } 49 | 50 | func (rcv *BoostPad) MutateIsFullBoost(n byte) bool { 51 | return rcv._tab.MutateByteSlot(6, n) 52 | } 53 | 54 | func BoostPadStart(builder *flatbuffers.Builder) { 55 | builder.StartObject(2) 56 | } 57 | func BoostPadAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 58 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(location), 0) 59 | } 60 | func BoostPadAddIsFullBoost(builder *flatbuffers.Builder, isFullBoost byte) { 61 | builder.PrependByteSlot(1, isFullBoost, 0) 62 | } 63 | func BoostPadEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 64 | return builder.EndObject() 65 | } 66 | -------------------------------------------------------------------------------- /flat/TeamInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type TeamInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsTeamInfo(buf []byte, offset flatbuffers.UOffsetT) *TeamInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &TeamInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *TeamInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *TeamInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *TeamInfo) TeamIndex() int32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *TeamInfo) MutateTeamIndex(n int32) bool { 38 | return rcv._tab.MutateInt32Slot(4, n) 39 | } 40 | 41 | /// number of goals scored. 42 | func (rcv *TeamInfo) Score() int32 { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 46 | } 47 | return 0 48 | } 49 | 50 | /// number of goals scored. 51 | func (rcv *TeamInfo) MutateScore(n int32) bool { 52 | return rcv._tab.MutateInt32Slot(6, n) 53 | } 54 | 55 | func TeamInfoStart(builder *flatbuffers.Builder) { 56 | builder.StartObject(2) 57 | } 58 | func TeamInfoAddTeamIndex(builder *flatbuffers.Builder, teamIndex int32) { 59 | builder.PrependInt32Slot(0, teamIndex, 0) 60 | } 61 | func TeamInfoAddScore(builder *flatbuffers.Builder, score int32) { 62 | builder.PrependInt32Slot(1, score, 0) 63 | } 64 | func TeamInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 65 | return builder.EndObject() 66 | } 67 | -------------------------------------------------------------------------------- /flat/QuickChatMessages.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type QuickChatMessages struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsQuickChatMessages(buf []byte, offset flatbuffers.UOffsetT) *QuickChatMessages { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &QuickChatMessages{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *QuickChatMessages) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *QuickChatMessages) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *QuickChatMessages) Messages(obj *QuickChat, j int) bool { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Vector(o) 33 | x += flatbuffers.UOffsetT(j) * 4 34 | x = rcv._tab.Indirect(x) 35 | obj.Init(rcv._tab.Bytes, x) 36 | return true 37 | } 38 | return false 39 | } 40 | 41 | func (rcv *QuickChatMessages) MessagesLength() int { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 43 | if o != 0 { 44 | return rcv._tab.VectorLen(o) 45 | } 46 | return 0 47 | } 48 | 49 | func QuickChatMessagesStart(builder *flatbuffers.Builder) { 50 | builder.StartObject(1) 51 | } 52 | func QuickChatMessagesAddMessages(builder *flatbuffers.Builder, messages flatbuffers.UOffsetT) { 53 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(messages), 0) 54 | } 55 | func QuickChatMessagesStartMessagesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 56 | return builder.StartVector(4, numElems, 4) 57 | } 58 | func QuickChatMessagesEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 59 | return builder.EndObject() 60 | } 61 | -------------------------------------------------------------------------------- /flat/GameMessageWrapper.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type GameMessageWrapper struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsGameMessageWrapper(buf []byte, offset flatbuffers.UOffsetT) *GameMessageWrapper { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &GameMessageWrapper{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *GameMessageWrapper) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *GameMessageWrapper) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *GameMessageWrapper) MessageType() byte { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetByte(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *GameMessageWrapper) MutateMessageType(n byte) bool { 38 | return rcv._tab.MutateByteSlot(4, n) 39 | } 40 | 41 | func (rcv *GameMessageWrapper) Message(obj *flatbuffers.Table) bool { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | rcv._tab.Union(obj, o) 45 | return true 46 | } 47 | return false 48 | } 49 | 50 | func GameMessageWrapperStart(builder *flatbuffers.Builder) { 51 | builder.StartObject(2) 52 | } 53 | func GameMessageWrapperAddMessageType(builder *flatbuffers.Builder, MessageType byte) { 54 | builder.PrependByteSlot(0, MessageType, 0) 55 | } 56 | func GameMessageWrapperAddMessage(builder *flatbuffers.Builder, Message flatbuffers.UOffsetT) { 57 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(Message), 0) 58 | } 59 | func GameMessageWrapperEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 60 | return builder.EndObject() 61 | } 62 | -------------------------------------------------------------------------------- /flat/CylinderShape.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type CylinderShape struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsCylinderShape(buf []byte, offset flatbuffers.UOffsetT) *CylinderShape { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &CylinderShape{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *CylinderShape) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *CylinderShape) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *CylinderShape) Diameter() float32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 33 | } 34 | return 0.0 35 | } 36 | 37 | func (rcv *CylinderShape) MutateDiameter(n float32) bool { 38 | return rcv._tab.MutateFloat32Slot(4, n) 39 | } 40 | 41 | func (rcv *CylinderShape) Height() float32 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 45 | } 46 | return 0.0 47 | } 48 | 49 | func (rcv *CylinderShape) MutateHeight(n float32) bool { 50 | return rcv._tab.MutateFloat32Slot(6, n) 51 | } 52 | 53 | func CylinderShapeStart(builder *flatbuffers.Builder) { 54 | builder.StartObject(2) 55 | } 56 | func CylinderShapeAddDiameter(builder *flatbuffers.Builder, diameter float32) { 57 | builder.PrependFloat32Slot(0, diameter, 0.0) 58 | } 59 | func CylinderShapeAddHeight(builder *flatbuffers.Builder, height float32) { 60 | builder.PrependFloat32Slot(1, height, 0.0) 61 | } 62 | func CylinderShapeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 63 | return builder.EndObject() 64 | } 65 | -------------------------------------------------------------------------------- /flat/TinyBall.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A minimal version of the ball, useful when bandwidth needs to be conserved. 10 | type TinyBall struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsTinyBall(buf []byte, offset flatbuffers.UOffsetT) *TinyBall { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &TinyBall{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *TinyBall) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *TinyBall) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *TinyBall) Location(obj *Vector3) *Vector3 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | x := o + rcv._tab.Pos 34 | if obj == nil { 35 | obj = new(Vector3) 36 | } 37 | obj.Init(rcv._tab.Bytes, x) 38 | return obj 39 | } 40 | return nil 41 | } 42 | 43 | func (rcv *TinyBall) Velocity(obj *Vector3) *Vector3 { 44 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 45 | if o != 0 { 46 | x := o + rcv._tab.Pos 47 | if obj == nil { 48 | obj = new(Vector3) 49 | } 50 | obj.Init(rcv._tab.Bytes, x) 51 | return obj 52 | } 53 | return nil 54 | } 55 | 56 | func TinyBallStart(builder *flatbuffers.Builder) { 57 | builder.StartObject(2) 58 | } 59 | func TinyBallAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 60 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(location), 0) 61 | } 62 | func TinyBallAddVelocity(builder *flatbuffers.Builder, velocity flatbuffers.UOffsetT) { 63 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(velocity), 0) 64 | } 65 | func TinyBallEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 66 | return builder.EndObject() 67 | } 68 | -------------------------------------------------------------------------------- /flat/PlayerInput.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type PlayerInput struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsPlayerInput(buf []byte, offset flatbuffers.UOffsetT) *PlayerInput { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &PlayerInput{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *PlayerInput) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *PlayerInput) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *PlayerInput) PlayerIndex() int32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *PlayerInput) MutatePlayerIndex(n int32) bool { 38 | return rcv._tab.MutateInt32Slot(4, n) 39 | } 40 | 41 | func (rcv *PlayerInput) ControllerState(obj *ControllerState) *ControllerState { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 45 | if obj == nil { 46 | obj = new(ControllerState) 47 | } 48 | obj.Init(rcv._tab.Bytes, x) 49 | return obj 50 | } 51 | return nil 52 | } 53 | 54 | func PlayerInputStart(builder *flatbuffers.Builder) { 55 | builder.StartObject(2) 56 | } 57 | func PlayerInputAddPlayerIndex(builder *flatbuffers.Builder, playerIndex int32) { 58 | builder.PrependInt32Slot(0, playerIndex, 0) 59 | } 60 | func PlayerInputAddControllerState(builder *flatbuffers.Builder, controllerState flatbuffers.UOffsetT) { 61 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(controllerState), 0) 62 | } 63 | func PlayerInputEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 64 | return builder.EndObject() 65 | } 66 | -------------------------------------------------------------------------------- /flat/Quaternion.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Expresses the rotation state of an object. 10 | /// Learn about quaternions here: https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation 11 | /// You can tinker with them here to build an intuition: https://quaternions.online/ 12 | type Quaternion struct { 13 | _tab flatbuffers.Struct 14 | } 15 | 16 | func (rcv *Quaternion) Init(buf []byte, i flatbuffers.UOffsetT) { 17 | rcv._tab.Bytes = buf 18 | rcv._tab.Pos = i 19 | } 20 | 21 | func (rcv *Quaternion) Table() flatbuffers.Table { 22 | return rcv._tab.Table 23 | } 24 | 25 | func (rcv *Quaternion) X() float32 { 26 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(0)) 27 | } 28 | func (rcv *Quaternion) MutateX(n float32) bool { 29 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) 30 | } 31 | 32 | func (rcv *Quaternion) Y() float32 { 33 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(4)) 34 | } 35 | func (rcv *Quaternion) MutateY(n float32) bool { 36 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(4), n) 37 | } 38 | 39 | func (rcv *Quaternion) Z() float32 { 40 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(8)) 41 | } 42 | func (rcv *Quaternion) MutateZ(n float32) bool { 43 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(8), n) 44 | } 45 | 46 | func (rcv *Quaternion) W() float32 { 47 | return rcv._tab.GetFloat32(rcv._tab.Pos + flatbuffers.UOffsetT(12)) 48 | } 49 | func (rcv *Quaternion) MutateW(n float32) bool { 50 | return rcv._tab.MutateFloat32(rcv._tab.Pos+flatbuffers.UOffsetT(12), n) 51 | } 52 | 53 | func CreateQuaternion(builder *flatbuffers.Builder, x float32, y float32, z float32, w float32) flatbuffers.UOffsetT { 54 | builder.Prep(4, 16) 55 | builder.PrependFloat32(w) 56 | builder.PrependFloat32(z) 57 | builder.PrependFloat32(y) 58 | builder.PrependFloat32(x) 59 | return builder.Offset() 60 | } 61 | -------------------------------------------------------------------------------- /flat/BoostPadState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type BoostPadState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsBoostPadState(buf []byte, offset flatbuffers.UOffsetT) *BoostPadState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &BoostPadState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *BoostPadState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *BoostPadState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | /// True if the boost can be picked up 30 | func (rcv *BoostPadState) IsActive() byte { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.GetByte(o + rcv._tab.Pos) 34 | } 35 | return 0 36 | } 37 | 38 | /// True if the boost can be picked up 39 | func (rcv *BoostPadState) MutateIsActive(n byte) bool { 40 | return rcv._tab.MutateByteSlot(4, n) 41 | } 42 | 43 | /// The number of seconds since the boost has been picked up, or 0.0 if the boost is active. 44 | func (rcv *BoostPadState) Timer() float32 { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 48 | } 49 | return 0.0 50 | } 51 | 52 | /// The number of seconds since the boost has been picked up, or 0.0 if the boost is active. 53 | func (rcv *BoostPadState) MutateTimer(n float32) bool { 54 | return rcv._tab.MutateFloat32Slot(6, n) 55 | } 56 | 57 | func BoostPadStateStart(builder *flatbuffers.Builder) { 58 | builder.StartObject(2) 59 | } 60 | func BoostPadStateAddIsActive(builder *flatbuffers.Builder, isActive byte) { 61 | builder.PrependByteSlot(0, isActive, 0) 62 | } 63 | func BoostPadStateAddTimer(builder *flatbuffers.Builder, timer float32) { 64 | builder.PrependFloat32Slot(1, timer, 0.0) 65 | } 66 | func BoostPadStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 67 | return builder.EndObject() 68 | } 69 | -------------------------------------------------------------------------------- /flat/PlayerRigidBodyState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Rigid body state for a player / car in the game. Includes the latest 10 | /// controller input, which is otherwise difficult to correlate with consequences. 11 | type PlayerRigidBodyState struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsPlayerRigidBodyState(buf []byte, offset flatbuffers.UOffsetT) *PlayerRigidBodyState { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &PlayerRigidBodyState{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func (rcv *PlayerRigidBodyState) Init(buf []byte, i flatbuffers.UOffsetT) { 23 | rcv._tab.Bytes = buf 24 | rcv._tab.Pos = i 25 | } 26 | 27 | func (rcv *PlayerRigidBodyState) Table() flatbuffers.Table { 28 | return rcv._tab 29 | } 30 | 31 | func (rcv *PlayerRigidBodyState) State(obj *RigidBodyState) *RigidBodyState { 32 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 33 | if o != 0 { 34 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 35 | if obj == nil { 36 | obj = new(RigidBodyState) 37 | } 38 | obj.Init(rcv._tab.Bytes, x) 39 | return obj 40 | } 41 | return nil 42 | } 43 | 44 | func (rcv *PlayerRigidBodyState) Input(obj *ControllerState) *ControllerState { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 48 | if obj == nil { 49 | obj = new(ControllerState) 50 | } 51 | obj.Init(rcv._tab.Bytes, x) 52 | return obj 53 | } 54 | return nil 55 | } 56 | 57 | func PlayerRigidBodyStateStart(builder *flatbuffers.Builder) { 58 | builder.StartObject(2) 59 | } 60 | func PlayerRigidBodyStateAddState(builder *flatbuffers.Builder, state flatbuffers.UOffsetT) { 61 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(state), 0) 62 | } 63 | func PlayerRigidBodyStateAddInput(builder *flatbuffers.Builder, input flatbuffers.UOffsetT) { 64 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(input), 0) 65 | } 66 | func PlayerRigidBodyStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 67 | return builder.EndObject() 68 | } 69 | -------------------------------------------------------------------------------- /flat/BoxShape.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type BoxShape struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsBoxShape(buf []byte, offset flatbuffers.UOffsetT) *BoxShape { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &BoxShape{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *BoxShape) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *BoxShape) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *BoxShape) Length() float32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 33 | } 34 | return 0.0 35 | } 36 | 37 | func (rcv *BoxShape) MutateLength(n float32) bool { 38 | return rcv._tab.MutateFloat32Slot(4, n) 39 | } 40 | 41 | func (rcv *BoxShape) Width() float32 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 45 | } 46 | return 0.0 47 | } 48 | 49 | func (rcv *BoxShape) MutateWidth(n float32) bool { 50 | return rcv._tab.MutateFloat32Slot(6, n) 51 | } 52 | 53 | func (rcv *BoxShape) Height() float32 { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 55 | if o != 0 { 56 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 57 | } 58 | return 0.0 59 | } 60 | 61 | func (rcv *BoxShape) MutateHeight(n float32) bool { 62 | return rcv._tab.MutateFloat32Slot(8, n) 63 | } 64 | 65 | func BoxShapeStart(builder *flatbuffers.Builder) { 66 | builder.StartObject(3) 67 | } 68 | func BoxShapeAddLength(builder *flatbuffers.Builder, length float32) { 69 | builder.PrependFloat32Slot(0, length, 0.0) 70 | } 71 | func BoxShapeAddWidth(builder *flatbuffers.Builder, width float32) { 72 | builder.PrependFloat32Slot(1, width, 0.0) 73 | } 74 | func BoxShapeAddHeight(builder *flatbuffers.Builder, height float32) { 75 | builder.PrependFloat32Slot(2, height, 0.0) 76 | } 77 | func BoxShapeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 78 | return builder.EndObject() 79 | } 80 | -------------------------------------------------------------------------------- /flat/BallPrediction.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type BallPrediction struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsBallPrediction(buf []byte, offset flatbuffers.UOffsetT) *BallPrediction { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &BallPrediction{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *BallPrediction) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *BallPrediction) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | /// A list of places the ball will be at specific times in the future. 30 | /// It is guaranteed to sorted so that time increases with each slice. 31 | /// It is NOT guaranteed to have a consistent amount of time between slices. 32 | func (rcv *BallPrediction) Slices(obj *PredictionSlice, j int) bool { 33 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 34 | if o != 0 { 35 | x := rcv._tab.Vector(o) 36 | x += flatbuffers.UOffsetT(j) * 4 37 | x = rcv._tab.Indirect(x) 38 | obj.Init(rcv._tab.Bytes, x) 39 | return true 40 | } 41 | return false 42 | } 43 | 44 | func (rcv *BallPrediction) SlicesLength() int { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 46 | if o != 0 { 47 | return rcv._tab.VectorLen(o) 48 | } 49 | return 0 50 | } 51 | 52 | /// A list of places the ball will be at specific times in the future. 53 | /// It is guaranteed to sorted so that time increases with each slice. 54 | /// It is NOT guaranteed to have a consistent amount of time between slices. 55 | func BallPredictionStart(builder *flatbuffers.Builder) { 56 | builder.StartObject(1) 57 | } 58 | func BallPredictionAddSlices(builder *flatbuffers.Builder, slices flatbuffers.UOffsetT) { 59 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(slices), 0) 60 | } 61 | func BallPredictionStartSlicesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 62 | return builder.StartVector(4, numElems, 4) 63 | } 64 | func BallPredictionEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 65 | return builder.EndObject() 66 | } 67 | -------------------------------------------------------------------------------- /flat/Vector3Partial.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Vector3Partial struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsVector3Partial(buf []byte, offset flatbuffers.UOffsetT) *Vector3Partial { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Vector3Partial{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *Vector3Partial) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *Vector3Partial) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *Vector3Partial) X(obj *Float) *Float { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := o + rcv._tab.Pos 33 | if obj == nil { 34 | obj = new(Float) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *Vector3Partial) Y(obj *Float) *Float { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := o + rcv._tab.Pos 46 | if obj == nil { 47 | obj = new(Float) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *Vector3Partial) Z(obj *Float) *Float { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := o + rcv._tab.Pos 59 | if obj == nil { 60 | obj = new(Float) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func Vector3PartialStart(builder *flatbuffers.Builder) { 69 | builder.StartObject(3) 70 | } 71 | func Vector3PartialAddX(builder *flatbuffers.Builder, x flatbuffers.UOffsetT) { 72 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(x), 0) 73 | } 74 | func Vector3PartialAddY(builder *flatbuffers.Builder, y flatbuffers.UOffsetT) { 75 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(y), 0) 76 | } 77 | func Vector3PartialAddZ(builder *flatbuffers.Builder, z flatbuffers.UOffsetT) { 78 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(z), 0) 79 | } 80 | func Vector3PartialEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 81 | return builder.EndObject() 82 | } 83 | -------------------------------------------------------------------------------- /flat/RenderGroup.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type RenderGroup struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsRenderGroup(buf []byte, offset flatbuffers.UOffsetT) *RenderGroup { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &RenderGroup{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *RenderGroup) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *RenderGroup) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *RenderGroup) RenderMessages(obj *RenderMessage, j int) bool { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Vector(o) 33 | x += flatbuffers.UOffsetT(j) * 4 34 | x = rcv._tab.Indirect(x) 35 | obj.Init(rcv._tab.Bytes, x) 36 | return true 37 | } 38 | return false 39 | } 40 | 41 | func (rcv *RenderGroup) RenderMessagesLength() int { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 43 | if o != 0 { 44 | return rcv._tab.VectorLen(o) 45 | } 46 | return 0 47 | } 48 | 49 | /// The id of the render group 50 | func (rcv *RenderGroup) Id() int32 { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 52 | if o != 0 { 53 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 54 | } 55 | return 0 56 | } 57 | 58 | /// The id of the render group 59 | func (rcv *RenderGroup) MutateId(n int32) bool { 60 | return rcv._tab.MutateInt32Slot(6, n) 61 | } 62 | 63 | func RenderGroupStart(builder *flatbuffers.Builder) { 64 | builder.StartObject(2) 65 | } 66 | func RenderGroupAddRenderMessages(builder *flatbuffers.Builder, renderMessages flatbuffers.UOffsetT) { 67 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(renderMessages), 0) 68 | } 69 | func RenderGroupStartRenderMessagesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 70 | return builder.StartVector(4, numElems, 4) 71 | } 72 | func RenderGroupAddId(builder *flatbuffers.Builder, id int32) { 73 | builder.PrependInt32Slot(1, id, 0) 74 | } 75 | func RenderGroupEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 76 | return builder.EndObject() 77 | } 78 | -------------------------------------------------------------------------------- /flat/RotatorPartial.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type RotatorPartial struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsRotatorPartial(buf []byte, offset flatbuffers.UOffsetT) *RotatorPartial { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &RotatorPartial{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *RotatorPartial) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *RotatorPartial) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *RotatorPartial) Pitch(obj *Float) *Float { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := o + rcv._tab.Pos 33 | if obj == nil { 34 | obj = new(Float) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *RotatorPartial) Yaw(obj *Float) *Float { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := o + rcv._tab.Pos 46 | if obj == nil { 47 | obj = new(Float) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *RotatorPartial) Roll(obj *Float) *Float { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := o + rcv._tab.Pos 59 | if obj == nil { 60 | obj = new(Float) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func RotatorPartialStart(builder *flatbuffers.Builder) { 69 | builder.StartObject(3) 70 | } 71 | func RotatorPartialAddPitch(builder *flatbuffers.Builder, pitch flatbuffers.UOffsetT) { 72 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(pitch), 0) 73 | } 74 | func RotatorPartialAddYaw(builder *flatbuffers.Builder, yaw flatbuffers.UOffsetT) { 75 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(yaw), 0) 76 | } 77 | func RotatorPartialAddRoll(builder *flatbuffers.Builder, roll flatbuffers.UOffsetT) { 78 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(roll), 0) 79 | } 80 | func RotatorPartialEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 81 | return builder.EndObject() 82 | } 83 | -------------------------------------------------------------------------------- /flat/PredictionSlice.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type PredictionSlice struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsPredictionSlice(buf []byte, offset flatbuffers.UOffsetT) *PredictionSlice { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &PredictionSlice{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *PredictionSlice) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *PredictionSlice) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | /// The moment in game time that this prediction corresponds to. 30 | /// This corresponds to 'secondsElapsed' in the GameInfo table. 31 | func (rcv *PredictionSlice) GameSeconds() float32 { 32 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 33 | if o != 0 { 34 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 35 | } 36 | return 0.0 37 | } 38 | 39 | /// The moment in game time that this prediction corresponds to. 40 | /// This corresponds to 'secondsElapsed' in the GameInfo table. 41 | func (rcv *PredictionSlice) MutateGameSeconds(n float32) bool { 42 | return rcv._tab.MutateFloat32Slot(4, n) 43 | } 44 | 45 | /// The predicted location and motion of the object. 46 | func (rcv *PredictionSlice) Physics(obj *Physics) *Physics { 47 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 48 | if o != 0 { 49 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 50 | if obj == nil { 51 | obj = new(Physics) 52 | } 53 | obj.Init(rcv._tab.Bytes, x) 54 | return obj 55 | } 56 | return nil 57 | } 58 | 59 | /// The predicted location and motion of the object. 60 | func PredictionSliceStart(builder *flatbuffers.Builder) { 61 | builder.StartObject(2) 62 | } 63 | func PredictionSliceAddGameSeconds(builder *flatbuffers.Builder, gameSeconds float32) { 64 | builder.PrependFloat32Slot(0, gameSeconds, 0.0) 65 | } 66 | func PredictionSliceAddPhysics(builder *flatbuffers.Builder, physics flatbuffers.UOffsetT) { 67 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(physics), 0) 68 | } 69 | func PredictionSliceEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 70 | return builder.EndObject() 71 | } 72 | -------------------------------------------------------------------------------- /flat/TinyPacket.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A minimal version of the game tick packet, useful when bandwidth needs to be conserved. 10 | type TinyPacket struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsTinyPacket(buf []byte, offset flatbuffers.UOffsetT) *TinyPacket { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &TinyPacket{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *TinyPacket) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *TinyPacket) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *TinyPacket) Players(obj *TinyPlayer, j int) bool { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | x := rcv._tab.Vector(o) 34 | x += flatbuffers.UOffsetT(j) * 4 35 | x = rcv._tab.Indirect(x) 36 | obj.Init(rcv._tab.Bytes, x) 37 | return true 38 | } 39 | return false 40 | } 41 | 42 | func (rcv *TinyPacket) PlayersLength() int { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 44 | if o != 0 { 45 | return rcv._tab.VectorLen(o) 46 | } 47 | return 0 48 | } 49 | 50 | func (rcv *TinyPacket) Ball(obj *TinyBall) *TinyBall { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 52 | if o != 0 { 53 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 54 | if obj == nil { 55 | obj = new(TinyBall) 56 | } 57 | obj.Init(rcv._tab.Bytes, x) 58 | return obj 59 | } 60 | return nil 61 | } 62 | 63 | func TinyPacketStart(builder *flatbuffers.Builder) { 64 | builder.StartObject(2) 65 | } 66 | func TinyPacketAddPlayers(builder *flatbuffers.Builder, players flatbuffers.UOffsetT) { 67 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(players), 0) 68 | } 69 | func TinyPacketStartPlayersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 70 | return builder.StartVector(4, numElems, 4) 71 | } 72 | func TinyPacketAddBall(builder *flatbuffers.Builder, ball flatbuffers.UOffsetT) { 73 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(ball), 0) 74 | } 75 | func TinyPacketEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 76 | return builder.EndObject() 77 | } 78 | -------------------------------------------------------------------------------- /flat/RigidBodyTick.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Contains all rigid body state information. 10 | type RigidBodyTick struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsRigidBodyTick(buf []byte, offset flatbuffers.UOffsetT) *RigidBodyTick { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &RigidBodyTick{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *RigidBodyTick) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *RigidBodyTick) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *RigidBodyTick) Ball(obj *BallRigidBodyState) *BallRigidBodyState { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 34 | if obj == nil { 35 | obj = new(BallRigidBodyState) 36 | } 37 | obj.Init(rcv._tab.Bytes, x) 38 | return obj 39 | } 40 | return nil 41 | } 42 | 43 | func (rcv *RigidBodyTick) Players(obj *PlayerRigidBodyState, j int) bool { 44 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 45 | if o != 0 { 46 | x := rcv._tab.Vector(o) 47 | x += flatbuffers.UOffsetT(j) * 4 48 | x = rcv._tab.Indirect(x) 49 | obj.Init(rcv._tab.Bytes, x) 50 | return true 51 | } 52 | return false 53 | } 54 | 55 | func (rcv *RigidBodyTick) PlayersLength() int { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 57 | if o != 0 { 58 | return rcv._tab.VectorLen(o) 59 | } 60 | return 0 61 | } 62 | 63 | func RigidBodyTickStart(builder *flatbuffers.Builder) { 64 | builder.StartObject(2) 65 | } 66 | func RigidBodyTickAddBall(builder *flatbuffers.Builder, ball flatbuffers.UOffsetT) { 67 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(ball), 0) 68 | } 69 | func RigidBodyTickAddPlayers(builder *flatbuffers.Builder, players flatbuffers.UOffsetT) { 70 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(players), 0) 71 | } 72 | func RigidBodyTickStartPlayersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 73 | return builder.StartVector(4, numElems, 4) 74 | } 75 | func RigidBodyTickEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 76 | return builder.EndObject() 77 | } 78 | -------------------------------------------------------------------------------- /flat/Color.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Color struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsColor(buf []byte, offset flatbuffers.UOffsetT) *Color { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Color{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *Color) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *Color) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *Color) A() byte { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetByte(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *Color) MutateA(n byte) bool { 38 | return rcv._tab.MutateByteSlot(4, n) 39 | } 40 | 41 | func (rcv *Color) R() byte { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetByte(o + rcv._tab.Pos) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *Color) MutateR(n byte) bool { 50 | return rcv._tab.MutateByteSlot(6, n) 51 | } 52 | 53 | func (rcv *Color) G() byte { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 55 | if o != 0 { 56 | return rcv._tab.GetByte(o + rcv._tab.Pos) 57 | } 58 | return 0 59 | } 60 | 61 | func (rcv *Color) MutateG(n byte) bool { 62 | return rcv._tab.MutateByteSlot(8, n) 63 | } 64 | 65 | func (rcv *Color) B() byte { 66 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 67 | if o != 0 { 68 | return rcv._tab.GetByte(o + rcv._tab.Pos) 69 | } 70 | return 0 71 | } 72 | 73 | func (rcv *Color) MutateB(n byte) bool { 74 | return rcv._tab.MutateByteSlot(10, n) 75 | } 76 | 77 | func ColorStart(builder *flatbuffers.Builder) { 78 | builder.StartObject(4) 79 | } 80 | func ColorAddA(builder *flatbuffers.Builder, a byte) { 81 | builder.PrependByteSlot(0, a, 0) 82 | } 83 | func ColorAddR(builder *flatbuffers.Builder, r byte) { 84 | builder.PrependByteSlot(1, r, 0) 85 | } 86 | func ColorAddG(builder *flatbuffers.Builder, g byte) { 87 | builder.PrependByteSlot(2, g, 0) 88 | } 89 | func ColorAddB(builder *flatbuffers.Builder, b byte) { 90 | builder.PrependByteSlot(3, b, 0) 91 | } 92 | func ColorEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 93 | return builder.EndObject() 94 | } 95 | -------------------------------------------------------------------------------- /flat/DropShotBallInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DropShotBallInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDropShotBallInfo(buf []byte, offset flatbuffers.UOffsetT) *DropShotBallInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DropShotBallInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DropShotBallInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DropShotBallInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DropShotBallInfo) AbsorbedForce() float32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 33 | } 34 | return 0.0 35 | } 36 | 37 | func (rcv *DropShotBallInfo) MutateAbsorbedForce(n float32) bool { 38 | return rcv._tab.MutateFloat32Slot(4, n) 39 | } 40 | 41 | func (rcv *DropShotBallInfo) DamageIndex() int32 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *DropShotBallInfo) MutateDamageIndex(n int32) bool { 50 | return rcv._tab.MutateInt32Slot(6, n) 51 | } 52 | 53 | func (rcv *DropShotBallInfo) ForceAccumRecent() float32 { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 55 | if o != 0 { 56 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 57 | } 58 | return 0.0 59 | } 60 | 61 | func (rcv *DropShotBallInfo) MutateForceAccumRecent(n float32) bool { 62 | return rcv._tab.MutateFloat32Slot(8, n) 63 | } 64 | 65 | func DropShotBallInfoStart(builder *flatbuffers.Builder) { 66 | builder.StartObject(3) 67 | } 68 | func DropShotBallInfoAddAbsorbedForce(builder *flatbuffers.Builder, absorbedForce float32) { 69 | builder.PrependFloat32Slot(0, absorbedForce, 0.0) 70 | } 71 | func DropShotBallInfoAddDamageIndex(builder *flatbuffers.Builder, damageIndex int32) { 72 | builder.PrependInt32Slot(1, damageIndex, 0) 73 | } 74 | func DropShotBallInfoAddForceAccumRecent(builder *flatbuffers.Builder, forceAccumRecent float32) { 75 | builder.PrependFloat32Slot(2, forceAccumRecent, 0.0) 76 | } 77 | func DropShotBallInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 78 | return builder.EndObject() 79 | } 80 | -------------------------------------------------------------------------------- /flat/FieldInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type FieldInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsFieldInfo(buf []byte, offset flatbuffers.UOffsetT) *FieldInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &FieldInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *FieldInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *FieldInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *FieldInfo) BoostPads(obj *BoostPad, j int) bool { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Vector(o) 33 | x += flatbuffers.UOffsetT(j) * 4 34 | x = rcv._tab.Indirect(x) 35 | obj.Init(rcv._tab.Bytes, x) 36 | return true 37 | } 38 | return false 39 | } 40 | 41 | func (rcv *FieldInfo) BoostPadsLength() int { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 43 | if o != 0 { 44 | return rcv._tab.VectorLen(o) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *FieldInfo) Goals(obj *GoalInfo, j int) bool { 50 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 51 | if o != 0 { 52 | x := rcv._tab.Vector(o) 53 | x += flatbuffers.UOffsetT(j) * 4 54 | x = rcv._tab.Indirect(x) 55 | obj.Init(rcv._tab.Bytes, x) 56 | return true 57 | } 58 | return false 59 | } 60 | 61 | func (rcv *FieldInfo) GoalsLength() int { 62 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 63 | if o != 0 { 64 | return rcv._tab.VectorLen(o) 65 | } 66 | return 0 67 | } 68 | 69 | func FieldInfoStart(builder *flatbuffers.Builder) { 70 | builder.StartObject(2) 71 | } 72 | func FieldInfoAddBoostPads(builder *flatbuffers.Builder, boostPads flatbuffers.UOffsetT) { 73 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(boostPads), 0) 74 | } 75 | func FieldInfoStartBoostPadsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 76 | return builder.StartVector(4, numElems, 4) 77 | } 78 | func FieldInfoAddGoals(builder *flatbuffers.Builder, goals flatbuffers.UOffsetT) { 79 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(goals), 0) 80 | } 81 | func FieldInfoStartGoalsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 82 | return builder.StartVector(4, numElems, 4) 83 | } 84 | func FieldInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 85 | return builder.EndObject() 86 | } 87 | -------------------------------------------------------------------------------- /flat/PlayerStatEvent.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Notification that a player triggers some in-game event, such as: 10 | /// Win, Loss, TimePlayed; 11 | /// Shot, Assist, Center, Clear, PoolShot; 12 | /// Goal, AerialGoal, BicycleGoal, BulletGoal, BackwardsGoal, LongGoal, OvertimeGoal, TurtleGoal; 13 | /// AerialHit, BicycleHit, BulletHit, /*BackwardsHit,*/ JuggleHit, FirstTouch, BallHit; 14 | /// Save, EpicSave, FreezeSave; 15 | /// HatTrick, Savior, Playmaker, MVP; 16 | /// FastestGoal, SlowestGoal, FurthestGoal, OwnGoal; 17 | /// MostBallTouches, FewestBallTouches, MostBoostPickups, FewestBoostPickups, BoostPickups; 18 | /// CarTouches, Demolition, Demolish; 19 | /// LowFive, HighFive; 20 | type PlayerStatEvent struct { 21 | _tab flatbuffers.Table 22 | } 23 | 24 | func GetRootAsPlayerStatEvent(buf []byte, offset flatbuffers.UOffsetT) *PlayerStatEvent { 25 | n := flatbuffers.GetUOffsetT(buf[offset:]) 26 | x := &PlayerStatEvent{} 27 | x.Init(buf, n+offset) 28 | return x 29 | } 30 | 31 | func (rcv *PlayerStatEvent) Init(buf []byte, i flatbuffers.UOffsetT) { 32 | rcv._tab.Bytes = buf 33 | rcv._tab.Pos = i 34 | } 35 | 36 | func (rcv *PlayerStatEvent) Table() flatbuffers.Table { 37 | return rcv._tab 38 | } 39 | 40 | /// index of the player associated with the event 41 | func (rcv *PlayerStatEvent) PlayerIndex() int32 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 43 | if o != 0 { 44 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 45 | } 46 | return 0 47 | } 48 | 49 | /// index of the player associated with the event 50 | func (rcv *PlayerStatEvent) MutatePlayerIndex(n int32) bool { 51 | return rcv._tab.MutateInt32Slot(4, n) 52 | } 53 | 54 | /// Event type 55 | func (rcv *PlayerStatEvent) StatType() []byte { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 57 | if o != 0 { 58 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 59 | } 60 | return nil 61 | } 62 | 63 | /// Event type 64 | func PlayerStatEventStart(builder *flatbuffers.Builder) { 65 | builder.StartObject(2) 66 | } 67 | func PlayerStatEventAddPlayerIndex(builder *flatbuffers.Builder, playerIndex int32) { 68 | builder.PrependInt32Slot(0, playerIndex, 0) 69 | } 70 | func PlayerStatEventAddStatType(builder *flatbuffers.Builder, statType flatbuffers.UOffsetT) { 71 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(statType), 0) 72 | } 73 | func PlayerStatEventEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 74 | return builder.EndObject() 75 | } 76 | -------------------------------------------------------------------------------- /flat/ReadyMessage.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Sent when connecting to RLBot to indicate what type of messages are desired. 10 | /// This could be sent by a bot, or a bot manager governing several bots, an 11 | /// overlay, or any other utility that connects to the RLBot process. 12 | type ReadyMessage struct { 13 | _tab flatbuffers.Table 14 | } 15 | 16 | func GetRootAsReadyMessage(buf []byte, offset flatbuffers.UOffsetT) *ReadyMessage { 17 | n := flatbuffers.GetUOffsetT(buf[offset:]) 18 | x := &ReadyMessage{} 19 | x.Init(buf, n+offset) 20 | return x 21 | } 22 | 23 | func (rcv *ReadyMessage) Init(buf []byte, i flatbuffers.UOffsetT) { 24 | rcv._tab.Bytes = buf 25 | rcv._tab.Pos = i 26 | } 27 | 28 | func (rcv *ReadyMessage) Table() flatbuffers.Table { 29 | return rcv._tab 30 | } 31 | 32 | func (rcv *ReadyMessage) WantsBallPredictions() byte { 33 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 34 | if o != 0 { 35 | return rcv._tab.GetByte(o + rcv._tab.Pos) 36 | } 37 | return 0 38 | } 39 | 40 | func (rcv *ReadyMessage) MutateWantsBallPredictions(n byte) bool { 41 | return rcv._tab.MutateByteSlot(4, n) 42 | } 43 | 44 | func (rcv *ReadyMessage) WantsQuickChat() byte { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | return rcv._tab.GetByte(o + rcv._tab.Pos) 48 | } 49 | return 0 50 | } 51 | 52 | func (rcv *ReadyMessage) MutateWantsQuickChat(n byte) bool { 53 | return rcv._tab.MutateByteSlot(6, n) 54 | } 55 | 56 | func (rcv *ReadyMessage) WantsGameMessages() byte { 57 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 58 | if o != 0 { 59 | return rcv._tab.GetByte(o + rcv._tab.Pos) 60 | } 61 | return 0 62 | } 63 | 64 | func (rcv *ReadyMessage) MutateWantsGameMessages(n byte) bool { 65 | return rcv._tab.MutateByteSlot(8, n) 66 | } 67 | 68 | func ReadyMessageStart(builder *flatbuffers.Builder) { 69 | builder.StartObject(3) 70 | } 71 | func ReadyMessageAddWantsBallPredictions(builder *flatbuffers.Builder, wantsBallPredictions byte) { 72 | builder.PrependByteSlot(0, wantsBallPredictions, 0) 73 | } 74 | func ReadyMessageAddWantsQuickChat(builder *flatbuffers.Builder, wantsQuickChat byte) { 75 | builder.PrependByteSlot(1, wantsQuickChat, 0) 76 | } 77 | func ReadyMessageAddWantsGameMessages(builder *flatbuffers.Builder, wantsGameMessages byte) { 78 | builder.PrependByteSlot(2, wantsGameMessages, 0) 79 | } 80 | func ReadyMessageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 81 | return builder.EndObject() 82 | } 83 | -------------------------------------------------------------------------------- /flat/Physics.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Physics struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsPhysics(buf []byte, offset flatbuffers.UOffsetT) *Physics { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Physics{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *Physics) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *Physics) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *Physics) Location(obj *Vector3) *Vector3 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := o + rcv._tab.Pos 33 | if obj == nil { 34 | obj = new(Vector3) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *Physics) Rotation(obj *Rotator) *Rotator { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := o + rcv._tab.Pos 46 | if obj == nil { 47 | obj = new(Rotator) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *Physics) Velocity(obj *Vector3) *Vector3 { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := o + rcv._tab.Pos 59 | if obj == nil { 60 | obj = new(Vector3) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func (rcv *Physics) AngularVelocity(obj *Vector3) *Vector3 { 69 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 70 | if o != 0 { 71 | x := o + rcv._tab.Pos 72 | if obj == nil { 73 | obj = new(Vector3) 74 | } 75 | obj.Init(rcv._tab.Bytes, x) 76 | return obj 77 | } 78 | return nil 79 | } 80 | 81 | func PhysicsStart(builder *flatbuffers.Builder) { 82 | builder.StartObject(4) 83 | } 84 | func PhysicsAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 85 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(location), 0) 86 | } 87 | func PhysicsAddRotation(builder *flatbuffers.Builder, rotation flatbuffers.UOffsetT) { 88 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(rotation), 0) 89 | } 90 | func PhysicsAddVelocity(builder *flatbuffers.Builder, velocity flatbuffers.UOffsetT) { 91 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(velocity), 0) 92 | } 93 | func PhysicsAddAngularVelocity(builder *flatbuffers.Builder, angularVelocity flatbuffers.UOffsetT) { 94 | builder.PrependStructSlot(3, flatbuffers.UOffsetT(angularVelocity), 0) 95 | } 96 | func PhysicsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 97 | return builder.EndObject() 98 | } 99 | -------------------------------------------------------------------------------- /flat/DesiredCarState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DesiredCarState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDesiredCarState(buf []byte, offset flatbuffers.UOffsetT) *DesiredCarState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DesiredCarState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DesiredCarState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DesiredCarState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DesiredCarState) Physics(obj *DesiredPhysics) *DesiredPhysics { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 | if obj == nil { 34 | obj = new(DesiredPhysics) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *DesiredCarState) BoostAmount(obj *Float) *Float { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := o + rcv._tab.Pos 46 | if obj == nil { 47 | obj = new(Float) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *DesiredCarState) Jumped(obj *Bool) *Bool { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := o + rcv._tab.Pos 59 | if obj == nil { 60 | obj = new(Bool) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func (rcv *DesiredCarState) DoubleJumped(obj *Bool) *Bool { 69 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 70 | if o != 0 { 71 | x := o + rcv._tab.Pos 72 | if obj == nil { 73 | obj = new(Bool) 74 | } 75 | obj.Init(rcv._tab.Bytes, x) 76 | return obj 77 | } 78 | return nil 79 | } 80 | 81 | func DesiredCarStateStart(builder *flatbuffers.Builder) { 82 | builder.StartObject(4) 83 | } 84 | func DesiredCarStateAddPhysics(builder *flatbuffers.Builder, physics flatbuffers.UOffsetT) { 85 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(physics), 0) 86 | } 87 | func DesiredCarStateAddBoostAmount(builder *flatbuffers.Builder, boostAmount flatbuffers.UOffsetT) { 88 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(boostAmount), 0) 89 | } 90 | func DesiredCarStateAddJumped(builder *flatbuffers.Builder, jumped flatbuffers.UOffsetT) { 91 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(jumped), 0) 92 | } 93 | func DesiredCarStateAddDoubleJumped(builder *flatbuffers.Builder, doubleJumped flatbuffers.UOffsetT) { 94 | builder.PrependStructSlot(3, flatbuffers.UOffsetT(doubleJumped), 0) 95 | } 96 | func DesiredCarStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 97 | return builder.EndObject() 98 | } 99 | -------------------------------------------------------------------------------- /flat/MessagePacket.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// We have some very small messages that are only a few bytes but potentially sent at high frequency. 10 | /// Bundle them into a packet to reduce the overhead of sending data over TCP. 11 | type MessagePacket struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsMessagePacket(buf []byte, offset flatbuffers.UOffsetT) *MessagePacket { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &MessagePacket{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func (rcv *MessagePacket) Init(buf []byte, i flatbuffers.UOffsetT) { 23 | rcv._tab.Bytes = buf 24 | rcv._tab.Pos = i 25 | } 26 | 27 | func (rcv *MessagePacket) Table() flatbuffers.Table { 28 | return rcv._tab 29 | } 30 | 31 | func (rcv *MessagePacket) Messages(obj *GameMessageWrapper, j int) bool { 32 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 33 | if o != 0 { 34 | x := rcv._tab.Vector(o) 35 | x += flatbuffers.UOffsetT(j) * 4 36 | x = rcv._tab.Indirect(x) 37 | obj.Init(rcv._tab.Bytes, x) 38 | return true 39 | } 40 | return false 41 | } 42 | 43 | func (rcv *MessagePacket) MessagesLength() int { 44 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 45 | if o != 0 { 46 | return rcv._tab.VectorLen(o) 47 | } 48 | return 0 49 | } 50 | 51 | func (rcv *MessagePacket) GameSeconds() float32 { 52 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 53 | if o != 0 { 54 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 55 | } 56 | return 0.0 57 | } 58 | 59 | func (rcv *MessagePacket) MutateGameSeconds(n float32) bool { 60 | return rcv._tab.MutateFloat32Slot(6, n) 61 | } 62 | 63 | func (rcv *MessagePacket) FrameNum() int32 { 64 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 65 | if o != 0 { 66 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 67 | } 68 | return 0 69 | } 70 | 71 | func (rcv *MessagePacket) MutateFrameNum(n int32) bool { 72 | return rcv._tab.MutateInt32Slot(8, n) 73 | } 74 | 75 | func MessagePacketStart(builder *flatbuffers.Builder) { 76 | builder.StartObject(3) 77 | } 78 | func MessagePacketAddMessages(builder *flatbuffers.Builder, messages flatbuffers.UOffsetT) { 79 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(messages), 0) 80 | } 81 | func MessagePacketStartMessagesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 82 | return builder.StartVector(4, numElems, 4) 83 | } 84 | func MessagePacketAddGameSeconds(builder *flatbuffers.Builder, gameSeconds float32) { 85 | builder.PrependFloat32Slot(1, gameSeconds, 0.0) 86 | } 87 | func MessagePacketAddFrameNum(builder *flatbuffers.Builder, frameNum int32) { 88 | builder.PrependInt32Slot(2, frameNum, 0) 89 | } 90 | func MessagePacketEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 91 | return builder.EndObject() 92 | } 93 | -------------------------------------------------------------------------------- /flat/DesiredGameInfoState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DesiredGameInfoState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDesiredGameInfoState(buf []byte, offset flatbuffers.UOffsetT) *DesiredGameInfoState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DesiredGameInfoState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DesiredGameInfoState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DesiredGameInfoState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DesiredGameInfoState) WorldGravityZ(obj *Float) *Float { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := o + rcv._tab.Pos 33 | if obj == nil { 34 | obj = new(Float) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *DesiredGameInfoState) GameSpeed(obj *Float) *Float { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := o + rcv._tab.Pos 46 | if obj == nil { 47 | obj = new(Float) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *DesiredGameInfoState) Paused(obj *Bool) *Bool { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := o + rcv._tab.Pos 59 | if obj == nil { 60 | obj = new(Bool) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func (rcv *DesiredGameInfoState) EndMatch(obj *Bool) *Bool { 69 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 70 | if o != 0 { 71 | x := o + rcv._tab.Pos 72 | if obj == nil { 73 | obj = new(Bool) 74 | } 75 | obj.Init(rcv._tab.Bytes, x) 76 | return obj 77 | } 78 | return nil 79 | } 80 | 81 | func DesiredGameInfoStateStart(builder *flatbuffers.Builder) { 82 | builder.StartObject(4) 83 | } 84 | func DesiredGameInfoStateAddWorldGravityZ(builder *flatbuffers.Builder, worldGravityZ flatbuffers.UOffsetT) { 85 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(worldGravityZ), 0) 86 | } 87 | func DesiredGameInfoStateAddGameSpeed(builder *flatbuffers.Builder, gameSpeed flatbuffers.UOffsetT) { 88 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(gameSpeed), 0) 89 | } 90 | func DesiredGameInfoStateAddPaused(builder *flatbuffers.Builder, paused flatbuffers.UOffsetT) { 91 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(paused), 0) 92 | } 93 | func DesiredGameInfoStateAddEndMatch(builder *flatbuffers.Builder, endMatch flatbuffers.UOffsetT) { 94 | builder.PrependStructSlot(3, flatbuffers.UOffsetT(endMatch), 0) 95 | } 96 | func DesiredGameInfoStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 97 | return builder.EndObject() 98 | } 99 | -------------------------------------------------------------------------------- /flat/DesiredPhysics.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DesiredPhysics struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDesiredPhysics(buf []byte, offset flatbuffers.UOffsetT) *DesiredPhysics { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DesiredPhysics{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DesiredPhysics) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DesiredPhysics) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DesiredPhysics) Location(obj *Vector3Partial) *Vector3Partial { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 | if obj == nil { 34 | obj = new(Vector3Partial) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *DesiredPhysics) Rotation(obj *RotatorPartial) *RotatorPartial { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 46 | if obj == nil { 47 | obj = new(RotatorPartial) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *DesiredPhysics) Velocity(obj *Vector3Partial) *Vector3Partial { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 59 | if obj == nil { 60 | obj = new(Vector3Partial) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func (rcv *DesiredPhysics) AngularVelocity(obj *Vector3Partial) *Vector3Partial { 69 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 70 | if o != 0 { 71 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 72 | if obj == nil { 73 | obj = new(Vector3Partial) 74 | } 75 | obj.Init(rcv._tab.Bytes, x) 76 | return obj 77 | } 78 | return nil 79 | } 80 | 81 | func DesiredPhysicsStart(builder *flatbuffers.Builder) { 82 | builder.StartObject(4) 83 | } 84 | func DesiredPhysicsAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 85 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(location), 0) 86 | } 87 | func DesiredPhysicsAddRotation(builder *flatbuffers.Builder, rotation flatbuffers.UOffsetT) { 88 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(rotation), 0) 89 | } 90 | func DesiredPhysicsAddVelocity(builder *flatbuffers.Builder, velocity flatbuffers.UOffsetT) { 91 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(velocity), 0) 92 | } 93 | func DesiredPhysicsAddAngularVelocity(builder *flatbuffers.Builder, angularVelocity flatbuffers.UOffsetT) { 94 | builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(angularVelocity), 0) 95 | } 96 | func DesiredPhysicsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 97 | return builder.EndObject() 98 | } 99 | -------------------------------------------------------------------------------- /flat/PlayerInputChange.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Rocket League is notifying us that some player has moved their controller. This is an *output* 10 | type PlayerInputChange struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsPlayerInputChange(buf []byte, offset flatbuffers.UOffsetT) *PlayerInputChange { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &PlayerInputChange{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *PlayerInputChange) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *PlayerInputChange) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *PlayerInputChange) PlayerIndex() int32 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 34 | } 35 | return 0 36 | } 37 | 38 | func (rcv *PlayerInputChange) MutatePlayerIndex(n int32) bool { 39 | return rcv._tab.MutateInt32Slot(4, n) 40 | } 41 | 42 | func (rcv *PlayerInputChange) ControllerState(obj *ControllerState) *ControllerState { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 46 | if obj == nil { 47 | obj = new(ControllerState) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *PlayerInputChange) DodgeForward() float32 { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 59 | } 60 | return 0.0 61 | } 62 | 63 | func (rcv *PlayerInputChange) MutateDodgeForward(n float32) bool { 64 | return rcv._tab.MutateFloat32Slot(8, n) 65 | } 66 | 67 | func (rcv *PlayerInputChange) DodgeRight() float32 { 68 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 69 | if o != 0 { 70 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 71 | } 72 | return 0.0 73 | } 74 | 75 | func (rcv *PlayerInputChange) MutateDodgeRight(n float32) bool { 76 | return rcv._tab.MutateFloat32Slot(10, n) 77 | } 78 | 79 | func PlayerInputChangeStart(builder *flatbuffers.Builder) { 80 | builder.StartObject(4) 81 | } 82 | func PlayerInputChangeAddPlayerIndex(builder *flatbuffers.Builder, playerIndex int32) { 83 | builder.PrependInt32Slot(0, playerIndex, 0) 84 | } 85 | func PlayerInputChangeAddControllerState(builder *flatbuffers.Builder, controllerState flatbuffers.UOffsetT) { 86 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(controllerState), 0) 87 | } 88 | func PlayerInputChangeAddDodgeForward(builder *flatbuffers.Builder, dodgeForward float32) { 89 | builder.PrependFloat32Slot(2, dodgeForward, 0.0) 90 | } 91 | func PlayerInputChangeAddDodgeRight(builder *flatbuffers.Builder, dodgeRight float32) { 92 | builder.PrependFloat32Slot(3, dodgeRight, 0.0) 93 | } 94 | func PlayerInputChangeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 95 | return builder.EndObject() 96 | } 97 | -------------------------------------------------------------------------------- /flat/GoalInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type GoalInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsGoalInfo(buf []byte, offset flatbuffers.UOffsetT) *GoalInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &GoalInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *GoalInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *GoalInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *GoalInfo) TeamNum() int32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *GoalInfo) MutateTeamNum(n int32) bool { 38 | return rcv._tab.MutateInt32Slot(4, n) 39 | } 40 | 41 | func (rcv *GoalInfo) Location(obj *Vector3) *Vector3 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | x := o + rcv._tab.Pos 45 | if obj == nil { 46 | obj = new(Vector3) 47 | } 48 | obj.Init(rcv._tab.Bytes, x) 49 | return obj 50 | } 51 | return nil 52 | } 53 | 54 | func (rcv *GoalInfo) Direction(obj *Vector3) *Vector3 { 55 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 56 | if o != 0 { 57 | x := o + rcv._tab.Pos 58 | if obj == nil { 59 | obj = new(Vector3) 60 | } 61 | obj.Init(rcv._tab.Bytes, x) 62 | return obj 63 | } 64 | return nil 65 | } 66 | 67 | func (rcv *GoalInfo) Width() float32 { 68 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 69 | if o != 0 { 70 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 71 | } 72 | return 0.0 73 | } 74 | 75 | func (rcv *GoalInfo) MutateWidth(n float32) bool { 76 | return rcv._tab.MutateFloat32Slot(10, n) 77 | } 78 | 79 | func (rcv *GoalInfo) Height() float32 { 80 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 81 | if o != 0 { 82 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 83 | } 84 | return 0.0 85 | } 86 | 87 | func (rcv *GoalInfo) MutateHeight(n float32) bool { 88 | return rcv._tab.MutateFloat32Slot(12, n) 89 | } 90 | 91 | func GoalInfoStart(builder *flatbuffers.Builder) { 92 | builder.StartObject(5) 93 | } 94 | func GoalInfoAddTeamNum(builder *flatbuffers.Builder, teamNum int32) { 95 | builder.PrependInt32Slot(0, teamNum, 0) 96 | } 97 | func GoalInfoAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 98 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(location), 0) 99 | } 100 | func GoalInfoAddDirection(builder *flatbuffers.Builder, direction flatbuffers.UOffsetT) { 101 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(direction), 0) 102 | } 103 | func GoalInfoAddWidth(builder *flatbuffers.Builder, width float32) { 104 | builder.PrependFloat32Slot(3, width, 0.0) 105 | } 106 | func GoalInfoAddHeight(builder *flatbuffers.Builder, height float32) { 107 | builder.PrependFloat32Slot(4, height, 0.0) 108 | } 109 | func GoalInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 110 | return builder.EndObject() 111 | } 112 | -------------------------------------------------------------------------------- /flat/BallInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type BallInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsBallInfo(buf []byte, offset flatbuffers.UOffsetT) *BallInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &BallInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *BallInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *BallInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *BallInfo) Physics(obj *Physics) *Physics { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 | if obj == nil { 34 | obj = new(Physics) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *BallInfo) LatestTouch(obj *Touch) *Touch { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 46 | if obj == nil { 47 | obj = new(Touch) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *BallInfo) DropShotInfo(obj *DropShotBallInfo) *DropShotBallInfo { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 59 | if obj == nil { 60 | obj = new(DropShotBallInfo) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | func (rcv *BallInfo) ShapeType() byte { 69 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 70 | if o != 0 { 71 | return rcv._tab.GetByte(o + rcv._tab.Pos) 72 | } 73 | return 0 74 | } 75 | 76 | func (rcv *BallInfo) MutateShapeType(n byte) bool { 77 | return rcv._tab.MutateByteSlot(10, n) 78 | } 79 | 80 | func (rcv *BallInfo) Shape(obj *flatbuffers.Table) bool { 81 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 82 | if o != 0 { 83 | rcv._tab.Union(obj, o) 84 | return true 85 | } 86 | return false 87 | } 88 | 89 | func BallInfoStart(builder *flatbuffers.Builder) { 90 | builder.StartObject(5) 91 | } 92 | func BallInfoAddPhysics(builder *flatbuffers.Builder, physics flatbuffers.UOffsetT) { 93 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(physics), 0) 94 | } 95 | func BallInfoAddLatestTouch(builder *flatbuffers.Builder, latestTouch flatbuffers.UOffsetT) { 96 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(latestTouch), 0) 97 | } 98 | func BallInfoAddDropShotInfo(builder *flatbuffers.Builder, dropShotInfo flatbuffers.UOffsetT) { 99 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(dropShotInfo), 0) 100 | } 101 | func BallInfoAddShapeType(builder *flatbuffers.Builder, shapeType byte) { 102 | builder.PrependByteSlot(3, shapeType, 0) 103 | } 104 | func BallInfoAddShape(builder *flatbuffers.Builder, shape flatbuffers.UOffsetT) { 105 | builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(shape), 0) 106 | } 107 | func BallInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 108 | return builder.EndObject() 109 | } 110 | -------------------------------------------------------------------------------- /flat/GameMap.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | GameMapDFHStadium = 0 7 | GameMapMannfield = 1 8 | GameMapChampionsField = 2 9 | GameMapUrbanCentral = 3 10 | GameMapBeckwithPark = 4 11 | GameMapUtopiaColiseum = 5 12 | GameMapWasteland = 6 13 | GameMapNeoTokyo = 7 14 | GameMapAquaDome = 8 15 | GameMapStarbaseArc = 9 16 | GameMapFarmstead = 10 17 | GameMapSaltyShores = 11 18 | GameMapDFHStadium_Stormy = 12 19 | GameMapDFHStadium_Day = 13 20 | GameMapMannfield_Stormy = 14 21 | GameMapMannfield_Night = 15 22 | GameMapChampionsField_Day = 16 23 | GameMapBeckwithPark_Stormy = 17 24 | GameMapBeckwithPark_Midnight = 18 25 | GameMapUrbanCentral_Night = 19 26 | GameMapUrbanCentral_Dawn = 20 27 | GameMapUtopiaColiseum_Dusk = 21 28 | GameMapDFHStadium_Snowy = 22 29 | GameMapMannfield_Snowy = 23 30 | GameMapUtopiaColiseum_Snowy = 24 31 | GameMapBadlands = 25 32 | GameMapBadlands_Night = 26 33 | GameMapTokyoUnderpass = 27 34 | GameMapArctagon = 28 35 | GameMapPillars = 29 36 | GameMapCosmic = 30 37 | GameMapDoubleGoal = 31 38 | GameMapOctagon = 32 39 | GameMapUnderpass = 33 40 | GameMapUtopiaRetro = 34 41 | GameMapHoops_DunkHouse = 35 42 | GameMapDropShot_Core707 = 36 43 | GameMapThrowbackStadium = 37 44 | GameMapForbiddenTemple = 38 45 | GameMapRivalsArena = 39 46 | GameMapFarmstead_Night = 40 47 | GameMapSaltyShores_Night = 41 48 | GameMapNeonFields = 42 49 | GameMapDFHStadium_Circuit = 43 50 | ) 51 | 52 | var EnumNamesGameMap = map[int]string{ 53 | GameMapDFHStadium:"DFHStadium", 54 | GameMapMannfield:"Mannfield", 55 | GameMapChampionsField:"ChampionsField", 56 | GameMapUrbanCentral:"UrbanCentral", 57 | GameMapBeckwithPark:"BeckwithPark", 58 | GameMapUtopiaColiseum:"UtopiaColiseum", 59 | GameMapWasteland:"Wasteland", 60 | GameMapNeoTokyo:"NeoTokyo", 61 | GameMapAquaDome:"AquaDome", 62 | GameMapStarbaseArc:"StarbaseArc", 63 | GameMapFarmstead:"Farmstead", 64 | GameMapSaltyShores:"SaltyShores", 65 | GameMapDFHStadium_Stormy:"DFHStadium_Stormy", 66 | GameMapDFHStadium_Day:"DFHStadium_Day", 67 | GameMapMannfield_Stormy:"Mannfield_Stormy", 68 | GameMapMannfield_Night:"Mannfield_Night", 69 | GameMapChampionsField_Day:"ChampionsField_Day", 70 | GameMapBeckwithPark_Stormy:"BeckwithPark_Stormy", 71 | GameMapBeckwithPark_Midnight:"BeckwithPark_Midnight", 72 | GameMapUrbanCentral_Night:"UrbanCentral_Night", 73 | GameMapUrbanCentral_Dawn:"UrbanCentral_Dawn", 74 | GameMapUtopiaColiseum_Dusk:"UtopiaColiseum_Dusk", 75 | GameMapDFHStadium_Snowy:"DFHStadium_Snowy", 76 | GameMapMannfield_Snowy:"Mannfield_Snowy", 77 | GameMapUtopiaColiseum_Snowy:"UtopiaColiseum_Snowy", 78 | GameMapBadlands:"Badlands", 79 | GameMapBadlands_Night:"Badlands_Night", 80 | GameMapTokyoUnderpass:"TokyoUnderpass", 81 | GameMapArctagon:"Arctagon", 82 | GameMapPillars:"Pillars", 83 | GameMapCosmic:"Cosmic", 84 | GameMapDoubleGoal:"DoubleGoal", 85 | GameMapOctagon:"Octagon", 86 | GameMapUnderpass:"Underpass", 87 | GameMapUtopiaRetro:"UtopiaRetro", 88 | GameMapHoops_DunkHouse:"Hoops_DunkHouse", 89 | GameMapDropShot_Core707:"DropShot_Core707", 90 | GameMapThrowbackStadium:"ThrowbackStadium", 91 | GameMapForbiddenTemple:"ForbiddenTemple", 92 | GameMapRivalsArena:"RivalsArena", 93 | GameMapFarmstead_Night:"Farmstead_Night", 94 | GameMapSaltyShores_Night:"SaltyShores_Night", 95 | GameMapNeonFields:"NeonFields", 96 | GameMapDFHStadium_Circuit:"DFHStadium_Circuit", 97 | } 98 | 99 | -------------------------------------------------------------------------------- /flat/QuickChat.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type QuickChat struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsQuickChat(buf []byte, offset flatbuffers.UOffsetT) *QuickChat { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &QuickChat{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *QuickChat) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *QuickChat) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *QuickChat) QuickChatSelection() int8 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *QuickChat) MutateQuickChatSelection(n int8) bool { 38 | return rcv._tab.MutateInt8Slot(4, n) 39 | } 40 | 41 | /// The index of the player that sent the quick chat 42 | func (rcv *QuickChat) PlayerIndex() int32 { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 46 | } 47 | return 0 48 | } 49 | 50 | /// The index of the player that sent the quick chat 51 | func (rcv *QuickChat) MutatePlayerIndex(n int32) bool { 52 | return rcv._tab.MutateInt32Slot(6, n) 53 | } 54 | 55 | /// True if the chat is team only false if everyone can see it. 56 | func (rcv *QuickChat) TeamOnly() byte { 57 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 58 | if o != 0 { 59 | return rcv._tab.GetByte(o + rcv._tab.Pos) 60 | } 61 | return 0 62 | } 63 | 64 | /// True if the chat is team only false if everyone can see it. 65 | func (rcv *QuickChat) MutateTeamOnly(n byte) bool { 66 | return rcv._tab.MutateByteSlot(8, n) 67 | } 68 | 69 | func (rcv *QuickChat) MessageIndex() int32 { 70 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 71 | if o != 0 { 72 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 73 | } 74 | return 0 75 | } 76 | 77 | func (rcv *QuickChat) MutateMessageIndex(n int32) bool { 78 | return rcv._tab.MutateInt32Slot(10, n) 79 | } 80 | 81 | func (rcv *QuickChat) TimeStamp() float32 { 82 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 83 | if o != 0 { 84 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 85 | } 86 | return 0.0 87 | } 88 | 89 | func (rcv *QuickChat) MutateTimeStamp(n float32) bool { 90 | return rcv._tab.MutateFloat32Slot(12, n) 91 | } 92 | 93 | func QuickChatStart(builder *flatbuffers.Builder) { 94 | builder.StartObject(5) 95 | } 96 | func QuickChatAddQuickChatSelection(builder *flatbuffers.Builder, quickChatSelection int8) { 97 | builder.PrependInt8Slot(0, quickChatSelection, 0) 98 | } 99 | func QuickChatAddPlayerIndex(builder *flatbuffers.Builder, playerIndex int32) { 100 | builder.PrependInt32Slot(1, playerIndex, 0) 101 | } 102 | func QuickChatAddTeamOnly(builder *flatbuffers.Builder, teamOnly byte) { 103 | builder.PrependByteSlot(2, teamOnly, 0) 104 | } 105 | func QuickChatAddMessageIndex(builder *flatbuffers.Builder, messageIndex int32) { 106 | builder.PrependInt32Slot(3, messageIndex, 0) 107 | } 108 | func QuickChatAddTimeStamp(builder *flatbuffers.Builder, timeStamp float32) { 109 | builder.PrependFloat32Slot(4, timeStamp, 0.0) 110 | } 111 | func QuickChatEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 112 | return builder.EndObject() 113 | } 114 | -------------------------------------------------------------------------------- /flat/RigidBodyState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// The state of a rigid body in Rocket League's physics engine. 10 | /// This gets updated in time with the physics tick, not the rendering framerate. 11 | /// The frame field will be incremented every time the physics engine ticks. 12 | type RigidBodyState struct { 13 | _tab flatbuffers.Table 14 | } 15 | 16 | func GetRootAsRigidBodyState(buf []byte, offset flatbuffers.UOffsetT) *RigidBodyState { 17 | n := flatbuffers.GetUOffsetT(buf[offset:]) 18 | x := &RigidBodyState{} 19 | x.Init(buf, n+offset) 20 | return x 21 | } 22 | 23 | func (rcv *RigidBodyState) Init(buf []byte, i flatbuffers.UOffsetT) { 24 | rcv._tab.Bytes = buf 25 | rcv._tab.Pos = i 26 | } 27 | 28 | func (rcv *RigidBodyState) Table() flatbuffers.Table { 29 | return rcv._tab 30 | } 31 | 32 | func (rcv *RigidBodyState) Frame() int32 { 33 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 34 | if o != 0 { 35 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 36 | } 37 | return 0 38 | } 39 | 40 | func (rcv *RigidBodyState) MutateFrame(n int32) bool { 41 | return rcv._tab.MutateInt32Slot(4, n) 42 | } 43 | 44 | func (rcv *RigidBodyState) Location(obj *Vector3) *Vector3 { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | x := o + rcv._tab.Pos 48 | if obj == nil { 49 | obj = new(Vector3) 50 | } 51 | obj.Init(rcv._tab.Bytes, x) 52 | return obj 53 | } 54 | return nil 55 | } 56 | 57 | func (rcv *RigidBodyState) Rotation(obj *Quaternion) *Quaternion { 58 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 59 | if o != 0 { 60 | x := o + rcv._tab.Pos 61 | if obj == nil { 62 | obj = new(Quaternion) 63 | } 64 | obj.Init(rcv._tab.Bytes, x) 65 | return obj 66 | } 67 | return nil 68 | } 69 | 70 | func (rcv *RigidBodyState) Velocity(obj *Vector3) *Vector3 { 71 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 72 | if o != 0 { 73 | x := o + rcv._tab.Pos 74 | if obj == nil { 75 | obj = new(Vector3) 76 | } 77 | obj.Init(rcv._tab.Bytes, x) 78 | return obj 79 | } 80 | return nil 81 | } 82 | 83 | func (rcv *RigidBodyState) AngularVelocity(obj *Vector3) *Vector3 { 84 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 85 | if o != 0 { 86 | x := o + rcv._tab.Pos 87 | if obj == nil { 88 | obj = new(Vector3) 89 | } 90 | obj.Init(rcv._tab.Bytes, x) 91 | return obj 92 | } 93 | return nil 94 | } 95 | 96 | func RigidBodyStateStart(builder *flatbuffers.Builder) { 97 | builder.StartObject(5) 98 | } 99 | func RigidBodyStateAddFrame(builder *flatbuffers.Builder, frame int32) { 100 | builder.PrependInt32Slot(0, frame, 0) 101 | } 102 | func RigidBodyStateAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 103 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(location), 0) 104 | } 105 | func RigidBodyStateAddRotation(builder *flatbuffers.Builder, rotation flatbuffers.UOffsetT) { 106 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(rotation), 0) 107 | } 108 | func RigidBodyStateAddVelocity(builder *flatbuffers.Builder, velocity flatbuffers.UOffsetT) { 109 | builder.PrependStructSlot(3, flatbuffers.UOffsetT(velocity), 0) 110 | } 111 | func RigidBodyStateAddAngularVelocity(builder *flatbuffers.Builder, angularVelocity flatbuffers.UOffsetT) { 112 | builder.PrependStructSlot(4, flatbuffers.UOffsetT(angularVelocity), 0) 113 | } 114 | func RigidBodyStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 115 | return builder.EndObject() 116 | } 117 | -------------------------------------------------------------------------------- /flat/ScoreInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type ScoreInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsScoreInfo(buf []byte, offset flatbuffers.UOffsetT) *ScoreInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &ScoreInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *ScoreInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *ScoreInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *ScoreInfo) Score() int32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *ScoreInfo) MutateScore(n int32) bool { 38 | return rcv._tab.MutateInt32Slot(4, n) 39 | } 40 | 41 | func (rcv *ScoreInfo) Goals() int32 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *ScoreInfo) MutateGoals(n int32) bool { 50 | return rcv._tab.MutateInt32Slot(6, n) 51 | } 52 | 53 | func (rcv *ScoreInfo) OwnGoals() int32 { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 55 | if o != 0 { 56 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 57 | } 58 | return 0 59 | } 60 | 61 | func (rcv *ScoreInfo) MutateOwnGoals(n int32) bool { 62 | return rcv._tab.MutateInt32Slot(8, n) 63 | } 64 | 65 | func (rcv *ScoreInfo) Assists() int32 { 66 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 67 | if o != 0 { 68 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 69 | } 70 | return 0 71 | } 72 | 73 | func (rcv *ScoreInfo) MutateAssists(n int32) bool { 74 | return rcv._tab.MutateInt32Slot(10, n) 75 | } 76 | 77 | func (rcv *ScoreInfo) Saves() int32 { 78 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 79 | if o != 0 { 80 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 81 | } 82 | return 0 83 | } 84 | 85 | func (rcv *ScoreInfo) MutateSaves(n int32) bool { 86 | return rcv._tab.MutateInt32Slot(12, n) 87 | } 88 | 89 | func (rcv *ScoreInfo) Shots() int32 { 90 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 91 | if o != 0 { 92 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 93 | } 94 | return 0 95 | } 96 | 97 | func (rcv *ScoreInfo) MutateShots(n int32) bool { 98 | return rcv._tab.MutateInt32Slot(14, n) 99 | } 100 | 101 | func (rcv *ScoreInfo) Demolitions() int32 { 102 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 103 | if o != 0 { 104 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 105 | } 106 | return 0 107 | } 108 | 109 | func (rcv *ScoreInfo) MutateDemolitions(n int32) bool { 110 | return rcv._tab.MutateInt32Slot(16, n) 111 | } 112 | 113 | func ScoreInfoStart(builder *flatbuffers.Builder) { 114 | builder.StartObject(7) 115 | } 116 | func ScoreInfoAddScore(builder *flatbuffers.Builder, score int32) { 117 | builder.PrependInt32Slot(0, score, 0) 118 | } 119 | func ScoreInfoAddGoals(builder *flatbuffers.Builder, goals int32) { 120 | builder.PrependInt32Slot(1, goals, 0) 121 | } 122 | func ScoreInfoAddOwnGoals(builder *flatbuffers.Builder, ownGoals int32) { 123 | builder.PrependInt32Slot(2, ownGoals, 0) 124 | } 125 | func ScoreInfoAddAssists(builder *flatbuffers.Builder, assists int32) { 126 | builder.PrependInt32Slot(3, assists, 0) 127 | } 128 | func ScoreInfoAddSaves(builder *flatbuffers.Builder, saves int32) { 129 | builder.PrependInt32Slot(4, saves, 0) 130 | } 131 | func ScoreInfoAddShots(builder *flatbuffers.Builder, shots int32) { 132 | builder.PrependInt32Slot(5, shots, 0) 133 | } 134 | func ScoreInfoAddDemolitions(builder *flatbuffers.Builder, demolitions int32) { 135 | builder.PrependInt32Slot(6, demolitions, 0) 136 | } 137 | func ScoreInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 138 | return builder.EndObject() 139 | } 140 | -------------------------------------------------------------------------------- /flat/PlayerConfiguration.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type PlayerConfiguration struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsPlayerConfiguration(buf []byte, offset flatbuffers.UOffsetT) *PlayerConfiguration { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &PlayerConfiguration{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *PlayerConfiguration) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *PlayerConfiguration) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *PlayerConfiguration) VarietyType() byte { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetByte(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *PlayerConfiguration) MutateVarietyType(n byte) bool { 38 | return rcv._tab.MutateByteSlot(4, n) 39 | } 40 | 41 | func (rcv *PlayerConfiguration) Variety(obj *flatbuffers.Table) bool { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | rcv._tab.Union(obj, o) 45 | return true 46 | } 47 | return false 48 | } 49 | 50 | func (rcv *PlayerConfiguration) Name() []byte { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 52 | if o != 0 { 53 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 54 | } 55 | return nil 56 | } 57 | 58 | func (rcv *PlayerConfiguration) Team() int32 { 59 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 60 | if o != 0 { 61 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 62 | } 63 | return 0 64 | } 65 | 66 | func (rcv *PlayerConfiguration) MutateTeam(n int32) bool { 67 | return rcv._tab.MutateInt32Slot(10, n) 68 | } 69 | 70 | func (rcv *PlayerConfiguration) Loadout(obj *PlayerLoadout) *PlayerLoadout { 71 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 72 | if o != 0 { 73 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 74 | if obj == nil { 75 | obj = new(PlayerLoadout) 76 | } 77 | obj.Init(rcv._tab.Bytes, x) 78 | return obj 79 | } 80 | return nil 81 | } 82 | 83 | /// In the case where the requested player index is not available, spawnId will help 84 | /// the framework figure out what index was actually assigned to this player instead. 85 | func (rcv *PlayerConfiguration) SpawnId() int32 { 86 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 87 | if o != 0 { 88 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 89 | } 90 | return 0 91 | } 92 | 93 | /// In the case where the requested player index is not available, spawnId will help 94 | /// the framework figure out what index was actually assigned to this player instead. 95 | func (rcv *PlayerConfiguration) MutateSpawnId(n int32) bool { 96 | return rcv._tab.MutateInt32Slot(14, n) 97 | } 98 | 99 | func PlayerConfigurationStart(builder *flatbuffers.Builder) { 100 | builder.StartObject(6) 101 | } 102 | func PlayerConfigurationAddVarietyType(builder *flatbuffers.Builder, varietyType byte) { 103 | builder.PrependByteSlot(0, varietyType, 0) 104 | } 105 | func PlayerConfigurationAddVariety(builder *flatbuffers.Builder, variety flatbuffers.UOffsetT) { 106 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(variety), 0) 107 | } 108 | func PlayerConfigurationAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { 109 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(name), 0) 110 | } 111 | func PlayerConfigurationAddTeam(builder *flatbuffers.Builder, team int32) { 112 | builder.PrependInt32Slot(3, team, 0) 113 | } 114 | func PlayerConfigurationAddLoadout(builder *flatbuffers.Builder, loadout flatbuffers.UOffsetT) { 115 | builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(loadout), 0) 116 | } 117 | func PlayerConfigurationAddSpawnId(builder *flatbuffers.Builder, spawnId int32) { 118 | builder.PrependInt32Slot(5, spawnId, 0) 119 | } 120 | func PlayerConfigurationEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 121 | return builder.EndObject() 122 | } 123 | -------------------------------------------------------------------------------- /flat/Touch.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Touch struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsTouch(buf []byte, offset flatbuffers.UOffsetT) *Touch { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Touch{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *Touch) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *Touch) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | /// The name of the player involved with the touch. 30 | func (rcv *Touch) PlayerName() []byte { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 34 | } 35 | return nil 36 | } 37 | 38 | /// The name of the player involved with the touch. 39 | /// Seconds that had elapsed in the game when the touch occurred. 40 | func (rcv *Touch) GameSeconds() float32 { 41 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 42 | if o != 0 { 43 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 44 | } 45 | return 0.0 46 | } 47 | 48 | /// Seconds that had elapsed in the game when the touch occurred. 49 | func (rcv *Touch) MutateGameSeconds(n float32) bool { 50 | return rcv._tab.MutateFloat32Slot(6, n) 51 | } 52 | 53 | /// The point of contact for the touch. 54 | func (rcv *Touch) Location(obj *Vector3) *Vector3 { 55 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 56 | if o != 0 { 57 | x := o + rcv._tab.Pos 58 | if obj == nil { 59 | obj = new(Vector3) 60 | } 61 | obj.Init(rcv._tab.Bytes, x) 62 | return obj 63 | } 64 | return nil 65 | } 66 | 67 | /// The point of contact for the touch. 68 | /// The direction of the touch. 69 | func (rcv *Touch) Normal(obj *Vector3) *Vector3 { 70 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 71 | if o != 0 { 72 | x := o + rcv._tab.Pos 73 | if obj == nil { 74 | obj = new(Vector3) 75 | } 76 | obj.Init(rcv._tab.Bytes, x) 77 | return obj 78 | } 79 | return nil 80 | } 81 | 82 | /// The direction of the touch. 83 | /// The Team which the touch belongs to, 0 for blue 1 for orange. 84 | func (rcv *Touch) Team() int32 { 85 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 86 | if o != 0 { 87 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 88 | } 89 | return 0 90 | } 91 | 92 | /// The Team which the touch belongs to, 0 for blue 1 for orange. 93 | func (rcv *Touch) MutateTeam(n int32) bool { 94 | return rcv._tab.MutateInt32Slot(12, n) 95 | } 96 | 97 | /// The index of the player involved with the touch. 98 | func (rcv *Touch) PlayerIndex() int32 { 99 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 100 | if o != 0 { 101 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 102 | } 103 | return 0 104 | } 105 | 106 | /// The index of the player involved with the touch. 107 | func (rcv *Touch) MutatePlayerIndex(n int32) bool { 108 | return rcv._tab.MutateInt32Slot(14, n) 109 | } 110 | 111 | func TouchStart(builder *flatbuffers.Builder) { 112 | builder.StartObject(6) 113 | } 114 | func TouchAddPlayerName(builder *flatbuffers.Builder, playerName flatbuffers.UOffsetT) { 115 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(playerName), 0) 116 | } 117 | func TouchAddGameSeconds(builder *flatbuffers.Builder, gameSeconds float32) { 118 | builder.PrependFloat32Slot(1, gameSeconds, 0.0) 119 | } 120 | func TouchAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 121 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(location), 0) 122 | } 123 | func TouchAddNormal(builder *flatbuffers.Builder, normal flatbuffers.UOffsetT) { 124 | builder.PrependStructSlot(3, flatbuffers.UOffsetT(normal), 0) 125 | } 126 | func TouchAddTeam(builder *flatbuffers.Builder, team int32) { 127 | builder.PrependInt32Slot(4, team, 0) 128 | } 129 | func TouchAddPlayerIndex(builder *flatbuffers.Builder, playerIndex int32) { 130 | builder.PrependInt32Slot(5, playerIndex, 0) 131 | } 132 | func TouchEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 133 | return builder.EndObject() 134 | } 135 | -------------------------------------------------------------------------------- /flat/TinyPlayer.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// A minimal version of player data, useful when bandwidth needs to be conserved. 10 | type TinyPlayer struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsTinyPlayer(buf []byte, offset flatbuffers.UOffsetT) *TinyPlayer { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &TinyPlayer{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *TinyPlayer) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *TinyPlayer) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *TinyPlayer) Location(obj *Vector3) *Vector3 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | x := o + rcv._tab.Pos 34 | if obj == nil { 35 | obj = new(Vector3) 36 | } 37 | obj.Init(rcv._tab.Bytes, x) 38 | return obj 39 | } 40 | return nil 41 | } 42 | 43 | func (rcv *TinyPlayer) Rotation(obj *Rotator) *Rotator { 44 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 45 | if o != 0 { 46 | x := o + rcv._tab.Pos 47 | if obj == nil { 48 | obj = new(Rotator) 49 | } 50 | obj.Init(rcv._tab.Bytes, x) 51 | return obj 52 | } 53 | return nil 54 | } 55 | 56 | func (rcv *TinyPlayer) Velocity(obj *Vector3) *Vector3 { 57 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 58 | if o != 0 { 59 | x := o + rcv._tab.Pos 60 | if obj == nil { 61 | obj = new(Vector3) 62 | } 63 | obj.Init(rcv._tab.Bytes, x) 64 | return obj 65 | } 66 | return nil 67 | } 68 | 69 | func (rcv *TinyPlayer) HasWheelContact() byte { 70 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 71 | if o != 0 { 72 | return rcv._tab.GetByte(o + rcv._tab.Pos) 73 | } 74 | return 0 75 | } 76 | 77 | func (rcv *TinyPlayer) MutateHasWheelContact(n byte) bool { 78 | return rcv._tab.MutateByteSlot(10, n) 79 | } 80 | 81 | func (rcv *TinyPlayer) IsSupersonic() byte { 82 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 83 | if o != 0 { 84 | return rcv._tab.GetByte(o + rcv._tab.Pos) 85 | } 86 | return 0 87 | } 88 | 89 | func (rcv *TinyPlayer) MutateIsSupersonic(n byte) bool { 90 | return rcv._tab.MutateByteSlot(12, n) 91 | } 92 | 93 | func (rcv *TinyPlayer) Team() int32 { 94 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 95 | if o != 0 { 96 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 97 | } 98 | return 0 99 | } 100 | 101 | func (rcv *TinyPlayer) MutateTeam(n int32) bool { 102 | return rcv._tab.MutateInt32Slot(14, n) 103 | } 104 | 105 | func (rcv *TinyPlayer) Boost() int32 { 106 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 107 | if o != 0 { 108 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 109 | } 110 | return 0 111 | } 112 | 113 | func (rcv *TinyPlayer) MutateBoost(n int32) bool { 114 | return rcv._tab.MutateInt32Slot(16, n) 115 | } 116 | 117 | func TinyPlayerStart(builder *flatbuffers.Builder) { 118 | builder.StartObject(7) 119 | } 120 | func TinyPlayerAddLocation(builder *flatbuffers.Builder, location flatbuffers.UOffsetT) { 121 | builder.PrependStructSlot(0, flatbuffers.UOffsetT(location), 0) 122 | } 123 | func TinyPlayerAddRotation(builder *flatbuffers.Builder, rotation flatbuffers.UOffsetT) { 124 | builder.PrependStructSlot(1, flatbuffers.UOffsetT(rotation), 0) 125 | } 126 | func TinyPlayerAddVelocity(builder *flatbuffers.Builder, velocity flatbuffers.UOffsetT) { 127 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(velocity), 0) 128 | } 129 | func TinyPlayerAddHasWheelContact(builder *flatbuffers.Builder, hasWheelContact byte) { 130 | builder.PrependByteSlot(3, hasWheelContact, 0) 131 | } 132 | func TinyPlayerAddIsSupersonic(builder *flatbuffers.Builder, isSupersonic byte) { 133 | builder.PrependByteSlot(4, isSupersonic, 0) 134 | } 135 | func TinyPlayerAddTeam(builder *flatbuffers.Builder, team int32) { 136 | builder.PrependInt32Slot(5, team, 0) 137 | } 138 | func TinyPlayerAddBoost(builder *flatbuffers.Builder, boost int32) { 139 | builder.PrependInt32Slot(6, boost, 0) 140 | } 141 | func TinyPlayerEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 142 | return builder.EndObject() 143 | } 144 | -------------------------------------------------------------------------------- /flat/DesiredGameState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DesiredGameState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDesiredGameState(buf []byte, offset flatbuffers.UOffsetT) *DesiredGameState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DesiredGameState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *DesiredGameState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *DesiredGameState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *DesiredGameState) BallState(obj *DesiredBallState) *DesiredBallState { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 | if obj == nil { 34 | obj = new(DesiredBallState) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *DesiredGameState) CarStates(obj *DesiredCarState, j int) bool { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := rcv._tab.Vector(o) 46 | x += flatbuffers.UOffsetT(j) * 4 47 | x = rcv._tab.Indirect(x) 48 | obj.Init(rcv._tab.Bytes, x) 49 | return true 50 | } 51 | return false 52 | } 53 | 54 | func (rcv *DesiredGameState) CarStatesLength() int { 55 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 56 | if o != 0 { 57 | return rcv._tab.VectorLen(o) 58 | } 59 | return 0 60 | } 61 | 62 | func (rcv *DesiredGameState) BoostStates(obj *DesiredBoostState, j int) bool { 63 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 64 | if o != 0 { 65 | x := rcv._tab.Vector(o) 66 | x += flatbuffers.UOffsetT(j) * 4 67 | x = rcv._tab.Indirect(x) 68 | obj.Init(rcv._tab.Bytes, x) 69 | return true 70 | } 71 | return false 72 | } 73 | 74 | func (rcv *DesiredGameState) BoostStatesLength() int { 75 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 76 | if o != 0 { 77 | return rcv._tab.VectorLen(o) 78 | } 79 | return 0 80 | } 81 | 82 | func (rcv *DesiredGameState) GameInfoState(obj *DesiredGameInfoState) *DesiredGameInfoState { 83 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 84 | if o != 0 { 85 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 86 | if obj == nil { 87 | obj = new(DesiredGameInfoState) 88 | } 89 | obj.Init(rcv._tab.Bytes, x) 90 | return obj 91 | } 92 | return nil 93 | } 94 | 95 | func (rcv *DesiredGameState) ConsoleCommands(obj *ConsoleCommand, j int) bool { 96 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 97 | if o != 0 { 98 | x := rcv._tab.Vector(o) 99 | x += flatbuffers.UOffsetT(j) * 4 100 | x = rcv._tab.Indirect(x) 101 | obj.Init(rcv._tab.Bytes, x) 102 | return true 103 | } 104 | return false 105 | } 106 | 107 | func (rcv *DesiredGameState) ConsoleCommandsLength() int { 108 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 109 | if o != 0 { 110 | return rcv._tab.VectorLen(o) 111 | } 112 | return 0 113 | } 114 | 115 | func DesiredGameStateStart(builder *flatbuffers.Builder) { 116 | builder.StartObject(5) 117 | } 118 | func DesiredGameStateAddBallState(builder *flatbuffers.Builder, ballState flatbuffers.UOffsetT) { 119 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(ballState), 0) 120 | } 121 | func DesiredGameStateAddCarStates(builder *flatbuffers.Builder, carStates flatbuffers.UOffsetT) { 122 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(carStates), 0) 123 | } 124 | func DesiredGameStateStartCarStatesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 125 | return builder.StartVector(4, numElems, 4) 126 | } 127 | func DesiredGameStateAddBoostStates(builder *flatbuffers.Builder, boostStates flatbuffers.UOffsetT) { 128 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(boostStates), 0) 129 | } 130 | func DesiredGameStateStartBoostStatesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 131 | return builder.StartVector(4, numElems, 4) 132 | } 133 | func DesiredGameStateAddGameInfoState(builder *flatbuffers.Builder, gameInfoState flatbuffers.UOffsetT) { 134 | builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(gameInfoState), 0) 135 | } 136 | func DesiredGameStateAddConsoleCommands(builder *flatbuffers.Builder, consoleCommands flatbuffers.UOffsetT) { 137 | builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(consoleCommands), 0) 138 | } 139 | func DesiredGameStateStartConsoleCommandsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 140 | return builder.StartVector(4, numElems, 4) 141 | } 142 | func DesiredGameStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 143 | return builder.EndObject() 144 | } 145 | -------------------------------------------------------------------------------- /flat/LoadoutPaint.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | /// Specification for 'painted' items. See https://github.com/RLBot/RLBot/wiki/Bot-Customization 10 | type LoadoutPaint struct { 11 | _tab flatbuffers.Table 12 | } 13 | 14 | func GetRootAsLoadoutPaint(buf []byte, offset flatbuffers.UOffsetT) *LoadoutPaint { 15 | n := flatbuffers.GetUOffsetT(buf[offset:]) 16 | x := &LoadoutPaint{} 17 | x.Init(buf, n+offset) 18 | return x 19 | } 20 | 21 | func (rcv *LoadoutPaint) Init(buf []byte, i flatbuffers.UOffsetT) { 22 | rcv._tab.Bytes = buf 23 | rcv._tab.Pos = i 24 | } 25 | 26 | func (rcv *LoadoutPaint) Table() flatbuffers.Table { 27 | return rcv._tab 28 | } 29 | 30 | func (rcv *LoadoutPaint) CarPaintId() int32 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 34 | } 35 | return 0 36 | } 37 | 38 | func (rcv *LoadoutPaint) MutateCarPaintId(n int32) bool { 39 | return rcv._tab.MutateInt32Slot(4, n) 40 | } 41 | 42 | func (rcv *LoadoutPaint) DecalPaintId() int32 { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 46 | } 47 | return 0 48 | } 49 | 50 | func (rcv *LoadoutPaint) MutateDecalPaintId(n int32) bool { 51 | return rcv._tab.MutateInt32Slot(6, n) 52 | } 53 | 54 | func (rcv *LoadoutPaint) WheelsPaintId() int32 { 55 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 56 | if o != 0 { 57 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 58 | } 59 | return 0 60 | } 61 | 62 | func (rcv *LoadoutPaint) MutateWheelsPaintId(n int32) bool { 63 | return rcv._tab.MutateInt32Slot(8, n) 64 | } 65 | 66 | func (rcv *LoadoutPaint) BoostPaintId() int32 { 67 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 68 | if o != 0 { 69 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 70 | } 71 | return 0 72 | } 73 | 74 | func (rcv *LoadoutPaint) MutateBoostPaintId(n int32) bool { 75 | return rcv._tab.MutateInt32Slot(10, n) 76 | } 77 | 78 | func (rcv *LoadoutPaint) AntennaPaintId() int32 { 79 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 80 | if o != 0 { 81 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 82 | } 83 | return 0 84 | } 85 | 86 | func (rcv *LoadoutPaint) MutateAntennaPaintId(n int32) bool { 87 | return rcv._tab.MutateInt32Slot(12, n) 88 | } 89 | 90 | func (rcv *LoadoutPaint) HatPaintId() int32 { 91 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 92 | if o != 0 { 93 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 94 | } 95 | return 0 96 | } 97 | 98 | func (rcv *LoadoutPaint) MutateHatPaintId(n int32) bool { 99 | return rcv._tab.MutateInt32Slot(14, n) 100 | } 101 | 102 | func (rcv *LoadoutPaint) TrailsPaintId() int32 { 103 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 104 | if o != 0 { 105 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 106 | } 107 | return 0 108 | } 109 | 110 | func (rcv *LoadoutPaint) MutateTrailsPaintId(n int32) bool { 111 | return rcv._tab.MutateInt32Slot(16, n) 112 | } 113 | 114 | func (rcv *LoadoutPaint) GoalExplosionPaintId() int32 { 115 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 116 | if o != 0 { 117 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 118 | } 119 | return 0 120 | } 121 | 122 | func (rcv *LoadoutPaint) MutateGoalExplosionPaintId(n int32) bool { 123 | return rcv._tab.MutateInt32Slot(18, n) 124 | } 125 | 126 | func LoadoutPaintStart(builder *flatbuffers.Builder) { 127 | builder.StartObject(8) 128 | } 129 | func LoadoutPaintAddCarPaintId(builder *flatbuffers.Builder, carPaintId int32) { 130 | builder.PrependInt32Slot(0, carPaintId, 0) 131 | } 132 | func LoadoutPaintAddDecalPaintId(builder *flatbuffers.Builder, decalPaintId int32) { 133 | builder.PrependInt32Slot(1, decalPaintId, 0) 134 | } 135 | func LoadoutPaintAddWheelsPaintId(builder *flatbuffers.Builder, wheelsPaintId int32) { 136 | builder.PrependInt32Slot(2, wheelsPaintId, 0) 137 | } 138 | func LoadoutPaintAddBoostPaintId(builder *flatbuffers.Builder, boostPaintId int32) { 139 | builder.PrependInt32Slot(3, boostPaintId, 0) 140 | } 141 | func LoadoutPaintAddAntennaPaintId(builder *flatbuffers.Builder, antennaPaintId int32) { 142 | builder.PrependInt32Slot(4, antennaPaintId, 0) 143 | } 144 | func LoadoutPaintAddHatPaintId(builder *flatbuffers.Builder, hatPaintId int32) { 145 | builder.PrependInt32Slot(5, hatPaintId, 0) 146 | } 147 | func LoadoutPaintAddTrailsPaintId(builder *flatbuffers.Builder, trailsPaintId int32) { 148 | builder.PrependInt32Slot(6, trailsPaintId, 0) 149 | } 150 | func LoadoutPaintAddGoalExplosionPaintId(builder *flatbuffers.Builder, goalExplosionPaintId int32) { 151 | builder.PrependInt32Slot(7, goalExplosionPaintId, 0) 152 | } 153 | func LoadoutPaintEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 154 | return builder.EndObject() 155 | } 156 | -------------------------------------------------------------------------------- /flat/RenderMessage.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type RenderMessage struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsRenderMessage(buf []byte, offset flatbuffers.UOffsetT) *RenderMessage { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &RenderMessage{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *RenderMessage) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *RenderMessage) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *RenderMessage) RenderType() int8 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 33 | } 34 | return 1 35 | } 36 | 37 | func (rcv *RenderMessage) MutateRenderType(n int8) bool { 38 | return rcv._tab.MutateInt8Slot(4, n) 39 | } 40 | 41 | func (rcv *RenderMessage) Color(obj *Color) *Color { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 45 | if obj == nil { 46 | obj = new(Color) 47 | } 48 | obj.Init(rcv._tab.Bytes, x) 49 | return obj 50 | } 51 | return nil 52 | } 53 | 54 | /// For 2d renders this only grabs x and y 55 | func (rcv *RenderMessage) Start(obj *Vector3) *Vector3 { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | x := o + rcv._tab.Pos 59 | if obj == nil { 60 | obj = new(Vector3) 61 | } 62 | obj.Init(rcv._tab.Bytes, x) 63 | return obj 64 | } 65 | return nil 66 | } 67 | 68 | /// For 2d renders this only grabs x and y 69 | /// For 2d renders this only grabs x and y 70 | func (rcv *RenderMessage) End(obj *Vector3) *Vector3 { 71 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 72 | if o != 0 { 73 | x := o + rcv._tab.Pos 74 | if obj == nil { 75 | obj = new(Vector3) 76 | } 77 | obj.Init(rcv._tab.Bytes, x) 78 | return obj 79 | } 80 | return nil 81 | } 82 | 83 | /// For 2d renders this only grabs x and y 84 | /// Scales the x size of the text/rectangle, is used for rectangles assuming an initial value of 1 85 | func (rcv *RenderMessage) ScaleX() int32 { 86 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 87 | if o != 0 { 88 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 89 | } 90 | return 1 91 | } 92 | 93 | /// Scales the x size of the text/rectangle, is used for rectangles assuming an initial value of 1 94 | func (rcv *RenderMessage) MutateScaleX(n int32) bool { 95 | return rcv._tab.MutateInt32Slot(12, n) 96 | } 97 | 98 | /// Scales the y size of the text/rectangle, is used for rectangles assuming an initial value of 1 99 | func (rcv *RenderMessage) ScaleY() int32 { 100 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 101 | if o != 0 { 102 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 103 | } 104 | return 1 105 | } 106 | 107 | /// Scales the y size of the text/rectangle, is used for rectangles assuming an initial value of 1 108 | func (rcv *RenderMessage) MutateScaleY(n int32) bool { 109 | return rcv._tab.MutateInt32Slot(14, n) 110 | } 111 | 112 | func (rcv *RenderMessage) Text() []byte { 113 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 114 | if o != 0 { 115 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 116 | } 117 | return nil 118 | } 119 | 120 | /// Rectangles can be filled or just outlines. 121 | func (rcv *RenderMessage) IsFilled() byte { 122 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 123 | if o != 0 { 124 | return rcv._tab.GetByte(o + rcv._tab.Pos) 125 | } 126 | return 0 127 | } 128 | 129 | /// Rectangles can be filled or just outlines. 130 | func (rcv *RenderMessage) MutateIsFilled(n byte) bool { 131 | return rcv._tab.MutateByteSlot(18, n) 132 | } 133 | 134 | func RenderMessageStart(builder *flatbuffers.Builder) { 135 | builder.StartObject(8) 136 | } 137 | func RenderMessageAddRenderType(builder *flatbuffers.Builder, renderType int8) { 138 | builder.PrependInt8Slot(0, renderType, 1) 139 | } 140 | func RenderMessageAddColor(builder *flatbuffers.Builder, color flatbuffers.UOffsetT) { 141 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(color), 0) 142 | } 143 | func RenderMessageAddStart(builder *flatbuffers.Builder, start flatbuffers.UOffsetT) { 144 | builder.PrependStructSlot(2, flatbuffers.UOffsetT(start), 0) 145 | } 146 | func RenderMessageAddEnd(builder *flatbuffers.Builder, end flatbuffers.UOffsetT) { 147 | builder.PrependStructSlot(3, flatbuffers.UOffsetT(end), 0) 148 | } 149 | func RenderMessageAddScaleX(builder *flatbuffers.Builder, scaleX int32) { 150 | builder.PrependInt32Slot(4, scaleX, 1) 151 | } 152 | func RenderMessageAddScaleY(builder *flatbuffers.Builder, scaleY int32) { 153 | builder.PrependInt32Slot(5, scaleY, 1) 154 | } 155 | func RenderMessageAddText(builder *flatbuffers.Builder, text flatbuffers.UOffsetT) { 156 | builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(text), 0) 157 | } 158 | func RenderMessageAddIsFilled(builder *flatbuffers.Builder, isFilled byte) { 159 | builder.PrependByteSlot(7, isFilled, 0) 160 | } 161 | func RenderMessageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 162 | return builder.EndObject() 163 | } 164 | -------------------------------------------------------------------------------- /flat/GameTickPacket.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type GameTickPacket struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsGameTickPacket(buf []byte, offset flatbuffers.UOffsetT) *GameTickPacket { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &GameTickPacket{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *GameTickPacket) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *GameTickPacket) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *GameTickPacket) Players(obj *PlayerInfo, j int) bool { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Vector(o) 33 | x += flatbuffers.UOffsetT(j) * 4 34 | x = rcv._tab.Indirect(x) 35 | obj.Init(rcv._tab.Bytes, x) 36 | return true 37 | } 38 | return false 39 | } 40 | 41 | func (rcv *GameTickPacket) PlayersLength() int { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 43 | if o != 0 { 44 | return rcv._tab.VectorLen(o) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *GameTickPacket) BoostPadStates(obj *BoostPadState, j int) bool { 50 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 51 | if o != 0 { 52 | x := rcv._tab.Vector(o) 53 | x += flatbuffers.UOffsetT(j) * 4 54 | x = rcv._tab.Indirect(x) 55 | obj.Init(rcv._tab.Bytes, x) 56 | return true 57 | } 58 | return false 59 | } 60 | 61 | func (rcv *GameTickPacket) BoostPadStatesLength() int { 62 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 63 | if o != 0 { 64 | return rcv._tab.VectorLen(o) 65 | } 66 | return 0 67 | } 68 | 69 | func (rcv *GameTickPacket) Ball(obj *BallInfo) *BallInfo { 70 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 71 | if o != 0 { 72 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 73 | if obj == nil { 74 | obj = new(BallInfo) 75 | } 76 | obj.Init(rcv._tab.Bytes, x) 77 | return obj 78 | } 79 | return nil 80 | } 81 | 82 | func (rcv *GameTickPacket) GameInfo(obj *GameInfo) *GameInfo { 83 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 84 | if o != 0 { 85 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 86 | if obj == nil { 87 | obj = new(GameInfo) 88 | } 89 | obj.Init(rcv._tab.Bytes, x) 90 | return obj 91 | } 92 | return nil 93 | } 94 | 95 | func (rcv *GameTickPacket) TileInformation(obj *DropshotTile, j int) bool { 96 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 97 | if o != 0 { 98 | x := rcv._tab.Vector(o) 99 | x += flatbuffers.UOffsetT(j) * 4 100 | x = rcv._tab.Indirect(x) 101 | obj.Init(rcv._tab.Bytes, x) 102 | return true 103 | } 104 | return false 105 | } 106 | 107 | func (rcv *GameTickPacket) TileInformationLength() int { 108 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 109 | if o != 0 { 110 | return rcv._tab.VectorLen(o) 111 | } 112 | return 0 113 | } 114 | 115 | func (rcv *GameTickPacket) Teams(obj *TeamInfo, j int) bool { 116 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 117 | if o != 0 { 118 | x := rcv._tab.Vector(o) 119 | x += flatbuffers.UOffsetT(j) * 4 120 | x = rcv._tab.Indirect(x) 121 | obj.Init(rcv._tab.Bytes, x) 122 | return true 123 | } 124 | return false 125 | } 126 | 127 | func (rcv *GameTickPacket) TeamsLength() int { 128 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 129 | if o != 0 { 130 | return rcv._tab.VectorLen(o) 131 | } 132 | return 0 133 | } 134 | 135 | func GameTickPacketStart(builder *flatbuffers.Builder) { 136 | builder.StartObject(6) 137 | } 138 | func GameTickPacketAddPlayers(builder *flatbuffers.Builder, players flatbuffers.UOffsetT) { 139 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(players), 0) 140 | } 141 | func GameTickPacketStartPlayersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 142 | return builder.StartVector(4, numElems, 4) 143 | } 144 | func GameTickPacketAddBoostPadStates(builder *flatbuffers.Builder, boostPadStates flatbuffers.UOffsetT) { 145 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(boostPadStates), 0) 146 | } 147 | func GameTickPacketStartBoostPadStatesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 148 | return builder.StartVector(4, numElems, 4) 149 | } 150 | func GameTickPacketAddBall(builder *flatbuffers.Builder, ball flatbuffers.UOffsetT) { 151 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(ball), 0) 152 | } 153 | func GameTickPacketAddGameInfo(builder *flatbuffers.Builder, gameInfo flatbuffers.UOffsetT) { 154 | builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(gameInfo), 0) 155 | } 156 | func GameTickPacketAddTileInformation(builder *flatbuffers.Builder, tileInformation flatbuffers.UOffsetT) { 157 | builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(tileInformation), 0) 158 | } 159 | func GameTickPacketStartTileInformationVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 160 | return builder.StartVector(4, numElems, 4) 161 | } 162 | func GameTickPacketAddTeams(builder *flatbuffers.Builder, teams flatbuffers.UOffsetT) { 163 | builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(teams), 0) 164 | } 165 | func GameTickPacketStartTeamsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 166 | return builder.StartVector(4, numElems, 4) 167 | } 168 | func GameTickPacketEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 169 | return builder.EndObject() 170 | } 171 | -------------------------------------------------------------------------------- /flat/ControllerState.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type ControllerState struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsControllerState(buf []byte, offset flatbuffers.UOffsetT) *ControllerState { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &ControllerState{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *ControllerState) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *ControllerState) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | /// -1 for full reverse, 1 for full forward 30 | func (rcv *ControllerState) Throttle() float32 { 31 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 32 | if o != 0 { 33 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 34 | } 35 | return 0.0 36 | } 37 | 38 | /// -1 for full reverse, 1 for full forward 39 | func (rcv *ControllerState) MutateThrottle(n float32) bool { 40 | return rcv._tab.MutateFloat32Slot(4, n) 41 | } 42 | 43 | /// -1 for full left, 1 for full right 44 | func (rcv *ControllerState) Steer() float32 { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 48 | } 49 | return 0.0 50 | } 51 | 52 | /// -1 for full left, 1 for full right 53 | func (rcv *ControllerState) MutateSteer(n float32) bool { 54 | return rcv._tab.MutateFloat32Slot(6, n) 55 | } 56 | 57 | /// -1 for nose down, 1 for nose up 58 | func (rcv *ControllerState) Pitch() float32 { 59 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 60 | if o != 0 { 61 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 62 | } 63 | return 0.0 64 | } 65 | 66 | /// -1 for nose down, 1 for nose up 67 | func (rcv *ControllerState) MutatePitch(n float32) bool { 68 | return rcv._tab.MutateFloat32Slot(8, n) 69 | } 70 | 71 | /// -1 for full left, 1 for full right 72 | func (rcv *ControllerState) Yaw() float32 { 73 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 74 | if o != 0 { 75 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 76 | } 77 | return 0.0 78 | } 79 | 80 | /// -1 for full left, 1 for full right 81 | func (rcv *ControllerState) MutateYaw(n float32) bool { 82 | return rcv._tab.MutateFloat32Slot(10, n) 83 | } 84 | 85 | /// -1 for roll left, 1 for roll right 86 | func (rcv *ControllerState) Roll() float32 { 87 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 88 | if o != 0 { 89 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 90 | } 91 | return 0.0 92 | } 93 | 94 | /// -1 for roll left, 1 for roll right 95 | func (rcv *ControllerState) MutateRoll(n float32) bool { 96 | return rcv._tab.MutateFloat32Slot(12, n) 97 | } 98 | 99 | /// true if you want to press the jump button 100 | func (rcv *ControllerState) Jump() byte { 101 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 102 | if o != 0 { 103 | return rcv._tab.GetByte(o + rcv._tab.Pos) 104 | } 105 | return 0 106 | } 107 | 108 | /// true if you want to press the jump button 109 | func (rcv *ControllerState) MutateJump(n byte) bool { 110 | return rcv._tab.MutateByteSlot(14, n) 111 | } 112 | 113 | /// true if you want to press the boost button 114 | func (rcv *ControllerState) Boost() byte { 115 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 116 | if o != 0 { 117 | return rcv._tab.GetByte(o + rcv._tab.Pos) 118 | } 119 | return 0 120 | } 121 | 122 | /// true if you want to press the boost button 123 | func (rcv *ControllerState) MutateBoost(n byte) bool { 124 | return rcv._tab.MutateByteSlot(16, n) 125 | } 126 | 127 | /// true if you want to press the handbrake button 128 | func (rcv *ControllerState) Handbrake() byte { 129 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 130 | if o != 0 { 131 | return rcv._tab.GetByte(o + rcv._tab.Pos) 132 | } 133 | return 0 134 | } 135 | 136 | /// true if you want to press the handbrake button 137 | func (rcv *ControllerState) MutateHandbrake(n byte) bool { 138 | return rcv._tab.MutateByteSlot(18, n) 139 | } 140 | 141 | /// true if you want to press the 'use item' button, used in rumble etc. 142 | func (rcv *ControllerState) UseItem() byte { 143 | o := flatbuffers.UOffsetT(rcv._tab.Offset(20)) 144 | if o != 0 { 145 | return rcv._tab.GetByte(o + rcv._tab.Pos) 146 | } 147 | return 0 148 | } 149 | 150 | /// true if you want to press the 'use item' button, used in rumble etc. 151 | func (rcv *ControllerState) MutateUseItem(n byte) bool { 152 | return rcv._tab.MutateByteSlot(20, n) 153 | } 154 | 155 | func ControllerStateStart(builder *flatbuffers.Builder) { 156 | builder.StartObject(9) 157 | } 158 | func ControllerStateAddThrottle(builder *flatbuffers.Builder, throttle float32) { 159 | builder.PrependFloat32Slot(0, throttle, 0.0) 160 | } 161 | func ControllerStateAddSteer(builder *flatbuffers.Builder, steer float32) { 162 | builder.PrependFloat32Slot(1, steer, 0.0) 163 | } 164 | func ControllerStateAddPitch(builder *flatbuffers.Builder, pitch float32) { 165 | builder.PrependFloat32Slot(2, pitch, 0.0) 166 | } 167 | func ControllerStateAddYaw(builder *flatbuffers.Builder, yaw float32) { 168 | builder.PrependFloat32Slot(3, yaw, 0.0) 169 | } 170 | func ControllerStateAddRoll(builder *flatbuffers.Builder, roll float32) { 171 | builder.PrependFloat32Slot(4, roll, 0.0) 172 | } 173 | func ControllerStateAddJump(builder *flatbuffers.Builder, jump byte) { 174 | builder.PrependByteSlot(5, jump, 0) 175 | } 176 | func ControllerStateAddBoost(builder *flatbuffers.Builder, boost byte) { 177 | builder.PrependByteSlot(6, boost, 0) 178 | } 179 | func ControllerStateAddHandbrake(builder *flatbuffers.Builder, handbrake byte) { 180 | builder.PrependByteSlot(7, handbrake, 0) 181 | } 182 | func ControllerStateAddUseItem(builder *flatbuffers.Builder, useItem byte) { 183 | builder.PrependByteSlot(8, useItem, 0) 184 | } 185 | func ControllerStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 186 | return builder.EndObject() 187 | } 188 | -------------------------------------------------------------------------------- /socket.go: -------------------------------------------------------------------------------- 1 | package RLBotGo 2 | 3 | import ( 4 | "encoding/binary" 5 | "flag" 6 | "fmt" 7 | "io" 8 | "net" 9 | 10 | schema "github.com/Trey2k/RLBotGo/flat" 11 | ) 12 | 13 | type RLBot struct { 14 | conn net.Conn 15 | debugRenderGroup *RenderGroup 16 | PlayerIndex int32 17 | } 18 | 19 | type payload struct { 20 | data []byte 21 | dataType uint16 22 | dataSize uint16 23 | } 24 | 25 | type rlData interface { 26 | marshal() []byte 27 | } 28 | 29 | // SendQuickChat This will allow your bot to be toxic. Who doesn't want that? 30 | func (socket *RLBot) SendQuickChat(quickChatSelection int8, teamOnly bool) error { 31 | 32 | quickChat := &QuickChat{ 33 | QuickChatSelection: quickChatSelection, 34 | TeamOnly: teamOnly, 35 | PlayerIndex: socket.PlayerIndex, 36 | } 37 | return socket.SendMessage(DataType_QuickChat, quickChat) 38 | } 39 | 40 | // SendReadyMessage Send the ready message to RLBot 41 | func (socket *RLBot) SendReadyMessage(wantsBallPredictions, wantsQuickChat, wantsGameMessages bool) error { 42 | readyMsg := &ReadyMessage{ 43 | WantsBallPredictions: wantsBallPredictions, 44 | WantsQuickChat: wantsQuickChat, 45 | WantsGameMessages: wantsGameMessages, 46 | } 47 | return socket.SendMessage(DataType_ReadyMessage, readyMsg) 48 | } 49 | 50 | // SendDesiredGameState Send a specific game state. Good for testing 51 | func (socket *RLBot) SendDesiredGameState(desiredGameState *DesiredGameState) error { 52 | return socket.SendMessage(DataType_DesiredGameState, desiredGameState) 53 | } 54 | 55 | // Connect (port int) (Socket, error) Initiate the connection to RLBot returns a socket and a error on failure. 56 | // Default port is 23234 57 | func Connect(port int) (*RLBot, error) { 58 | var index = flag.Int("player-index", 0, "The player index for the bot") 59 | // Go has to know about these two otherwise will fail to launch. 60 | flag.String("rlbot-version", "0", "RLBot version") 61 | flag.String("rlbot-dll-directory", "0", "RLBot DLL dir") 62 | flag.Parse() 63 | conn, err := net.Dial("tcp", fmt.Sprintf("127.0.0.1:%d", port)) 64 | socket := &RLBot{ 65 | conn: conn, 66 | PlayerIndex: int32(*index), 67 | } 68 | return socket, err 69 | } 70 | 71 | // SendMessage (dataType uint16, data rlData) error Send a data payload to RLBot, returns a error on failure 72 | func (socket *RLBot) SendMessage(dataType uint16, data rlData) error { 73 | dataTypePayload := make([]byte, 2) 74 | binary.BigEndian.PutUint16(dataTypePayload, dataType) 75 | 76 | payload := data.marshal() 77 | 78 | size := make([]byte, 2) 79 | binary.BigEndian.PutUint16(size, uint16(len(payload))) 80 | 81 | bytes := append([]byte{}, dataTypePayload...) 82 | bytes = append(bytes, size...) 83 | 84 | bytes = append(bytes, payload...) 85 | 86 | _, err := socket.conn.Write(bytes) 87 | return err 88 | } 89 | 90 | // read game data from the RLBot API 91 | func (socket *RLBot) startReadingBytes(payloadChannel chan *payload, errChan chan error) { 92 | for { 93 | dataInfo := make([]byte, 4) 94 | _, err := io.ReadFull(socket.conn, dataInfo) 95 | if err != nil && err != io.EOF { 96 | errChan <- err 97 | break 98 | } 99 | 100 | dataType := binary.BigEndian.Uint16(dataInfo[:2]) 101 | dataSize := binary.BigEndian.Uint16(dataInfo[2:]) 102 | 103 | data := make([]byte, dataSize) 104 | _, err = io.ReadFull(socket.conn, data) 105 | if err != nil && err != io.EOF { 106 | errChan <- err 107 | break 108 | } 109 | 110 | payloadChannel <- &payload{ 111 | data: data, 112 | dataType: dataType, 113 | dataSize: dataSize, 114 | } 115 | 116 | } 117 | } 118 | 119 | // SetGetInput (handler func(gameState *GameState, socket *Socket) Set your tick handler function and start listening for gameTickPackets 120 | func (socket *RLBot) SetGetInput(handler func(gameState *GameState, socket *RLBot) *ControllerState) error { 121 | 122 | gameState := &GameState{} 123 | gameState.BallPrediction = &BallPrediction{} 124 | gameState.FieldInfo = &FieldInfo{} 125 | gameState.GameTick = &GameTickPacket{} 126 | gameState.MatchSettings = &MatchSettings{} 127 | gameState.GameMessage = &GameMessagePacket{} 128 | 129 | gameState.GameMessageOK = false 130 | gameState.FieldInfoOK = false 131 | gameState.MatchSettingsOK = false 132 | 133 | payloadChan := make(chan *payload, 5) // Makeing a payload channel with a buffer size of 5 134 | errChan := make(chan error) 135 | 136 | go socket.startReadingBytes(payloadChan, errChan) // Start reading packets in go routine and sending them over a channel 137 | 138 | for { 139 | select { 140 | case err := <-errChan: // Check for a error every loop 141 | return err 142 | default: 143 | payload := <-payloadChan // Hold until we get a payload 144 | switch payload.dataType { 145 | case DataType_TickPacket: 146 | flatGameTick := schema.GetRootAsGameTickPacket(payload.data, 0) 147 | gameState.GameTick = &GameTickPacket{} // Resetting to 0 values just in case 148 | gameState.GameTick.unmarshal(flatGameTick) 149 | input := handler(gameState, socket) 150 | // Get input from handler and send it 151 | if input != nil { 152 | playerInput := &PlayerInput{ 153 | PlayerIndex: socket.PlayerIndex, 154 | ControllerState: *input, 155 | } 156 | 157 | err := socket.SendMessage(DataType_PlayerInput, playerInput) 158 | if err != nil { 159 | return err 160 | } 161 | } 162 | // Reset game message Ok to false 163 | if gameState.GameMessageOK { 164 | gameState.GameMessageOK = false 165 | gameState.GameMessage = &GameMessagePacket{} 166 | } 167 | 168 | case DataType_FieldInfo: 169 | flatFieldInfo := schema.GetRootAsFieldInfo(payload.data, 0) 170 | gameState.FieldInfoOK = true 171 | gameState.FieldInfo.unmarshal(flatFieldInfo) 172 | 173 | case DataType_MatchSettings: 174 | flatMatchSettings := schema.GetRootAsMatchSettings(payload.data, 0) 175 | gameState.MatchSettingsOK = true 176 | gameState.MatchSettings.unmarshal(flatMatchSettings) 177 | 178 | case DataType_BallPrediction: 179 | flatBallPrediction := schema.GetRootAsBallPrediction(payload.data, 0) 180 | gameState.BallPrediction.unmarshal(flatBallPrediction) 181 | case DataType_MessagePacket: 182 | flatMessagePacket := schema.GetRootAsMessagePacket(payload.data, 0) 183 | gameState.GameMessageOK = true 184 | gameState.GameMessage.unmarshal(flatMessagePacket) 185 | } 186 | } 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | RLBotGo 2 | =========== 3 | [![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/Trey2k/RLBotGo) 4 | 5 | 6 | This repository holds a library for making Rocket League bots in Go! 7 | 8 | It provides: 9 | 10 | * An easy to use interface for writing bots 11 | * An [example bot](https://github.com/Trey2k/RLBotGoExmaple/blob/main/main.go) using this library 12 | 13 | Table of Contents: 14 | 15 | * [About](#about) 16 | * [GoBots](#gobots) 17 | * [Todo](#todo) 18 | * [Usage](#usage) 19 | * [Compiling](#compiling) 20 | * [Contributing](#contributing) 21 | * [License](#license) 22 | 23 | GoBots 24 | --- 25 | Here is a list of public bots made using the RLBotGo package. 26 | * [ATBA](https://github.com/xonmello/RLBotGoATTB) or Always Towards Ball Agent made by [@xonmello](https://github.com/xonmello) 27 | * [Bot Koba](https://github.com/xonmello/BotKoba) made by [@xonmello](https://github.com/xonmello) 28 | 29 | About 30 | ----- 31 | 32 | This project was made to make it easy to write [RL Bots](https://rlbot.org/) in Go. Instead of using flatbuffer's datatypes, this library converts everything to Go types for ease of use. 33 | 34 | Todo 35 | ----- 36 | 37 | Here are some things that could use some work in this repository's current state: 38 | 39 | * ~~Add support for render groups~~ 40 | * ~~Add support for desired game state~~ 41 | * ~~Add game message support~~ 42 | * Add some (potentially) useful math functions 43 | * ~~Get #Go channel in [RLBot Discord](https://discord.com/invite/yc643yyd)~~ 44 | 45 | Usage 46 | ------------ 47 | 48 | The suggested starting point for using this library is using the [RLBotGoExample](https://github.com/Trey2k/RLBotGoExmaple) repository as a template for your bot. 49 | 50 | If you don't start with the example repository, start out with a connection to RLBot: 51 | ```Go 52 | rlBot, err := RLBot.Connect(23234) 53 | if err != nil { 54 | panic(err) 55 | } 56 | ``` 57 | After that, send your bot's ready message: 58 | ```Go 59 | err = rlBot.SendReadyMessage(true, true, true) 60 | if err != nil { 61 | panic(err) 62 | } 63 | 64 | ``` 65 | Call SetGetInput with the name of your desired callback function: 66 | ```Go 67 | rlBot.SetGetInput(tick) 68 | ``` 69 | Finally, write a function to return the player input every tick: 70 | ```Go 71 | // getInput takes in a GameState which contains the gameTickPacket, ballPredidctions, fieldInfo and matchSettings 72 | // it also takes in the RLBot object. And returns a PlayerInput 73 | func getInput(gameState *RLBot.GameState, rlBot *RLBot.RLBot) *RLBot.ControllerState { 74 | PlayerInput := &RLBot.ControllerState{} 75 | 76 | // Count ball touches up to 10 and on 11 clear the messages and jump 77 | wasjustTouched := false 78 | if gameState.GameTick.Ball.LatestTouch.GameSeconds != 0 && lastTouch != gameState.GameTick.Ball.LatestTouch.GameSeconds { 79 | totalTouches++ 80 | lastTouch = gameState.GameTick.Ball.LatestTouch.GameSeconds 81 | wasjustTouched = true 82 | } 83 | 84 | if wasjustTouched && totalTouches <= 10 { 85 | // DebugMessage is a helper function to let you quickly get debug text on screen. it will automaticaly place it so text will not overlap 86 | rlBot.DebugMessageAdd(fmt.Sprintf("The ball was touched %d times", totalTouches)) 87 | PlayerInput.Jump = false 88 | } else if wasjustTouched && totalTouches > 10 { 89 | rlBot.DebugMessageClear() 90 | totalTouches = 0 91 | PlayerInput.Jump = true 92 | } 93 | return PlayerInput 94 | 95 | } 96 | ``` 97 | 98 | After that, you should have a functional bot! 99 | 100 | Some other useful things: 101 | ```go 102 | // Sending a quick chat 103 | // (QuickChatSelection, teamOnly) refer to the godocs or RLBot documentation for all QuickChatSelection types 104 | rlBot.SendQuickChat(RLBot.QuickChat_Custom_Toxic_404NoSkill, false) 105 | 106 | // Sending a desired game state 107 | // view https://pkg.go.dev/github.com/Trey2k/RLBotGo#DesiredGameState for more info 108 | // Most fields are optional 109 | desiredState := &RLBot.DesiredGameState{} 110 | desiredState.BallState.Physics.Velocity = RLBot.Vector3{X: 0, Y: 0, Z: 1000} 111 | rlBot.SendDesiredGameState(desiredState) 112 | 113 | // Getting ball predictions 114 | // This will be in the gameState sturct that you recive when the getInput callback is called 115 | func getInput(gameState *RLBot.GameState, rlBot *RLBot.RLBot) *RLBot.ControllerState { 116 | // Loop through all the predictions we have and print the position and predicted time. 117 | // There should be a total of 6 * 60 predictions. 60 for every secound and a total of 6 secounds 118 | for i := 0; i < len(gameState.BallPrediction.Slices); i++ { 119 | prediction := gameState.BallPrediction.Slices[i] 120 | fmt.Printf("The ball will be at pos (%f, %f, %f) at %f game time", prediction.Physics.Location.X, 121 | prediction.Physics.Location.Y, prediction.Physics.Location.Z, prediction.GameSeconds) 122 | } 123 | return nil 124 | } 125 | 126 | 127 | ``` 128 | 129 | Compiling 130 | ------------ 131 | In order to use this library, you'll need to install and configure the following: 132 | 133 | * [Go](https://golang.org) installed and [configured](https://golang.org/doc/install) atleast go 1.15 134 | * [Setup](https://www.youtube.com/watch?v=oXkbizklI2U) [RLBot](https://rlbot.org/) 135 | * A copy of [Rocket League](https://www.rocketleague.com/) installed 136 | * Port 23234 availible on your local machine for [RLBot](https://rlbot.org/) 137 | * A little patience :) 138 | 139 | To compile your bot the first thing you will want to do is take a look at the bot folder in the [Example Repo](https://github.com/Trey2k/RLBotGoExample/tree/main/bot). Modify the config files to your liking and make sure you point to the correct executable file. After that you can simply use `go build ./` and your bot should be built. 140 | 141 | To add it to RLBot simply click the +Add button in RL Bot GUI and select the folder that contains the bot folder. 142 | 143 | If sending your bot for a tournament it will probably be easiest to place the exe in the bot/src/ folder. Give the bot folder a more unique(Your bots name) name and zip that folder. Make sure to change the path to the exe in the bot.cfg file as well! 144 | 145 | Contributing 146 | ------------ 147 | 148 | Contributions are always welcome. If you're interested in contributing feel free to submit a PR. 149 | 150 | License 151 | ------- 152 | 153 | This project is currently licensed under the permissive MIT license. Please refer to the [license](/LICENSE) file for more information. 154 | -------------------------------------------------------------------------------- /flat/GameInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type GameInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsGameInfo(buf []byte, offset flatbuffers.UOffsetT) *GameInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &GameInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *GameInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *GameInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *GameInfo) SecondsElapsed() float32 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 33 | } 34 | return 0.0 35 | } 36 | 37 | func (rcv *GameInfo) MutateSecondsElapsed(n float32) bool { 38 | return rcv._tab.MutateFloat32Slot(4, n) 39 | } 40 | 41 | func (rcv *GameInfo) GameTimeRemaining() float32 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 45 | } 46 | return 0.0 47 | } 48 | 49 | func (rcv *GameInfo) MutateGameTimeRemaining(n float32) bool { 50 | return rcv._tab.MutateFloat32Slot(6, n) 51 | } 52 | 53 | func (rcv *GameInfo) IsOvertime() byte { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 55 | if o != 0 { 56 | return rcv._tab.GetByte(o + rcv._tab.Pos) 57 | } 58 | return 0 59 | } 60 | 61 | func (rcv *GameInfo) MutateIsOvertime(n byte) bool { 62 | return rcv._tab.MutateByteSlot(8, n) 63 | } 64 | 65 | func (rcv *GameInfo) IsUnlimitedTime() byte { 66 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 67 | if o != 0 { 68 | return rcv._tab.GetByte(o + rcv._tab.Pos) 69 | } 70 | return 0 71 | } 72 | 73 | func (rcv *GameInfo) MutateIsUnlimitedTime(n byte) bool { 74 | return rcv._tab.MutateByteSlot(10, n) 75 | } 76 | 77 | /// True when cars are allowed to move, and during the pause menu. False during replays. 78 | func (rcv *GameInfo) IsRoundActive() byte { 79 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 80 | if o != 0 { 81 | return rcv._tab.GetByte(o + rcv._tab.Pos) 82 | } 83 | return 0 84 | } 85 | 86 | /// True when cars are allowed to move, and during the pause menu. False during replays. 87 | func (rcv *GameInfo) MutateIsRoundActive(n byte) bool { 88 | return rcv._tab.MutateByteSlot(12, n) 89 | } 90 | 91 | /// True when the clock is paused due to kickoff, but false during kickoff countdown. In other words, it is true 92 | /// while cars can move during kickoff. Note that if both players sit still, game clock start and this will become false. 93 | func (rcv *GameInfo) IsKickoffPause() byte { 94 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 95 | if o != 0 { 96 | return rcv._tab.GetByte(o + rcv._tab.Pos) 97 | } 98 | return 0 99 | } 100 | 101 | /// True when the clock is paused due to kickoff, but false during kickoff countdown. In other words, it is true 102 | /// while cars can move during kickoff. Note that if both players sit still, game clock start and this will become false. 103 | func (rcv *GameInfo) MutateIsKickoffPause(n byte) bool { 104 | return rcv._tab.MutateByteSlot(14, n) 105 | } 106 | 107 | /// Turns true after final replay, the moment the 'winner' screen appears. Remains true during next match 108 | /// countdown. Turns false again the moment the 'choose team' screen appears. 109 | func (rcv *GameInfo) IsMatchEnded() byte { 110 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 111 | if o != 0 { 112 | return rcv._tab.GetByte(o + rcv._tab.Pos) 113 | } 114 | return 0 115 | } 116 | 117 | /// Turns true after final replay, the moment the 'winner' screen appears. Remains true during next match 118 | /// countdown. Turns false again the moment the 'choose team' screen appears. 119 | func (rcv *GameInfo) MutateIsMatchEnded(n byte) bool { 120 | return rcv._tab.MutateByteSlot(16, n) 121 | } 122 | 123 | func (rcv *GameInfo) WorldGravityZ() float32 { 124 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 125 | if o != 0 { 126 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 127 | } 128 | return 0.0 129 | } 130 | 131 | func (rcv *GameInfo) MutateWorldGravityZ(n float32) bool { 132 | return rcv._tab.MutateFloat32Slot(18, n) 133 | } 134 | 135 | /// Game speed multiplier, 1.0 is regular game speed. 136 | func (rcv *GameInfo) GameSpeed() float32 { 137 | o := flatbuffers.UOffsetT(rcv._tab.Offset(20)) 138 | if o != 0 { 139 | return rcv._tab.GetFloat32(o + rcv._tab.Pos) 140 | } 141 | return 0.0 142 | } 143 | 144 | /// Game speed multiplier, 1.0 is regular game speed. 145 | func (rcv *GameInfo) MutateGameSpeed(n float32) bool { 146 | return rcv._tab.MutateFloat32Slot(20, n) 147 | } 148 | 149 | /// Tracks the number of physics frames the game has computed. 150 | /// May increase by more than one across consecutive packets. 151 | /// Data type will roll over after 207 days at 120Hz. 152 | func (rcv *GameInfo) FrameNum() int32 { 153 | o := flatbuffers.UOffsetT(rcv._tab.Offset(22)) 154 | if o != 0 { 155 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 156 | } 157 | return 0 158 | } 159 | 160 | /// Tracks the number of physics frames the game has computed. 161 | /// May increase by more than one across consecutive packets. 162 | /// Data type will roll over after 207 days at 120Hz. 163 | func (rcv *GameInfo) MutateFrameNum(n int32) bool { 164 | return rcv._tab.MutateInt32Slot(22, n) 165 | } 166 | 167 | func GameInfoStart(builder *flatbuffers.Builder) { 168 | builder.StartObject(10) 169 | } 170 | func GameInfoAddSecondsElapsed(builder *flatbuffers.Builder, secondsElapsed float32) { 171 | builder.PrependFloat32Slot(0, secondsElapsed, 0.0) 172 | } 173 | func GameInfoAddGameTimeRemaining(builder *flatbuffers.Builder, gameTimeRemaining float32) { 174 | builder.PrependFloat32Slot(1, gameTimeRemaining, 0.0) 175 | } 176 | func GameInfoAddIsOvertime(builder *flatbuffers.Builder, isOvertime byte) { 177 | builder.PrependByteSlot(2, isOvertime, 0) 178 | } 179 | func GameInfoAddIsUnlimitedTime(builder *flatbuffers.Builder, isUnlimitedTime byte) { 180 | builder.PrependByteSlot(3, isUnlimitedTime, 0) 181 | } 182 | func GameInfoAddIsRoundActive(builder *flatbuffers.Builder, isRoundActive byte) { 183 | builder.PrependByteSlot(4, isRoundActive, 0) 184 | } 185 | func GameInfoAddIsKickoffPause(builder *flatbuffers.Builder, isKickoffPause byte) { 186 | builder.PrependByteSlot(5, isKickoffPause, 0) 187 | } 188 | func GameInfoAddIsMatchEnded(builder *flatbuffers.Builder, isMatchEnded byte) { 189 | builder.PrependByteSlot(6, isMatchEnded, 0) 190 | } 191 | func GameInfoAddWorldGravityZ(builder *flatbuffers.Builder, worldGravityZ float32) { 192 | builder.PrependFloat32Slot(7, worldGravityZ, 0.0) 193 | } 194 | func GameInfoAddGameSpeed(builder *flatbuffers.Builder, gameSpeed float32) { 195 | builder.PrependFloat32Slot(8, gameSpeed, 0.0) 196 | } 197 | func GameInfoAddFrameNum(builder *flatbuffers.Builder, frameNum int32) { 198 | builder.PrependInt32Slot(9, frameNum, 0) 199 | } 200 | func GameInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 201 | return builder.EndObject() 202 | } 203 | -------------------------------------------------------------------------------- /flat/MatchSettings.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type MatchSettings struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsMatchSettings(buf []byte, offset flatbuffers.UOffsetT) *MatchSettings { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &MatchSettings{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *MatchSettings) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *MatchSettings) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *MatchSettings) PlayerConfigurations(obj *PlayerConfiguration, j int) bool { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Vector(o) 33 | x += flatbuffers.UOffsetT(j) * 4 34 | x = rcv._tab.Indirect(x) 35 | obj.Init(rcv._tab.Bytes, x) 36 | return true 37 | } 38 | return false 39 | } 40 | 41 | func (rcv *MatchSettings) PlayerConfigurationsLength() int { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 43 | if o != 0 { 44 | return rcv._tab.VectorLen(o) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *MatchSettings) GameMode() int8 { 50 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 51 | if o != 0 { 52 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 53 | } 54 | return 0 55 | } 56 | 57 | func (rcv *MatchSettings) MutateGameMode(n int8) bool { 58 | return rcv._tab.MutateInt8Slot(6, n) 59 | } 60 | 61 | func (rcv *MatchSettings) GameMap() int8 { 62 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 63 | if o != 0 { 64 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 65 | } 66 | return 0 67 | } 68 | 69 | func (rcv *MatchSettings) MutateGameMap(n int8) bool { 70 | return rcv._tab.MutateInt8Slot(8, n) 71 | } 72 | 73 | func (rcv *MatchSettings) SkipReplays() byte { 74 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 75 | if o != 0 { 76 | return rcv._tab.GetByte(o + rcv._tab.Pos) 77 | } 78 | return 0 79 | } 80 | 81 | func (rcv *MatchSettings) MutateSkipReplays(n byte) bool { 82 | return rcv._tab.MutateByteSlot(10, n) 83 | } 84 | 85 | func (rcv *MatchSettings) InstantStart() byte { 86 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 87 | if o != 0 { 88 | return rcv._tab.GetByte(o + rcv._tab.Pos) 89 | } 90 | return 0 91 | } 92 | 93 | func (rcv *MatchSettings) MutateInstantStart(n byte) bool { 94 | return rcv._tab.MutateByteSlot(12, n) 95 | } 96 | 97 | func (rcv *MatchSettings) MutatorSettings(obj *MutatorSettings) *MutatorSettings { 98 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 99 | if o != 0 { 100 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 101 | if obj == nil { 102 | obj = new(MutatorSettings) 103 | } 104 | obj.Init(rcv._tab.Bytes, x) 105 | return obj 106 | } 107 | return nil 108 | } 109 | 110 | func (rcv *MatchSettings) ExistingMatchBehavior() int8 { 111 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 112 | if o != 0 { 113 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 114 | } 115 | return 0 116 | } 117 | 118 | func (rcv *MatchSettings) MutateExistingMatchBehavior(n int8) bool { 119 | return rcv._tab.MutateInt8Slot(16, n) 120 | } 121 | 122 | func (rcv *MatchSettings) EnableLockstep() byte { 123 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 124 | if o != 0 { 125 | return rcv._tab.GetByte(o + rcv._tab.Pos) 126 | } 127 | return 0 128 | } 129 | 130 | func (rcv *MatchSettings) MutateEnableLockstep(n byte) bool { 131 | return rcv._tab.MutateByteSlot(18, n) 132 | } 133 | 134 | func (rcv *MatchSettings) EnableRendering() byte { 135 | o := flatbuffers.UOffsetT(rcv._tab.Offset(20)) 136 | if o != 0 { 137 | return rcv._tab.GetByte(o + rcv._tab.Pos) 138 | } 139 | return 0 140 | } 141 | 142 | func (rcv *MatchSettings) MutateEnableRendering(n byte) bool { 143 | return rcv._tab.MutateByteSlot(20, n) 144 | } 145 | 146 | func (rcv *MatchSettings) EnableStateSetting() byte { 147 | o := flatbuffers.UOffsetT(rcv._tab.Offset(22)) 148 | if o != 0 { 149 | return rcv._tab.GetByte(o + rcv._tab.Pos) 150 | } 151 | return 0 152 | } 153 | 154 | func (rcv *MatchSettings) MutateEnableStateSetting(n byte) bool { 155 | return rcv._tab.MutateByteSlot(22, n) 156 | } 157 | 158 | func (rcv *MatchSettings) AutoSaveReplay() byte { 159 | o := flatbuffers.UOffsetT(rcv._tab.Offset(24)) 160 | if o != 0 { 161 | return rcv._tab.GetByte(o + rcv._tab.Pos) 162 | } 163 | return 0 164 | } 165 | 166 | func (rcv *MatchSettings) MutateAutoSaveReplay(n byte) bool { 167 | return rcv._tab.MutateByteSlot(24, n) 168 | } 169 | 170 | /// The name of a upk file, like UtopiaStadium_P, which should be loaded. 171 | /// If specified, this overrides gameMap. On Steam version of Rocket League, 172 | /// this can be used to load custom map files, but on Epic version it only 173 | /// works on the Psyonix maps. Still useful because maintaining the gameMap 174 | /// enum as new Psyonix maps are added is annoying. 175 | func (rcv *MatchSettings) GameMapUpk() []byte { 176 | o := flatbuffers.UOffsetT(rcv._tab.Offset(26)) 177 | if o != 0 { 178 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 179 | } 180 | return nil 181 | } 182 | 183 | /// The name of a upk file, like UtopiaStadium_P, which should be loaded. 184 | /// If specified, this overrides gameMap. On Steam version of Rocket League, 185 | /// this can be used to load custom map files, but on Epic version it only 186 | /// works on the Psyonix maps. Still useful because maintaining the gameMap 187 | /// enum as new Psyonix maps are added is annoying. 188 | func MatchSettingsStart(builder *flatbuffers.Builder) { 189 | builder.StartObject(12) 190 | } 191 | func MatchSettingsAddPlayerConfigurations(builder *flatbuffers.Builder, playerConfigurations flatbuffers.UOffsetT) { 192 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(playerConfigurations), 0) 193 | } 194 | func MatchSettingsStartPlayerConfigurationsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 195 | return builder.StartVector(4, numElems, 4) 196 | } 197 | func MatchSettingsAddGameMode(builder *flatbuffers.Builder, gameMode int8) { 198 | builder.PrependInt8Slot(1, gameMode, 0) 199 | } 200 | func MatchSettingsAddGameMap(builder *flatbuffers.Builder, gameMap int8) { 201 | builder.PrependInt8Slot(2, gameMap, 0) 202 | } 203 | func MatchSettingsAddSkipReplays(builder *flatbuffers.Builder, skipReplays byte) { 204 | builder.PrependByteSlot(3, skipReplays, 0) 205 | } 206 | func MatchSettingsAddInstantStart(builder *flatbuffers.Builder, instantStart byte) { 207 | builder.PrependByteSlot(4, instantStart, 0) 208 | } 209 | func MatchSettingsAddMutatorSettings(builder *flatbuffers.Builder, mutatorSettings flatbuffers.UOffsetT) { 210 | builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(mutatorSettings), 0) 211 | } 212 | func MatchSettingsAddExistingMatchBehavior(builder *flatbuffers.Builder, existingMatchBehavior int8) { 213 | builder.PrependInt8Slot(6, existingMatchBehavior, 0) 214 | } 215 | func MatchSettingsAddEnableLockstep(builder *flatbuffers.Builder, enableLockstep byte) { 216 | builder.PrependByteSlot(7, enableLockstep, 0) 217 | } 218 | func MatchSettingsAddEnableRendering(builder *flatbuffers.Builder, enableRendering byte) { 219 | builder.PrependByteSlot(8, enableRendering, 0) 220 | } 221 | func MatchSettingsAddEnableStateSetting(builder *flatbuffers.Builder, enableStateSetting byte) { 222 | builder.PrependByteSlot(9, enableStateSetting, 0) 223 | } 224 | func MatchSettingsAddAutoSaveReplay(builder *flatbuffers.Builder, autoSaveReplay byte) { 225 | builder.PrependByteSlot(10, autoSaveReplay, 0) 226 | } 227 | func MatchSettingsAddGameMapUpk(builder *flatbuffers.Builder, gameMapUpk flatbuffers.UOffsetT) { 228 | builder.PrependUOffsetTSlot(11, flatbuffers.UOffsetT(gameMapUpk), 0) 229 | } 230 | func MatchSettingsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 231 | return builder.EndObject() 232 | } 233 | -------------------------------------------------------------------------------- /flat/QuickChatSelection.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | const ( 6 | QuickChatSelectionInformation_IGotIt = 0 7 | QuickChatSelectionInformation_NeedBoost = 1 8 | QuickChatSelectionInformation_TakeTheShot = 2 9 | QuickChatSelectionInformation_Defending = 3 10 | QuickChatSelectionInformation_GoForIt = 4 11 | QuickChatSelectionInformation_Centering = 5 12 | QuickChatSelectionInformation_AllYours = 6 13 | QuickChatSelectionInformation_InPosition = 7 14 | QuickChatSelectionInformation_Incoming = 8 15 | QuickChatSelectionCompliments_NiceShot = 9 16 | QuickChatSelectionCompliments_GreatPass = 10 17 | QuickChatSelectionCompliments_Thanks = 11 18 | QuickChatSelectionCompliments_WhatASave = 12 19 | QuickChatSelectionCompliments_NiceOne = 13 20 | QuickChatSelectionCompliments_WhatAPlay = 14 21 | QuickChatSelectionCompliments_GreatClear = 15 22 | QuickChatSelectionCompliments_NiceBlock = 16 23 | QuickChatSelectionReactions_OMG = 17 24 | QuickChatSelectionReactions_Noooo = 18 25 | QuickChatSelectionReactions_Wow = 19 26 | QuickChatSelectionReactions_CloseOne = 20 27 | QuickChatSelectionReactions_NoWay = 21 28 | QuickChatSelectionReactions_HolyCow = 22 29 | QuickChatSelectionReactions_Whew = 23 30 | QuickChatSelectionReactions_Siiiick = 24 31 | QuickChatSelectionReactions_Calculated = 25 32 | QuickChatSelectionReactions_Savage = 26 33 | QuickChatSelectionReactions_Okay = 27 34 | QuickChatSelectionApologies_Cursing = 28 35 | QuickChatSelectionApologies_NoProblem = 29 36 | QuickChatSelectionApologies_Whoops = 30 37 | QuickChatSelectionApologies_Sorry = 31 38 | QuickChatSelectionApologies_MyBad = 32 39 | QuickChatSelectionApologies_Oops = 33 40 | QuickChatSelectionApologies_MyFault = 34 41 | QuickChatSelectionPostGame_Gg = 35 42 | QuickChatSelectionPostGame_WellPlayed = 36 43 | QuickChatSelectionPostGame_ThatWasFun = 37 44 | QuickChatSelectionPostGame_Rematch = 38 45 | QuickChatSelectionPostGame_OneMoreGame = 39 46 | QuickChatSelectionPostGame_WhatAGame = 40 47 | QuickChatSelectionPostGame_NiceMoves = 41 48 | QuickChatSelectionPostGame_EverybodyDance = 42 49 | /// Custom text chats made by bot makers 50 | QuickChatSelectionMaxPysonixQuickChatPresets = 43 51 | /// Waste of CPU cycles 52 | QuickChatSelectionCustom_Toxic_WasteCPU = 44 53 | /// Git gud* 54 | QuickChatSelectionCustom_Toxic_GitGut = 45 55 | /// De-Allocate Yourself 56 | QuickChatSelectionCustom_Toxic_DeAlloc = 46 57 | /// 404: Your skill not found 58 | QuickChatSelectionCustom_Toxic_404NoSkill = 47 59 | /// Get a virus 60 | QuickChatSelectionCustom_Toxic_CatchVirus = 48 61 | /// Passing! 62 | QuickChatSelectionCustom_Useful_Passing = 49 63 | /// Faking! 64 | QuickChatSelectionCustom_Useful_Faking = 50 65 | /// Demoing! 66 | QuickChatSelectionCustom_Useful_Demoing = 51 67 | /// BOOPING 68 | QuickChatSelectionCustom_Useful_Bumping = 52 69 | /// The chances of that was 47525 to 1* 70 | QuickChatSelectionCustom_Compliments_TinyChances = 53 71 | /// Who upped your skill level? 72 | QuickChatSelectionCustom_Compliments_SkillLevel = 54 73 | /// Your programmer should be proud 74 | QuickChatSelectionCustom_Compliments_proud = 55 75 | /// You're the GC of Bots 76 | QuickChatSelectionCustom_Compliments_GC = 56 77 | /// Are you Bot? * 78 | QuickChatSelectionCustom_Compliments_Pro = 57 79 | /// Lag 80 | QuickChatSelectionCustom_Excuses_Lag = 58 81 | /// Ghost inputs 82 | QuickChatSelectionCustom_Excuses_GhostInputs = 59 83 | /// RIGGED 84 | QuickChatSelectionCustom_Excuses_Rigged = 60 85 | /// Mafia plays! 86 | QuickChatSelectionCustom_Toxic_MafiaPlays = 61 87 | /// Yeet! 88 | QuickChatSelectionCustom_Exclamation_Yeet = 62 89 | ) 90 | 91 | var EnumNamesQuickChatSelection = map[int]string{ 92 | QuickChatSelectionInformation_IGotIt:"Information_IGotIt", 93 | QuickChatSelectionInformation_NeedBoost:"Information_NeedBoost", 94 | QuickChatSelectionInformation_TakeTheShot:"Information_TakeTheShot", 95 | QuickChatSelectionInformation_Defending:"Information_Defending", 96 | QuickChatSelectionInformation_GoForIt:"Information_GoForIt", 97 | QuickChatSelectionInformation_Centering:"Information_Centering", 98 | QuickChatSelectionInformation_AllYours:"Information_AllYours", 99 | QuickChatSelectionInformation_InPosition:"Information_InPosition", 100 | QuickChatSelectionInformation_Incoming:"Information_Incoming", 101 | QuickChatSelectionCompliments_NiceShot:"Compliments_NiceShot", 102 | QuickChatSelectionCompliments_GreatPass:"Compliments_GreatPass", 103 | QuickChatSelectionCompliments_Thanks:"Compliments_Thanks", 104 | QuickChatSelectionCompliments_WhatASave:"Compliments_WhatASave", 105 | QuickChatSelectionCompliments_NiceOne:"Compliments_NiceOne", 106 | QuickChatSelectionCompliments_WhatAPlay:"Compliments_WhatAPlay", 107 | QuickChatSelectionCompliments_GreatClear:"Compliments_GreatClear", 108 | QuickChatSelectionCompliments_NiceBlock:"Compliments_NiceBlock", 109 | QuickChatSelectionReactions_OMG:"Reactions_OMG", 110 | QuickChatSelectionReactions_Noooo:"Reactions_Noooo", 111 | QuickChatSelectionReactions_Wow:"Reactions_Wow", 112 | QuickChatSelectionReactions_CloseOne:"Reactions_CloseOne", 113 | QuickChatSelectionReactions_NoWay:"Reactions_NoWay", 114 | QuickChatSelectionReactions_HolyCow:"Reactions_HolyCow", 115 | QuickChatSelectionReactions_Whew:"Reactions_Whew", 116 | QuickChatSelectionReactions_Siiiick:"Reactions_Siiiick", 117 | QuickChatSelectionReactions_Calculated:"Reactions_Calculated", 118 | QuickChatSelectionReactions_Savage:"Reactions_Savage", 119 | QuickChatSelectionReactions_Okay:"Reactions_Okay", 120 | QuickChatSelectionApologies_Cursing:"Apologies_Cursing", 121 | QuickChatSelectionApologies_NoProblem:"Apologies_NoProblem", 122 | QuickChatSelectionApologies_Whoops:"Apologies_Whoops", 123 | QuickChatSelectionApologies_Sorry:"Apologies_Sorry", 124 | QuickChatSelectionApologies_MyBad:"Apologies_MyBad", 125 | QuickChatSelectionApologies_Oops:"Apologies_Oops", 126 | QuickChatSelectionApologies_MyFault:"Apologies_MyFault", 127 | QuickChatSelectionPostGame_Gg:"PostGame_Gg", 128 | QuickChatSelectionPostGame_WellPlayed:"PostGame_WellPlayed", 129 | QuickChatSelectionPostGame_ThatWasFun:"PostGame_ThatWasFun", 130 | QuickChatSelectionPostGame_Rematch:"PostGame_Rematch", 131 | QuickChatSelectionPostGame_OneMoreGame:"PostGame_OneMoreGame", 132 | QuickChatSelectionPostGame_WhatAGame:"PostGame_WhatAGame", 133 | QuickChatSelectionPostGame_NiceMoves:"PostGame_NiceMoves", 134 | QuickChatSelectionPostGame_EverybodyDance:"PostGame_EverybodyDance", 135 | QuickChatSelectionMaxPysonixQuickChatPresets:"MaxPysonixQuickChatPresets", 136 | QuickChatSelectionCustom_Toxic_WasteCPU:"Custom_Toxic_WasteCPU", 137 | QuickChatSelectionCustom_Toxic_GitGut:"Custom_Toxic_GitGut", 138 | QuickChatSelectionCustom_Toxic_DeAlloc:"Custom_Toxic_DeAlloc", 139 | QuickChatSelectionCustom_Toxic_404NoSkill:"Custom_Toxic_404NoSkill", 140 | QuickChatSelectionCustom_Toxic_CatchVirus:"Custom_Toxic_CatchVirus", 141 | QuickChatSelectionCustom_Useful_Passing:"Custom_Useful_Passing", 142 | QuickChatSelectionCustom_Useful_Faking:"Custom_Useful_Faking", 143 | QuickChatSelectionCustom_Useful_Demoing:"Custom_Useful_Demoing", 144 | QuickChatSelectionCustom_Useful_Bumping:"Custom_Useful_Bumping", 145 | QuickChatSelectionCustom_Compliments_TinyChances:"Custom_Compliments_TinyChances", 146 | QuickChatSelectionCustom_Compliments_SkillLevel:"Custom_Compliments_SkillLevel", 147 | QuickChatSelectionCustom_Compliments_proud:"Custom_Compliments_proud", 148 | QuickChatSelectionCustom_Compliments_GC:"Custom_Compliments_GC", 149 | QuickChatSelectionCustom_Compliments_Pro:"Custom_Compliments_Pro", 150 | QuickChatSelectionCustom_Excuses_Lag:"Custom_Excuses_Lag", 151 | QuickChatSelectionCustom_Excuses_GhostInputs:"Custom_Excuses_GhostInputs", 152 | QuickChatSelectionCustom_Excuses_Rigged:"Custom_Excuses_Rigged", 153 | QuickChatSelectionCustom_Toxic_MafiaPlays:"Custom_Toxic_MafiaPlays", 154 | QuickChatSelectionCustom_Exclamation_Yeet:"Custom_Exclamation_Yeet", 155 | } 156 | 157 | -------------------------------------------------------------------------------- /flat/PlayerInfo.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type PlayerInfo struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsPlayerInfo(buf []byte, offset flatbuffers.UOffsetT) *PlayerInfo { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &PlayerInfo{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *PlayerInfo) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *PlayerInfo) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *PlayerInfo) Physics(obj *Physics) *Physics { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 | if obj == nil { 34 | obj = new(Physics) 35 | } 36 | obj.Init(rcv._tab.Bytes, x) 37 | return obj 38 | } 39 | return nil 40 | } 41 | 42 | func (rcv *PlayerInfo) ScoreInfo(obj *ScoreInfo) *ScoreInfo { 43 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 | if o != 0 { 45 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 46 | if obj == nil { 47 | obj = new(ScoreInfo) 48 | } 49 | obj.Init(rcv._tab.Bytes, x) 50 | return obj 51 | } 52 | return nil 53 | } 54 | 55 | func (rcv *PlayerInfo) IsDemolished() byte { 56 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 57 | if o != 0 { 58 | return rcv._tab.GetByte(o + rcv._tab.Pos) 59 | } 60 | return 0 61 | } 62 | 63 | func (rcv *PlayerInfo) MutateIsDemolished(n byte) bool { 64 | return rcv._tab.MutateByteSlot(8, n) 65 | } 66 | 67 | /// True if your wheels are on the ground, the wall, or the ceiling. False if you're midair or turtling. 68 | func (rcv *PlayerInfo) HasWheelContact() byte { 69 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 70 | if o != 0 { 71 | return rcv._tab.GetByte(o + rcv._tab.Pos) 72 | } 73 | return 0 74 | } 75 | 76 | /// True if your wheels are on the ground, the wall, or the ceiling. False if you're midair or turtling. 77 | func (rcv *PlayerInfo) MutateHasWheelContact(n byte) bool { 78 | return rcv._tab.MutateByteSlot(10, n) 79 | } 80 | 81 | func (rcv *PlayerInfo) IsSupersonic() byte { 82 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 83 | if o != 0 { 84 | return rcv._tab.GetByte(o + rcv._tab.Pos) 85 | } 86 | return 0 87 | } 88 | 89 | func (rcv *PlayerInfo) MutateIsSupersonic(n byte) bool { 90 | return rcv._tab.MutateByteSlot(12, n) 91 | } 92 | 93 | func (rcv *PlayerInfo) IsBot() byte { 94 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 95 | if o != 0 { 96 | return rcv._tab.GetByte(o + rcv._tab.Pos) 97 | } 98 | return 0 99 | } 100 | 101 | func (rcv *PlayerInfo) MutateIsBot(n byte) bool { 102 | return rcv._tab.MutateByteSlot(14, n) 103 | } 104 | 105 | /// True if the player has jumped. Falling off the ceiling / driving off the goal post does not count. 106 | func (rcv *PlayerInfo) Jumped() byte { 107 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 108 | if o != 0 { 109 | return rcv._tab.GetByte(o + rcv._tab.Pos) 110 | } 111 | return 0 112 | } 113 | 114 | /// True if the player has jumped. Falling off the ceiling / driving off the goal post does not count. 115 | func (rcv *PlayerInfo) MutateJumped(n byte) bool { 116 | return rcv._tab.MutateByteSlot(16, n) 117 | } 118 | 119 | /// True if player has double jumped. False does not mean you have a jump remaining, because the 120 | /// aerial timer can run out, and that doesn't affect this flag. 121 | func (rcv *PlayerInfo) DoubleJumped() byte { 122 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 123 | if o != 0 { 124 | return rcv._tab.GetByte(o + rcv._tab.Pos) 125 | } 126 | return 0 127 | } 128 | 129 | /// True if player has double jumped. False does not mean you have a jump remaining, because the 130 | /// aerial timer can run out, and that doesn't affect this flag. 131 | func (rcv *PlayerInfo) MutateDoubleJumped(n byte) bool { 132 | return rcv._tab.MutateByteSlot(18, n) 133 | } 134 | 135 | func (rcv *PlayerInfo) Name() []byte { 136 | o := flatbuffers.UOffsetT(rcv._tab.Offset(20)) 137 | if o != 0 { 138 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 139 | } 140 | return nil 141 | } 142 | 143 | func (rcv *PlayerInfo) Team() int32 { 144 | o := flatbuffers.UOffsetT(rcv._tab.Offset(22)) 145 | if o != 0 { 146 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 147 | } 148 | return 0 149 | } 150 | 151 | func (rcv *PlayerInfo) MutateTeam(n int32) bool { 152 | return rcv._tab.MutateInt32Slot(22, n) 153 | } 154 | 155 | func (rcv *PlayerInfo) Boost() int32 { 156 | o := flatbuffers.UOffsetT(rcv._tab.Offset(24)) 157 | if o != 0 { 158 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 159 | } 160 | return 0 161 | } 162 | 163 | func (rcv *PlayerInfo) MutateBoost(n int32) bool { 164 | return rcv._tab.MutateInt32Slot(24, n) 165 | } 166 | 167 | func (rcv *PlayerInfo) Hitbox(obj *BoxShape) *BoxShape { 168 | o := flatbuffers.UOffsetT(rcv._tab.Offset(26)) 169 | if o != 0 { 170 | x := rcv._tab.Indirect(o + rcv._tab.Pos) 171 | if obj == nil { 172 | obj = new(BoxShape) 173 | } 174 | obj.Init(rcv._tab.Bytes, x) 175 | return obj 176 | } 177 | return nil 178 | } 179 | 180 | func (rcv *PlayerInfo) HitboxOffset(obj *Vector3) *Vector3 { 181 | o := flatbuffers.UOffsetT(rcv._tab.Offset(28)) 182 | if o != 0 { 183 | x := o + rcv._tab.Pos 184 | if obj == nil { 185 | obj = new(Vector3) 186 | } 187 | obj.Init(rcv._tab.Bytes, x) 188 | return obj 189 | } 190 | return nil 191 | } 192 | 193 | /// In the case where the requested player index is not available, spawnId will help 194 | /// the framework figure out what index was actually assigned to this player instead. 195 | func (rcv *PlayerInfo) SpawnId() int32 { 196 | o := flatbuffers.UOffsetT(rcv._tab.Offset(30)) 197 | if o != 0 { 198 | return rcv._tab.GetInt32(o + rcv._tab.Pos) 199 | } 200 | return 0 201 | } 202 | 203 | /// In the case where the requested player index is not available, spawnId will help 204 | /// the framework figure out what index was actually assigned to this player instead. 205 | func (rcv *PlayerInfo) MutateSpawnId(n int32) bool { 206 | return rcv._tab.MutateInt32Slot(30, n) 207 | } 208 | 209 | func PlayerInfoStart(builder *flatbuffers.Builder) { 210 | builder.StartObject(14) 211 | } 212 | func PlayerInfoAddPhysics(builder *flatbuffers.Builder, physics flatbuffers.UOffsetT) { 213 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(physics), 0) 214 | } 215 | func PlayerInfoAddScoreInfo(builder *flatbuffers.Builder, scoreInfo flatbuffers.UOffsetT) { 216 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(scoreInfo), 0) 217 | } 218 | func PlayerInfoAddIsDemolished(builder *flatbuffers.Builder, isDemolished byte) { 219 | builder.PrependByteSlot(2, isDemolished, 0) 220 | } 221 | func PlayerInfoAddHasWheelContact(builder *flatbuffers.Builder, hasWheelContact byte) { 222 | builder.PrependByteSlot(3, hasWheelContact, 0) 223 | } 224 | func PlayerInfoAddIsSupersonic(builder *flatbuffers.Builder, isSupersonic byte) { 225 | builder.PrependByteSlot(4, isSupersonic, 0) 226 | } 227 | func PlayerInfoAddIsBot(builder *flatbuffers.Builder, isBot byte) { 228 | builder.PrependByteSlot(5, isBot, 0) 229 | } 230 | func PlayerInfoAddJumped(builder *flatbuffers.Builder, jumped byte) { 231 | builder.PrependByteSlot(6, jumped, 0) 232 | } 233 | func PlayerInfoAddDoubleJumped(builder *flatbuffers.Builder, doubleJumped byte) { 234 | builder.PrependByteSlot(7, doubleJumped, 0) 235 | } 236 | func PlayerInfoAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { 237 | builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(name), 0) 238 | } 239 | func PlayerInfoAddTeam(builder *flatbuffers.Builder, team int32) { 240 | builder.PrependInt32Slot(9, team, 0) 241 | } 242 | func PlayerInfoAddBoost(builder *flatbuffers.Builder, boost int32) { 243 | builder.PrependInt32Slot(10, boost, 0) 244 | } 245 | func PlayerInfoAddHitbox(builder *flatbuffers.Builder, hitbox flatbuffers.UOffsetT) { 246 | builder.PrependUOffsetTSlot(11, flatbuffers.UOffsetT(hitbox), 0) 247 | } 248 | func PlayerInfoAddHitboxOffset(builder *flatbuffers.Builder, hitboxOffset flatbuffers.UOffsetT) { 249 | builder.PrependStructSlot(12, flatbuffers.UOffsetT(hitboxOffset), 0) 250 | } 251 | func PlayerInfoAddSpawnId(builder *flatbuffers.Builder, spawnId int32) { 252 | builder.PrependInt32Slot(13, spawnId, 0) 253 | } 254 | func PlayerInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 255 | return builder.EndObject() 256 | } 257 | -------------------------------------------------------------------------------- /constants.go: -------------------------------------------------------------------------------- 1 | package RLBotGo 2 | 3 | const ( // Dropshot tile info const 4 | DropshotTile_Unkown = iota 5 | DropshotTile_Filled 6 | DropshotTile_Damaged 7 | DropshotTile_Open 8 | ) 9 | 10 | const ( 11 | PlayerClassType_RLBotPlayer = iota 12 | PlayerClassType_HumanPlayer 13 | PlayerClassType_PsyonixBotPlayer 14 | PlayerClassType_PartyMemberBotPlayer 15 | ) 16 | 17 | const ( 18 | DataType_TickPacket = iota + 1 19 | DataType_FieldInfo 20 | DataType_MatchSettings 21 | DataType_PlayerInput 22 | // Depercated!!! 23 | DataType_ActorMapping 24 | // Depercated!!! 25 | DataType_ComputerId 26 | DataType_DesiredGameState 27 | DataType_RenderGroup 28 | DataType_QuickChat 29 | DataType_BallPrediction 30 | DataType_ReadyMessage 31 | DataType_MessagePacket 32 | ) 33 | 34 | const ( 35 | GameMode_Soccer = iota 36 | GameMode_Hoops 37 | GameMode_Dropshot 38 | GameMode_Hockey 39 | GameMode_Rumble 40 | GameMode_Heatseeker 41 | GameMode_Gridiron 42 | ) 43 | 44 | const ( 45 | MatchLength_Five_Minutes = iota 46 | MatchLength_Ten_Minutes 47 | MatchLength_Twenty_Minutes 48 | MatchLength_Unlimited 49 | ) 50 | 51 | const ( 52 | MaxScore_Unlimited = iota 53 | MaxScore_One_Goal 54 | MaxScore_Three_Goals 55 | MaxScore_Five_Goals 56 | ) 57 | 58 | const ( 59 | OvertimeOption_Unlimited = iota 60 | OvertimeOption_Five_Max_First_Score 61 | OvertimeOption_Five_Max_Random_Team 62 | ) 63 | 64 | const ( 65 | SeriesLengthOption_Unlimited = iota 66 | SeriesLengthOption_Three_Games 67 | SeriesLengthOption_Five_Games 68 | SeriesLengthOption_Seven_Games 69 | ) 70 | 71 | const ( 72 | GameSpeedOption_Default = iota 73 | GameSpeedOption_Slo_Mo 74 | GameSpeedOption_Time_Warp 75 | ) 76 | 77 | const ( 78 | BallMaxSpeedOption_Default = iota 79 | BallMaxSpeedOption_Default_Slow 80 | BallMaxSpeedOption_Default_Fast 81 | BallMaxSpeedOption_Default_Super_Fast 82 | ) 83 | 84 | const ( 85 | BallTypeOption_Default = iota 86 | BallTypeOption_Cube 87 | BallTypeOption_Puck 88 | BallTypeOption_Basketball 89 | ) 90 | 91 | const ( 92 | BallWeightOption_Default = iota 93 | BallWeightOption_Light 94 | BallWeightOption_Heavy 95 | BallWeightOption_Super_Light 96 | ) 97 | 98 | const ( 99 | BallSizeOption_Default = iota 100 | BallSizeOption_Small 101 | BallSizeOption_Large 102 | BallSizeOption_Gigantic 103 | ) 104 | 105 | const ( 106 | BallBouncinessOption_Default = iota 107 | BallBouncinessOption_Low 108 | BallBouncinessOption_High 109 | BallBouncinessOption_Super_High 110 | ) 111 | 112 | const ( 113 | BoostOption_Normal_Boost = iota 114 | BoostOption_Unlimited_Boost 115 | BoostOption_Slow_Recharge 116 | BoostOption_Rapid_Recharge 117 | BoostOption_No_Boost 118 | ) 119 | 120 | const ( 121 | RumbleOption_No_Rumble = iota 122 | RumbleOption_Default 123 | RumbleOption_Slow 124 | RumbleOption_Civilized 125 | RumbleOption_Destruction_Derby 126 | RumbleOption_Spring_Loaded 127 | RumbleOption_Spikes_Only 128 | RumbleOption_Spike_Rush 129 | ) 130 | 131 | const ( 132 | BoostStrengthOption_One = iota 133 | BoostStrengthOption_OneAndAHalf 134 | BoostStrengthOption_Two 135 | BoostStrengthOption_Ten 136 | ) 137 | 138 | const ( 139 | GravityOption_Default = iota 140 | GravityOption_Low 141 | GravityOption_High 142 | GravityOption_Super_High 143 | ) 144 | 145 | const ( 146 | DemolishOption_Default = iota 147 | DemolishOption_Disabled 148 | DemolishOption_Friendly_Fire 149 | DemolishOption_On_Contact 150 | DemolishOption_On_Contact_FF 151 | ) 152 | 153 | const ( 154 | RespawnTimeOption_Three_Seconds = iota 155 | RespawnTimeOption_Two_Seconds 156 | RespawnTimeOption_One_Seconds 157 | RespawnTimeOption_Disable_Goal_Reset 158 | ) 159 | 160 | const ( 161 | // Restart the match if any match settings differ. This is the default because old RLBot always worked this way. 162 | ExistingMatchBehavior_Restart_If_Different = iota 163 | 164 | // Always restart the match, even if config is identical 165 | ExistingMatchBehavior_Restart 166 | 167 | // Never restart an existing match, just try to remove or spawn cars to match the configuration. 168 | // If we are not in the middle of a match, a match will be started. Handy for LAN matches. 169 | ExistingMatchBehavior_Continue_And_Spawn 170 | ) 171 | 172 | const ( 173 | GameMap_DFHStadium = iota 174 | GameMap_Mannfield 175 | GameMap_ChampionsField 176 | GameMap_UrbanCentral 177 | GameMap_BeckwithPark 178 | GameMap_UtopiaColiseum 179 | GameMap_Wasteland 180 | GameMap_NeoTokyo 181 | GameMap_AquaDome 182 | GameMap_StarbaseArc 183 | GameMap_Farmstead 184 | GameMap_SaltyShores 185 | GameMap_DFHStadium_Stormy 186 | GameMap_DFHStadium_Day 187 | GameMap_Mannfield_Stormy 188 | GameMap_Mannfield_Night 189 | GameMap_ChampionsField_Day 190 | GameMap_BeckwithPark_Stormy 191 | GameMap_BeckwithPark_Midnight 192 | GameMap_UrbanCentral_Night 193 | GameMap_UrbanCentral_Dawn 194 | GameMap_UtopiaColiseum_Dusk 195 | GameMap_DFHStadium_Snowy 196 | GameMap_Mannfield_Snowy 197 | GameMap_UtopiaColiseum_Snowy 198 | GameMap_Badlands 199 | GameMap_Badlands_Night 200 | GameMap_TokyoUnderpass 201 | GameMap_Arctagon 202 | GameMap_Pillars 203 | GameMap_Cosmic 204 | GameMap_DoubleGoal 205 | GameMap_Octagon 206 | GameMap_Underpass 207 | GameMap_UtopiaRetro 208 | GameMap_Hoops_DunkHouse 209 | GameMap_DropShot_Core707 210 | GameMap_ThrowbackStadium 211 | GameMap_ForbiddenTemple 212 | GameMap_RivalsArena 213 | GameMap_Farmstead_Night 214 | GameMap_SaltyShores_Night 215 | GameMap_NeonFields 216 | GameMap_DFHStadium_Circuit 217 | ) 218 | 219 | const ( 220 | QuickChat_Information_IGotIt = iota 221 | QuickChat_Information_NeedBoost 222 | QuickChat_Information_TakeTheShot 223 | QuickChat_Information_Defending 224 | QuickChat_Information_GoForIt 225 | QuickChat_Information_Centering 226 | QuickChat_Information_AllYours 227 | QuickChat_Information_InPosition 228 | QuickChat_Information_Incoming 229 | QuickChat_Compliments_NiceShot 230 | QuickChat_Compliments_GreatPass 231 | QuickChat_Compliments_Thanks 232 | QuickChat_Compliments_WhatASave 233 | QuickChat_Compliments_NiceOne 234 | QuickChat_Compliments_WhatAPlay 235 | QuickChat_Compliments_GreatClear 236 | QuickChat_Compliments_NiceBlock 237 | QuickChat_Reactions_OMG 238 | QuickChat_Reactions_Noooo 239 | QuickChat_Reactions_Wow 240 | QuickChat_Reactions_CloseOne 241 | QuickChat_Reactions_NoWay 242 | QuickChat_Reactions_HolyCow 243 | QuickChat_Reactions_Whew 244 | QuickChat_Reactions_Siiiick 245 | QuickChat_Reactions_Calculated 246 | QuickChat_Reactions_Savage 247 | QuickChat_Reactions_Okay 248 | QuickChat_Apologies_Cursing 249 | QuickChat_Apologies_NoProblem 250 | QuickChat_Apologies_Whoops 251 | QuickChat_Apologies_Sorry 252 | QuickChat_Apologies_MyBad 253 | QuickChat_Apologies_Oops 254 | QuickChat_Apologies_MyFault 255 | QuickChat_PostGame_Gg 256 | QuickChat_PostGame_WellPlayed 257 | QuickChat_PostGame_ThatWasFun 258 | QuickChat_PostGame_Rematch 259 | QuickChat_PostGame_OneMoreGame 260 | QuickChat_PostGame_WhatAGame 261 | QuickChat_PostGame_NiceMoves 262 | QuickChat_PostGame_EverybodyDance 263 | // Custom text chats made by bot makers 264 | QuickChat_MaxPysonixQuickChatPresets 265 | // Waste of CPU cycles 266 | QuickChat_Custom_Toxic_WasteCPU 267 | // Git gud* 268 | QuickChat_Custom_Toxic_GitGut 269 | // De-Allocate Yourself 270 | QuickChat_Custom_Toxic_DeAlloc 271 | // 404: Your skill not found 272 | QuickChat_Custom_Toxic_404NoSkill 273 | // Get a virus 274 | QuickChat_Custom_Toxic_CatchVirus 275 | // Passing! 276 | QuickChat_Custom_Useful_Passing 277 | // Faking! 278 | QuickChat_Custom_Useful_Faking 279 | // Demoing! 280 | QuickChat_Custom_Useful_Demoing 281 | // BOOPING 282 | QuickChat_Custom_Useful_Bumping 283 | // The chances of that was 47525 to 1* 284 | QuickChat_Custom_Compliments_TinyChances 285 | // Who upped your skill level? 286 | QuickChat_Custom_Compliments_SkillLevel 287 | // Your programmer should be proud 288 | QuickChat_Custom_Compliments_proud 289 | // You're the GC of Bots 290 | QuickChat_Custom_Compliments_GC 291 | // Are you Bot? * 292 | QuickChat_Custom_Compliments_Pro 293 | // Lag 294 | QuickChat_Custom_Excuses_Lag 295 | // Ghost inputs 296 | QuickChat_Custom_Excuses_GhostInputs 297 | // RIGGED 298 | QuickChat_Custom_Excuses_Rigged 299 | // Mafia plays! 300 | QuickChat_Custom_Toxic_MafiaPlays 301 | // Yeet! 302 | QuickChat_Custom_Exclamation_Yeet 303 | ) 304 | 305 | const ( 306 | RenderType_DrawLine2D = iota + 1 307 | RenderType_DrawLine3D 308 | RenderType_DrawLine2D_3D 309 | RenderType_DrawRect2D 310 | RenderType_DrawRect3D 311 | RenderType_DrawString2D 312 | RenderType_DrawString3D 313 | RenderType_DrawCenteredRect3D 314 | ) 315 | 316 | const ( 317 | GamesMessageType_PlayerStatEvent = iota 318 | GamesMessageType_PlayerSpectate 319 | GamesMessageType_PlayerInputChange 320 | ) 321 | -------------------------------------------------------------------------------- /flat/MutatorSettings.go: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package flat 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type MutatorSettings struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsMutatorSettings(buf []byte, offset flatbuffers.UOffsetT) *MutatorSettings { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &MutatorSettings{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func (rcv *MutatorSettings) Init(buf []byte, i flatbuffers.UOffsetT) { 21 | rcv._tab.Bytes = buf 22 | rcv._tab.Pos = i 23 | } 24 | 25 | func (rcv *MutatorSettings) Table() flatbuffers.Table { 26 | return rcv._tab 27 | } 28 | 29 | func (rcv *MutatorSettings) MatchLength() int8 { 30 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 | if o != 0 { 32 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 33 | } 34 | return 0 35 | } 36 | 37 | func (rcv *MutatorSettings) MutateMatchLength(n int8) bool { 38 | return rcv._tab.MutateInt8Slot(4, n) 39 | } 40 | 41 | func (rcv *MutatorSettings) MaxScore() int8 { 42 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 43 | if o != 0 { 44 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 45 | } 46 | return 0 47 | } 48 | 49 | func (rcv *MutatorSettings) MutateMaxScore(n int8) bool { 50 | return rcv._tab.MutateInt8Slot(6, n) 51 | } 52 | 53 | func (rcv *MutatorSettings) OvertimeOption() int8 { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 55 | if o != 0 { 56 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 57 | } 58 | return 0 59 | } 60 | 61 | func (rcv *MutatorSettings) MutateOvertimeOption(n int8) bool { 62 | return rcv._tab.MutateInt8Slot(8, n) 63 | } 64 | 65 | func (rcv *MutatorSettings) SeriesLengthOption() int8 { 66 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 67 | if o != 0 { 68 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 69 | } 70 | return 0 71 | } 72 | 73 | func (rcv *MutatorSettings) MutateSeriesLengthOption(n int8) bool { 74 | return rcv._tab.MutateInt8Slot(10, n) 75 | } 76 | 77 | func (rcv *MutatorSettings) GameSpeedOption() int8 { 78 | o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) 79 | if o != 0 { 80 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 81 | } 82 | return 0 83 | } 84 | 85 | func (rcv *MutatorSettings) MutateGameSpeedOption(n int8) bool { 86 | return rcv._tab.MutateInt8Slot(12, n) 87 | } 88 | 89 | func (rcv *MutatorSettings) BallMaxSpeedOption() int8 { 90 | o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 91 | if o != 0 { 92 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 93 | } 94 | return 0 95 | } 96 | 97 | func (rcv *MutatorSettings) MutateBallMaxSpeedOption(n int8) bool { 98 | return rcv._tab.MutateInt8Slot(14, n) 99 | } 100 | 101 | func (rcv *MutatorSettings) BallTypeOption() int8 { 102 | o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 103 | if o != 0 { 104 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 105 | } 106 | return 0 107 | } 108 | 109 | func (rcv *MutatorSettings) MutateBallTypeOption(n int8) bool { 110 | return rcv._tab.MutateInt8Slot(16, n) 111 | } 112 | 113 | func (rcv *MutatorSettings) BallWeightOption() int8 { 114 | o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 115 | if o != 0 { 116 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 117 | } 118 | return 0 119 | } 120 | 121 | func (rcv *MutatorSettings) MutateBallWeightOption(n int8) bool { 122 | return rcv._tab.MutateInt8Slot(18, n) 123 | } 124 | 125 | func (rcv *MutatorSettings) BallSizeOption() int8 { 126 | o := flatbuffers.UOffsetT(rcv._tab.Offset(20)) 127 | if o != 0 { 128 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 129 | } 130 | return 0 131 | } 132 | 133 | func (rcv *MutatorSettings) MutateBallSizeOption(n int8) bool { 134 | return rcv._tab.MutateInt8Slot(20, n) 135 | } 136 | 137 | func (rcv *MutatorSettings) BallBouncinessOption() int8 { 138 | o := flatbuffers.UOffsetT(rcv._tab.Offset(22)) 139 | if o != 0 { 140 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 141 | } 142 | return 0 143 | } 144 | 145 | func (rcv *MutatorSettings) MutateBallBouncinessOption(n int8) bool { 146 | return rcv._tab.MutateInt8Slot(22, n) 147 | } 148 | 149 | func (rcv *MutatorSettings) BoostOption() int8 { 150 | o := flatbuffers.UOffsetT(rcv._tab.Offset(24)) 151 | if o != 0 { 152 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 153 | } 154 | return 0 155 | } 156 | 157 | func (rcv *MutatorSettings) MutateBoostOption(n int8) bool { 158 | return rcv._tab.MutateInt8Slot(24, n) 159 | } 160 | 161 | func (rcv *MutatorSettings) RumbleOption() int8 { 162 | o := flatbuffers.UOffsetT(rcv._tab.Offset(26)) 163 | if o != 0 { 164 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 165 | } 166 | return 0 167 | } 168 | 169 | func (rcv *MutatorSettings) MutateRumbleOption(n int8) bool { 170 | return rcv._tab.MutateInt8Slot(26, n) 171 | } 172 | 173 | func (rcv *MutatorSettings) BoostStrengthOption() int8 { 174 | o := flatbuffers.UOffsetT(rcv._tab.Offset(28)) 175 | if o != 0 { 176 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 177 | } 178 | return 0 179 | } 180 | 181 | func (rcv *MutatorSettings) MutateBoostStrengthOption(n int8) bool { 182 | return rcv._tab.MutateInt8Slot(28, n) 183 | } 184 | 185 | func (rcv *MutatorSettings) GravityOption() int8 { 186 | o := flatbuffers.UOffsetT(rcv._tab.Offset(30)) 187 | if o != 0 { 188 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 189 | } 190 | return 0 191 | } 192 | 193 | func (rcv *MutatorSettings) MutateGravityOption(n int8) bool { 194 | return rcv._tab.MutateInt8Slot(30, n) 195 | } 196 | 197 | func (rcv *MutatorSettings) DemolishOption() int8 { 198 | o := flatbuffers.UOffsetT(rcv._tab.Offset(32)) 199 | if o != 0 { 200 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 201 | } 202 | return 0 203 | } 204 | 205 | func (rcv *MutatorSettings) MutateDemolishOption(n int8) bool { 206 | return rcv._tab.MutateInt8Slot(32, n) 207 | } 208 | 209 | func (rcv *MutatorSettings) RespawnTimeOption() int8 { 210 | o := flatbuffers.UOffsetT(rcv._tab.Offset(34)) 211 | if o != 0 { 212 | return rcv._tab.GetInt8(o + rcv._tab.Pos) 213 | } 214 | return 0 215 | } 216 | 217 | func (rcv *MutatorSettings) MutateRespawnTimeOption(n int8) bool { 218 | return rcv._tab.MutateInt8Slot(34, n) 219 | } 220 | 221 | func MutatorSettingsStart(builder *flatbuffers.Builder) { 222 | builder.StartObject(16) 223 | } 224 | func MutatorSettingsAddMatchLength(builder *flatbuffers.Builder, matchLength int8) { 225 | builder.PrependInt8Slot(0, matchLength, 0) 226 | } 227 | func MutatorSettingsAddMaxScore(builder *flatbuffers.Builder, maxScore int8) { 228 | builder.PrependInt8Slot(1, maxScore, 0) 229 | } 230 | func MutatorSettingsAddOvertimeOption(builder *flatbuffers.Builder, overtimeOption int8) { 231 | builder.PrependInt8Slot(2, overtimeOption, 0) 232 | } 233 | func MutatorSettingsAddSeriesLengthOption(builder *flatbuffers.Builder, seriesLengthOption int8) { 234 | builder.PrependInt8Slot(3, seriesLengthOption, 0) 235 | } 236 | func MutatorSettingsAddGameSpeedOption(builder *flatbuffers.Builder, gameSpeedOption int8) { 237 | builder.PrependInt8Slot(4, gameSpeedOption, 0) 238 | } 239 | func MutatorSettingsAddBallMaxSpeedOption(builder *flatbuffers.Builder, ballMaxSpeedOption int8) { 240 | builder.PrependInt8Slot(5, ballMaxSpeedOption, 0) 241 | } 242 | func MutatorSettingsAddBallTypeOption(builder *flatbuffers.Builder, ballTypeOption int8) { 243 | builder.PrependInt8Slot(6, ballTypeOption, 0) 244 | } 245 | func MutatorSettingsAddBallWeightOption(builder *flatbuffers.Builder, ballWeightOption int8) { 246 | builder.PrependInt8Slot(7, ballWeightOption, 0) 247 | } 248 | func MutatorSettingsAddBallSizeOption(builder *flatbuffers.Builder, ballSizeOption int8) { 249 | builder.PrependInt8Slot(8, ballSizeOption, 0) 250 | } 251 | func MutatorSettingsAddBallBouncinessOption(builder *flatbuffers.Builder, ballBouncinessOption int8) { 252 | builder.PrependInt8Slot(9, ballBouncinessOption, 0) 253 | } 254 | func MutatorSettingsAddBoostOption(builder *flatbuffers.Builder, boostOption int8) { 255 | builder.PrependInt8Slot(10, boostOption, 0) 256 | } 257 | func MutatorSettingsAddRumbleOption(builder *flatbuffers.Builder, rumbleOption int8) { 258 | builder.PrependInt8Slot(11, rumbleOption, 0) 259 | } 260 | func MutatorSettingsAddBoostStrengthOption(builder *flatbuffers.Builder, boostStrengthOption int8) { 261 | builder.PrependInt8Slot(12, boostStrengthOption, 0) 262 | } 263 | func MutatorSettingsAddGravityOption(builder *flatbuffers.Builder, gravityOption int8) { 264 | builder.PrependInt8Slot(13, gravityOption, 0) 265 | } 266 | func MutatorSettingsAddDemolishOption(builder *flatbuffers.Builder, demolishOption int8) { 267 | builder.PrependInt8Slot(14, demolishOption, 0) 268 | } 269 | func MutatorSettingsAddRespawnTimeOption(builder *flatbuffers.Builder, respawnTimeOption int8) { 270 | builder.PrependInt8Slot(15, respawnTimeOption, 0) 271 | } 272 | func MutatorSettingsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 273 | return builder.EndObject() 274 | } 275 | --------------------------------------------------------------------------------