Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (client *Client) Aim(x int, y int)
- func (client *Client) Connect(serverIp string, serverPort int) error
- func (client *Client) ConnectContext(ctx context.Context, serverIp string, serverPort int) (err error)
- func (client *Client) CreateAltSnap(oldSnap *snapshot7.Snapshot, newSnap *snapshot7.Snapshot) *snapshot7.Snapshot
- func (client *Client) Fire()
- func (client *Client) Hook()
- func (client *Client) Jump()
- func (client *Client) Left()
- func (client *Client) OnAccept(callback func(msg *messages7.CtrlAccept, defaultAction DefaultAction) error)
- func (client *Client) OnBroadcast(callback func(msg *messages7.SvBroadcast, defaultAction DefaultAction) error)
- func (client *Client) OnChat(callback func(msg *messages7.SvChat, defaultAction DefaultAction) error)
- func (client *Client) OnCheckpoint(callback func(msg *messages7.SvCheckpoint, defaultAction DefaultAction) error)
- func (client *Client) OnClientDrop(callback func(msg *messages7.SvClientDrop, defaultAction DefaultAction) error)
- func (client *Client) OnClientInfo(callback func(msg *messages7.SvClientInfo, defaultAction DefaultAction) error)
- func (client *Client) OnCommandInfo(callback func(msg *messages7.SvCommandInfo, defaultAction DefaultAction) error)
- func (client *Client) OnCommandInfoRemove(...)
- func (client *Client) OnDisconnect(callback func(msg *messages7.CtrlClose, defaultAction DefaultAction) error)
- func (client *Client) OnEmoticon(callback func(msg *messages7.SvEmoticon, defaultAction DefaultAction) error)
- func (client *Client) OnError(callback func(err error) error)
- func (client *Client) OnExtraProjectile(...)
- func (client *Client) OnGameInfo(callback func(msg *messages7.SvGameInfo, defaultAction DefaultAction) error)
- func (client *Client) OnGameMsg(callback func(msg *messages7.SvGameMsg, defaultAction DefaultAction) error)
- func (client *Client) OnKeepAlive(callback func(msg *messages7.CtrlKeepAlive, defaultAction DefaultAction) error)
- func (client *Client) OnKillMsg(callback func(msg *messages7.SvKillMsg, defaultAction DefaultAction) error)
- func (client *Client) OnMapChange(callback func(msg *messages7.MapChange, defaultAction DefaultAction) error)
- func (client *Client) OnMotd(callback func(msg *messages7.SvMotd, defaultAction DefaultAction) error)
- func (client *Client) OnMsgSnap(callback func(msg *messages7.Snap, defaultAction DefaultAction) error)
- func (client *Client) OnMsgSnapEmpty(callback func(msg *messages7.SnapEmpty, defaultAction DefaultAction) error)
- func (client *Client) OnMsgSnapSingle(callback func(msg *messages7.SnapSingle, defaultAction DefaultAction) error)
- func (client *Client) OnMsgSnapSmall(callback func(msg *messages7.SnapSmall, defaultAction DefaultAction) error)
- func (client *Client) OnPacket(callback func(packet *protocol7.Packet) bool)
- func (client *Client) OnRaceFinish(callback func(msg *messages7.SvRaceFinish, defaultAction DefaultAction) error)
- func (client *Client) OnReadyToEnter(...)
- func (client *Client) OnSendCallVote(callback func(msg *messages7.ClCallVote) bool)
- func (client *Client) OnSendCommand(callback func(msg *messages7.ClCommand) bool)
- func (client *Client) OnSendConReady(callback func(msg *messages7.ConReady) bool)
- func (client *Client) OnSendEmoticon(callback func(msg *messages7.ClEmoticon) bool)
- func (client *Client) OnSendEnterGame(callback func(msg *messages7.EnterGame) bool)
- func (client *Client) OnSendInfo(callback func(msg *messages7.Info) bool)
- func (client *Client) OnSendInput(callback func(msg *messages7.Input) bool)
- func (client *Client) OnSendInputTiming(callback func(msg *messages7.InputTiming) bool)
- func (client *Client) OnSendKill(callback func(msg *messages7.ClKill) bool)
- func (client *Client) OnSendPacket(callback func(packet *protocol7.Packet) bool)
- func (client *Client) OnSendPing(callback func(msg *messages7.Ping) bool)
- func (client *Client) OnSendPingReply(callback func(msg *messages7.PingReply) bool)
- func (client *Client) OnSendRconAuth(callback func(msg *messages7.RconAuth) bool)
- func (client *Client) OnSendRconCmd(callback func(msg *messages7.RconCmd) bool)
- func (client *Client) OnSendReady(callback func(msg *messages7.Ready) bool)
- func (client *Client) OnSendReadyChange(callback func(msg *messages7.ClReadyChange) bool)
- func (client *Client) OnSendRequestMapData(callback func(msg *messages7.RequestMapData) bool)
- func (client *Client) OnSendSay(callback func(msg *messages7.ClSay) bool)
- func (client *Client) OnSendSetSpectatorMode(callback func(msg *messages7.ClSetSpectatorMode) bool)
- func (client *Client) OnSendSetTeam(callback func(msg *messages7.ClSetTeam) bool)
- func (client *Client) OnSendSkinChange(callback func(msg *messages7.ClSkinChange) bool)
- func (client *Client) OnSendStartInfo(callback func(msg *messages7.ClStartInfo) bool)
- func (client *Client) OnSendVote(callback func(msg *messages7.ClVote) bool)
- func (client *Client) OnServerInfo(callback func(msg *messages7.ServerInfo, defaultAction DefaultAction) error)
- func (client *Client) OnServerSettings(...)
- func (client *Client) OnSkinChange(callback func(msg *messages7.SvSkinChange, defaultAction DefaultAction) error)
- func (client *Client) OnSnapshot(callback func(snap *snapshot7.Snapshot, defaultAction DefaultAction) error)
- func (client *Client) OnTeam(callback func(msg *messages7.SvTeam, defaultAction DefaultAction) error)
- func (client *Client) OnTick(callback func(defaultAction DefaultAction) error)
- func (client *Client) OnToken(callback func(msg *messages7.CtrlToken, defaultAction DefaultAction) error)
- func (client *Client) OnTuneParams(callback func(msg *messages7.SvTuneParams, defaultAction DefaultAction) error)
- func (client *Client) OnUnknown(callback func(msg *messages7.Unknown, defaultAction DefaultAction) error)
- func (client *Client) OnVoteClearoptions(...)
- func (client *Client) OnVoteOptionlistadd(...)
- func (client *Client) OnVoteOptionremove(...)
- func (client *Client) OnVotePptionadd(...)
- func (client *Client) OnVoteSet(callback func(msg *messages7.SvVoteSet, defaultAction DefaultAction) error)
- func (client *Client) OnVoteStatus(callback func(msg *messages7.SvVoteStatus, defaultAction DefaultAction) error)
- func (client *Client) OnWeaponPickup(...)
- func (client *Client) Right()
- func (client *Client) SendChat(msg string) error
- func (client *Client) SendChatTeam(msg string) error
- func (client *Client) SendInput() error
- func (client *Client) SendKeepAlive() error
- func (client *Client) SendMessage(msg messages7.NetMessage) (err error)
- func (client *Client) SendPacket(packet *protocol7.Packet) (err error)
- func (client *Client) SendWhisper(targetId int, msg string) error
- func (client *Client) SnapFindCharacter(clientId int) (character *object7.Character, found bool, err error)
- func (client *Client) Stop()
- type DefaultAction
- type DisconnectError
- type Game
- type GameSnap
- type Player
- type UserMsgCallbacks
Constants ¶
const (
UnknownClientId = -1
)
Variables ¶
var ( // ErrProcessPacketFailed is returned when processing a packet failed // This error can be checked in your error handling callback with errors.Is ErrProcessPacketFailed = errors.New("failed to process packet") // ErrUnpackPacketFailed is returned when unpacking a packet failed // This error can be checked in your error handling callback with errors.Is ErrUnpackPacketFailed = errors.New("failed to unpack packet") // ErrProcessGameTickFailed is returned when processing a game tick failed // This error can be checked in your error handling callback with errors.Is ErrProcessGameTickFailed = errors.New("failed to process game tick") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Name string
Clan string
Country int
// chunks to be sent on next packet send
// use client.SendMessage() to put your chunks here
QueuedMessages []messages7.NetMessage
// hooks from the user
Callbacks UserMsgCallbacks
// udp connection
Conn net.Conn
// when the last packet was sent
// tracked to know when to send keepalives
LastSend time.Time
LastInputSend time.Time
// teeworlds session
Session protocol7.Session
// old snapshots used to unpack new deltas
SnapshotStorage *snapshot7.Storage
// teeworlds game state
Game Game
// might be -1 if we do not know our own id yet
LocalClientId int
// cancelation & graceful shutdown handling
// These fields usually do not need to be accessed by the user
// They might only be needed in case you want to change the default behavior
// of the OnDisconnect callback
Ctx context.Context
CancelCause context.CancelCauseFunc
}
func (*Client) ConnectContext ¶
func (*Client) CreateAltSnap ¶
func (client *Client) CreateAltSnap(oldSnap *snapshot7.Snapshot, newSnap *snapshot7.Snapshot) *snapshot7.Snapshot
creates a copy of the new snapshot and evolves the characters to their new predicted position based on their old poisiton and velocity
it should also drop invalid snap items that do not pass validation
func (*Client) OnAccept ¶
func (client *Client) OnAccept(callback func(msg *messages7.CtrlAccept, defaultAction DefaultAction) error)
func (*Client) OnBroadcast ¶
func (client *Client) OnBroadcast(callback func(msg *messages7.SvBroadcast, defaultAction DefaultAction) error)
func (*Client) OnChat ¶
func (client *Client) OnChat(callback func(msg *messages7.SvChat, defaultAction DefaultAction) error)
func (*Client) OnCheckpoint ¶
func (client *Client) OnCheckpoint(callback func(msg *messages7.SvCheckpoint, defaultAction DefaultAction) error)
func (*Client) OnClientDrop ¶
func (client *Client) OnClientDrop(callback func(msg *messages7.SvClientDrop, defaultAction DefaultAction) error)
func (*Client) OnClientInfo ¶
func (client *Client) OnClientInfo(callback func(msg *messages7.SvClientInfo, defaultAction DefaultAction) error)
func (*Client) OnCommandInfo ¶
func (client *Client) OnCommandInfo(callback func(msg *messages7.SvCommandInfo, defaultAction DefaultAction) error)
func (*Client) OnCommandInfoRemove ¶
func (client *Client) OnCommandInfoRemove(callback func(msg *messages7.SvCommandInfoRemove, defaultAction DefaultAction) error)
func (*Client) OnDisconnect ¶
func (client *Client) OnDisconnect(callback func(msg *messages7.CtrlClose, defaultAction DefaultAction) error)
func (*Client) OnEmoticon ¶
func (client *Client) OnEmoticon(callback func(msg *messages7.SvEmoticon, defaultAction DefaultAction) error)
func (*Client) OnError ¶
if not implemented by the user the application might throw and exit
return nil to drop the error return the error or another error in order to shutdown the application.
func (*Client) OnExtraProjectile ¶
func (client *Client) OnExtraProjectile(callback func(msg *messages7.SvExtraProjectile, defaultAction DefaultAction) error)
func (*Client) OnGameInfo ¶
func (client *Client) OnGameInfo(callback func(msg *messages7.SvGameInfo, defaultAction DefaultAction) error)
func (*Client) OnGameMsg ¶
func (client *Client) OnGameMsg(callback func(msg *messages7.SvGameMsg, defaultAction DefaultAction) error)
func (*Client) OnKeepAlive ¶
func (client *Client) OnKeepAlive(callback func(msg *messages7.CtrlKeepAlive, defaultAction DefaultAction) error)
func (*Client) OnKillMsg ¶
func (client *Client) OnKillMsg(callback func(msg *messages7.SvKillMsg, defaultAction DefaultAction) error)
func (*Client) OnMapChange ¶
func (client *Client) OnMapChange(callback func(msg *messages7.MapChange, defaultAction DefaultAction) error)
func (*Client) OnMotd ¶
func (client *Client) OnMotd(callback func(msg *messages7.SvMotd, defaultAction DefaultAction) error)
func (*Client) OnMsgSnap ¶
func (client *Client) OnMsgSnap(callback func(msg *messages7.Snap, defaultAction DefaultAction) error)
You probably want to use OnSnapshot() instead
func (*Client) OnMsgSnapEmpty ¶
func (client *Client) OnMsgSnapEmpty(callback func(msg *messages7.SnapEmpty, defaultAction DefaultAction) error)
You probably want to use OnSnapshot() instead
func (*Client) OnMsgSnapSingle ¶
func (client *Client) OnMsgSnapSingle(callback func(msg *messages7.SnapSingle, defaultAction DefaultAction) error)
You probably want to use OnSnapshot() instead
func (*Client) OnMsgSnapSmall ¶
func (client *Client) OnMsgSnapSmall(callback func(msg *messages7.SnapSmall, defaultAction DefaultAction) error)
You probably want to use OnSnapshot() instead
func (*Client) OnPacket ¶
read incoming traffic and alter it before it hits the internal state machine
return false to drop the packet
func (*Client) OnRaceFinish ¶
func (client *Client) OnRaceFinish(callback func(msg *messages7.SvRaceFinish, defaultAction DefaultAction) error)
func (*Client) OnReadyToEnter ¶
func (client *Client) OnReadyToEnter(callback func(msg *messages7.SvReadyToEnter, defaultAction DefaultAction) error)
func (*Client) OnSendCallVote ¶
func (client *Client) OnSendCallVote(callback func(msg *messages7.ClCallVote) bool)
func (*Client) OnSendCommand ¶
func (*Client) OnSendConReady ¶
func (*Client) OnSendEmoticon ¶
func (client *Client) OnSendEmoticon(callback func(msg *messages7.ClEmoticon) bool)
func (*Client) OnSendEnterGame ¶
func (*Client) OnSendInfo ¶
func (*Client) OnSendInput ¶
func (*Client) OnSendInputTiming ¶
func (client *Client) OnSendInputTiming(callback func(msg *messages7.InputTiming) bool)
func (*Client) OnSendKill ¶
func (*Client) OnSendPacket ¶
inspect outgoing traffic and alter it before it gets sent to the server
return false to drop the packet
func (*Client) OnSendPing ¶
func (*Client) OnSendPingReply ¶
func (*Client) OnSendRconAuth ¶
func (*Client) OnSendRconCmd ¶
func (*Client) OnSendReady ¶
func (*Client) OnSendReadyChange ¶
func (client *Client) OnSendReadyChange(callback func(msg *messages7.ClReadyChange) bool)
func (*Client) OnSendRequestMapData ¶
func (client *Client) OnSendRequestMapData(callback func(msg *messages7.RequestMapData) bool)
func (*Client) OnSendSetSpectatorMode ¶
func (client *Client) OnSendSetSpectatorMode(callback func(msg *messages7.ClSetSpectatorMode) bool)
func (*Client) OnSendSetTeam ¶
func (*Client) OnSendSkinChange ¶
func (client *Client) OnSendSkinChange(callback func(msg *messages7.ClSkinChange) bool)
func (*Client) OnSendStartInfo ¶
func (client *Client) OnSendStartInfo(callback func(msg *messages7.ClStartInfo) bool)
func (*Client) OnSendVote ¶
func (*Client) OnServerInfo ¶
func (client *Client) OnServerInfo(callback func(msg *messages7.ServerInfo, defaultAction DefaultAction) error)
func (*Client) OnServerSettings ¶
func (client *Client) OnServerSettings(callback func(msg *messages7.SvServerSettings, defaultAction DefaultAction) error)
func (*Client) OnSkinChange ¶
func (client *Client) OnSkinChange(callback func(msg *messages7.SvSkinChange, defaultAction DefaultAction) error)
func (*Client) OnSnapshot ¶
func (client *Client) OnSnapshot(callback func(snap *snapshot7.Snapshot, defaultAction DefaultAction) error)
will be called when a snap, snap single or empty snapshot is received if you want to know which type of snapshot was received look at OnMsgSnap(), OnMsgSnapEmpty(), OnMsgSnapSingle(), OnMsgSnapSmall()
func (*Client) OnTeam ¶
func (client *Client) OnTeam(callback func(msg *messages7.SvTeam, defaultAction DefaultAction) error)
func (*Client) OnTick ¶
func (client *Client) OnTick(callback func(defaultAction DefaultAction) error)
func (*Client) OnToken ¶
func (client *Client) OnToken(callback func(msg *messages7.CtrlToken, defaultAction DefaultAction) error)
func (*Client) OnTuneParams ¶
func (client *Client) OnTuneParams(callback func(msg *messages7.SvTuneParams, defaultAction DefaultAction) error)
func (*Client) OnUnknown ¶
func (client *Client) OnUnknown(callback func(msg *messages7.Unknown, defaultAction DefaultAction) error)
func (*Client) OnVoteClearoptions ¶
func (client *Client) OnVoteClearoptions(callback func(msg *messages7.SvVoteClearOptions, defaultAction DefaultAction) error)
func (*Client) OnVoteOptionlistadd ¶
func (client *Client) OnVoteOptionlistadd(callback func(msg *messages7.SvVoteOptionListAdd, defaultAction DefaultAction) error)
func (*Client) OnVoteOptionremove ¶
func (client *Client) OnVoteOptionremove(callback func(msg *messages7.SvVoteOptionRemove, defaultAction DefaultAction) error)
func (*Client) OnVotePptionadd ¶
func (client *Client) OnVotePptionadd(callback func(msg *messages7.SvVoteOptionAdd, defaultAction DefaultAction) error)
func (*Client) OnVoteSet ¶
func (client *Client) OnVoteSet(callback func(msg *messages7.SvVoteSet, defaultAction DefaultAction) error)
func (*Client) OnVoteStatus ¶
func (client *Client) OnVoteStatus(callback func(msg *messages7.SvVoteStatus, defaultAction DefaultAction) error)
func (*Client) OnWeaponPickup ¶
func (client *Client) OnWeaponPickup(callback func(msg *messages7.SvWeaponPickup, defaultAction DefaultAction) error)
func (*Client) SendChatTeam ¶
see also SendWhisper() see also SendChat()
func (*Client) SendInput ¶
Example of walking left
client.Game.Input.Direction = -1 client.SendInput()
see also:
Right() Left() Stop() Jump() Fire() Hook() Aim(x, y)
func (*Client) SendKeepAlive ¶
func (*Client) SendMessage ¶
func (client *Client) SendMessage(msg messages7.NetMessage) (err error)
WARNING! this is does not send chat messages this sends a network chunk and is for expert users
if you want to send a chat message use SendChat()
func (*Client) SendWhisper ¶
see also SendChat() see also SendChatTeam()
func (*Client) SnapFindCharacter ¶
func (client *Client) SnapFindCharacter(clientId int) (character *object7.Character, found bool, err error)
TODO: add this for all items and move it to a different file
this would be more useful to have on the Snapshot struct directly so it can be used everywhere not only in a client and the client then can just wrap it to acces the alt snap
type DefaultAction ¶
type DefaultAction func() error
Processes the incoming packet It might print to the console It might send a response packet
type DisconnectError ¶
type DisconnectError struct {
// Reason is the reason why we were disconnected
Reason string
}
This error is set as cancel cause in case that we are disconnected from the server This makes the error tangible for the user It can be checked with errors.As
func (DisconnectError) Error ¶
func (e DisconnectError) Error() string
type GameSnap ¶
type GameSnap struct {
PlayerInputs []*object7.PlayerInput
Projectiles []*object7.Projectile
Lasers []*object7.Laser
Pickups []*object7.Pickup
Flags []*object7.Flag
GameDatas []*object7.GameData
GameDataTeams []*object7.GameDataTeam
GameDataFlags []*object7.GameDataFlag
Characters []*object7.Character
PlayerInfos []*object7.PlayerInfo
SpectatorInfos []*object7.SpectatorInfo
DeClientInfos []*object7.DeClientInfo
DeGameInfos []*object7.DeGameInfo
DeTuneParamss []*object7.DeTuneParams
Explosions []*object7.Explosion
Spawns []*object7.Spawn
HammerHits []*object7.HammerHit
Deaths []*object7.Death
SoundWorlds []*object7.SoundWorld
Damages []*object7.Damage
PlayerInfoRaces []*object7.PlayerInfoRace
GameDataRaces []*object7.GameDataRace
Unknowns []*object7.Unknown
}
type Player ¶
type Player struct {
Info messages7.SvClientInfo
}
type UserMsgCallbacks ¶
type UserMsgCallbacks struct {
Tick []func(DefaultAction) error
// return false to drop the packet
PacketIn []func(*protocol7.Packet) bool
// return false to drop the packet
PacketOut []func(*protocol7.Packet) bool
// return false to drop the message
MessageOut []func(*messages7.NetMessage) bool
// ctrl out
CtrlKeepAliveOut []func(*messages7.CtrlKeepAlive) bool
CtrlConnectOut []func(*messages7.CtrlConnect) bool
CtrlAcceptOut []func(*messages7.CtrlAccept) bool
CtrlTokenOut []func(*messages7.CtrlToken) bool
CtrlCloseOut []func(*messages7.CtrlClose) bool
// sys out
SysInfoOut []func(*messages7.Info) bool
SysMapChangeOut []func(*messages7.MapChange) bool
SysMapDataOut []func(*messages7.MapData) bool
SysServerInfoOut []func(*messages7.ServerInfo) bool
SysConReadyOut []func(*messages7.ConReady) bool
SysSnapOut []func(*messages7.Snap) bool
SysSnapEmptyOut []func(*messages7.SnapEmpty) bool
SysSnapSingleOut []func(*messages7.SnapSingle) bool
SysSnapSmallOut []func(*messages7.SnapSmall) bool
SysInputTimingOut []func(*messages7.InputTiming) bool
SysRconAuthOnOut []func(*messages7.RconAuthOn) bool
SysRconAuthOffOut []func(*messages7.RconAuthOff) bool
SysRconLineOut []func(*messages7.RconLine) bool
SysRconCmdAddOut []func(*messages7.RconCmdAdd) bool
SysRconCmdRemOut []func(*messages7.RconCmdRem) bool
SysAuthChallengeOut []func(*messages7.AuthChallenge) bool
SysAuthResultOut []func(*messages7.AuthResult) bool
SysReadyOut []func(*messages7.Ready) bool
SysEnterGameOut []func(*messages7.EnterGame) bool
SysInputOut []func(*messages7.Input) bool
SysRconCmdOut []func(*messages7.RconCmd) bool
SysRconAuthOut []func(*messages7.RconAuth) bool
SysRequestMapDataOut []func(*messages7.RequestMapData) bool
SysAuthStartOut []func(*messages7.AuthStart) bool
SysAuthResponseOut []func(*messages7.AuthResponse) bool
SysPingOut []func(*messages7.Ping) bool
SysPingReplyOut []func(*messages7.PingReply) bool
SysErrorOut []func(*messages7.Error) bool
SysMaplistEntryAddOut []func(*messages7.MaplistEntryAdd) bool
SysMaplistEntryRemOut []func(*messages7.MaplistEntryRem) bool
// game out
GameSvMotdOut []func(*messages7.SvMotd) bool
GameSvBroadcastOut []func(*messages7.SvBroadcast) bool
GameSvChatOut []func(*messages7.SvChat) bool
GameSvTeamOut []func(*messages7.SvTeam) bool
GameSvKillMsgOut []func(*messages7.SvKillMsg) bool
GameSvTuneParamsOut []func(*messages7.SvTuneParams) bool
GameSvExtraProjectileOut []func(*messages7.SvExtraProjectile) bool
GameSvReadyToEnterOut []func(*messages7.SvReadyToEnter) bool
GameSvWeaponPickupOut []func(*messages7.SvWeaponPickup) bool
GameSvEmoticonOut []func(*messages7.SvEmoticon) bool
GameSvVoteClearOptionsOut []func(*messages7.SvVoteClearOptions) bool
GameSvVoteOptionListAddOut []func(*messages7.SvVoteOptionListAdd) bool
GameSvVoteOptionAddOut []func(*messages7.SvVoteOptionAdd) bool
GameSvVoteOptionRemoveOut []func(*messages7.SvVoteOptionRemove) bool
GameSvVoteSetOut []func(*messages7.SvVoteSet) bool
GameSvVoteStatusOut []func(*messages7.SvVoteStatus) bool
GameSvServerSettingsOut []func(*messages7.SvServerSettings) bool
GameSvClientInfoOut []func(*messages7.SvClientInfo) bool
GameSvGameInfoOut []func(*messages7.SvGameInfo) bool
GameSvClientDropOut []func(*messages7.SvClientDrop) bool
GameSvGameMsgOut []func(*messages7.SvGameMsg) bool
GameDeClientEnterOut []func(*messages7.DeClientEnter) bool
GameDeClientLeaveOut []func(*messages7.DeClientLeave) bool
GameClSayOut []func(*messages7.ClSay) bool
GameClSetTeamOut []func(*messages7.ClSetTeam) bool
GameClSetSpectatorModeOut []func(*messages7.ClSetSpectatorMode) bool
GameClStartInfoOut []func(*messages7.ClStartInfo) bool
GameClKillOut []func(*messages7.ClKill) bool
GameClReadyChangeOut []func(*messages7.ClReadyChange) bool
GameClEmoticonOut []func(*messages7.ClEmoticon) bool
GameClVoteOut []func(*messages7.ClVote) bool
GameClCallVoteOut []func(*messages7.ClCallVote) bool
GameSvSkinChangeOut []func(*messages7.SvSkinChange) bool
GameClSkinChangeOut []func(*messages7.ClSkinChange) bool
GameSvRaceFinishOut []func(*messages7.SvRaceFinish) bool
GameSvCheckpointOut []func(*messages7.SvCheckpoint) bool
GameSvCommandInfoOut []func(*messages7.SvCommandInfo) bool
GameSvCommandInfoRemoveOut []func(*messages7.SvCommandInfoRemove) bool
GameClCommandOut []func(*messages7.ClCommand) bool
// return false to drop the error (ignore it)
//
// return true to pass the error on and finally throw
InternalError []func(error) error
MsgUnknown []func(*messages7.Unknown, DefaultAction) error
Snapshot []func(*snapshot7.Snapshot, DefaultAction) error
CtrlKeepAlive []func(*messages7.CtrlKeepAlive, DefaultAction) error
CtrlConnect []func(*messages7.CtrlConnect, DefaultAction) error
CtrlAccept []func(*messages7.CtrlAccept, DefaultAction) error
CtrlToken []func(*messages7.CtrlToken, DefaultAction) error
CtrlClose []func(*messages7.CtrlClose, DefaultAction) error
SysInfo []func(*messages7.Info, DefaultAction) error
SysMapChange []func(*messages7.MapChange, DefaultAction) error
SysMapData []func(*messages7.MapData, DefaultAction) error
SysServerInfo []func(*messages7.ServerInfo, DefaultAction) error
SysConReady []func(*messages7.ConReady, DefaultAction) error
SysSnap []func(*messages7.Snap, DefaultAction) error
SysSnapEmpty []func(*messages7.SnapEmpty, DefaultAction) error
SysSnapSingle []func(*messages7.SnapSingle, DefaultAction) error
SysSnapSmall []func(*messages7.SnapSmall, DefaultAction) error
SysInputTiming []func(*messages7.InputTiming, DefaultAction) error
SysRconAuthOn []func(*messages7.RconAuthOn, DefaultAction) error
SysRconAuthOff []func(*messages7.RconAuthOff, DefaultAction) error
SysRconLine []func(*messages7.RconLine, DefaultAction) error
SysRconCmdAdd []func(*messages7.RconCmdAdd, DefaultAction) error
SysRconCmdRem []func(*messages7.RconCmdRem, DefaultAction) error
SysAuthChallenge []func(*messages7.AuthChallenge, DefaultAction) error
SysAuthResult []func(*messages7.AuthResult, DefaultAction) error
SysReady []func(*messages7.Ready, DefaultAction) error
SysEnterGame []func(*messages7.EnterGame, DefaultAction) error
SysInput []func(*messages7.Input, DefaultAction) error
SysRconCmd []func(*messages7.RconCmd, DefaultAction) error
SysRconAuth []func(*messages7.RconAuth, DefaultAction) error
SysRequestMapData []func(*messages7.RequestMapData, DefaultAction) error
SysAuthStart []func(*messages7.AuthStart, DefaultAction) error
SysAuthResponse []func(*messages7.AuthResponse, DefaultAction) error
SysPing []func(*messages7.Ping, DefaultAction) error
SysPingReply []func(*messages7.PingReply, DefaultAction) error
SysError []func(*messages7.Error, DefaultAction) error
SysMaplistEntryAdd []func(*messages7.MaplistEntryAdd, DefaultAction) error
SysMaplistEntryRem []func(*messages7.MaplistEntryRem, DefaultAction) error
GameSvMotd []func(*messages7.SvMotd, DefaultAction) error
GameSvBroadcast []func(*messages7.SvBroadcast, DefaultAction) error
GameSvChat []func(*messages7.SvChat, DefaultAction) error
GameSvTeam []func(*messages7.SvTeam, DefaultAction) error
GameSvKillMsg []func(*messages7.SvKillMsg, DefaultAction) error
GameSvTuneParams []func(*messages7.SvTuneParams, DefaultAction) error
GameSvExtraProjectile []func(*messages7.SvExtraProjectile, DefaultAction) error
GameSvReadyToEnter []func(*messages7.SvReadyToEnter, DefaultAction) error
GameSvWeaponPickup []func(*messages7.SvWeaponPickup, DefaultAction) error
GameSvEmoticon []func(*messages7.SvEmoticon, DefaultAction) error
GameSvVoteClearOptions []func(*messages7.SvVoteClearOptions, DefaultAction) error
GameSvVoteOptionListAdd []func(*messages7.SvVoteOptionListAdd, DefaultAction) error
GameSvVoteOptionAdd []func(*messages7.SvVoteOptionAdd, DefaultAction) error
GameSvVoteOptionRemove []func(*messages7.SvVoteOptionRemove, DefaultAction) error
GameSvVoteSet []func(*messages7.SvVoteSet, DefaultAction) error
GameSvVoteStatus []func(*messages7.SvVoteStatus, DefaultAction) error
GameSvServerSettings []func(*messages7.SvServerSettings, DefaultAction) error
GameSvClientInfo []func(*messages7.SvClientInfo, DefaultAction) error
GameSvGameInfo []func(*messages7.SvGameInfo, DefaultAction) error
GameSvClientDrop []func(*messages7.SvClientDrop, DefaultAction) error
GameSvGameMsg []func(*messages7.SvGameMsg, DefaultAction) error
GameDeClientEnter []func(*messages7.DeClientEnter, DefaultAction) error
GameDeClientLeave []func(*messages7.DeClientLeave, DefaultAction) error
GameClSay []func(*messages7.ClSay, DefaultAction) error
GameClSetTeam []func(*messages7.ClSetTeam, DefaultAction) error
GameClSetSpectatorMode []func(*messages7.ClSetSpectatorMode, DefaultAction) error
GameClStartInfo []func(*messages7.ClStartInfo, DefaultAction) error
GameClKill []func(*messages7.ClKill, DefaultAction) error
GameClReadyChange []func(*messages7.ClReadyChange, DefaultAction) error
GameClEmoticon []func(*messages7.ClEmoticon, DefaultAction) error
GameClVote []func(*messages7.ClVote, DefaultAction) error
GameClCallVote []func(*messages7.ClCallVote, DefaultAction) error
GameSvSkinChange []func(*messages7.SvSkinChange, DefaultAction) error
GameClSkinChange []func(*messages7.ClSkinChange, DefaultAction) error
GameSvRaceFinish []func(*messages7.SvRaceFinish, DefaultAction) error
GameSvCheckpoint []func(*messages7.SvCheckpoint, DefaultAction) error
GameSvCommandInfo []func(*messages7.SvCommandInfo, DefaultAction) error
GameSvCommandInfoRemove []func(*messages7.SvCommandInfoRemove, DefaultAction) error
GameClCommand []func(*messages7.ClCommand, DefaultAction) error
}
TODO: this should be a map but the type checker broke me
// key is the network7.MessageId UserMsgCallbacks map[int]UserMsgCallback