Documentation
¶
Index ¶
- Variables
- func NewCasualClock(s Server, m HasTimers) *casualClock
- func NewCompetitiveClock(s Server, m HasTimers) *competitiveClock
- func NewEndlessClock(s Server, m HasTimers) *endlessClock
- type BySizeAndScore
- type CTF
- type CTFMode
- type CaptureMode
- type Clock
- type Competitive
- type CoopEdit
- func (*CoopEdit) CanSpawn(*Player) bool
- func (m CoopEdit) CleanUp()
- func (m CoopEdit) HandleFrag(actor, victim *Player)
- func (m *CoopEdit) HandlePacket(p *Player, message P.Message) bool
- func (*CoopEdit) ID() gamemode.ID
- func (m CoopEdit) Leave(*Player)
- func (m CoopEdit) NeedsMapInfo() bool
- func (m CoopEdit) Pause()
- func (m CoopEdit) PickupsInitPacket() P.Message
- func (m CoopEdit) Resume()
- func (*CoopEdit) Spawn(ps *PlayerState)
- type Effic
- type EfficCTF
- type EfficTeam
- type FFA
- type FlagMode
- type HandlesPackets
- type HasTimers
- type Insta
- type InstaCTF
- type InstaTeam
- type Mode
- type PickupMode
- type Player
- type PlayerState
- func (ps *PlayerState) CanPickup(p *timedPickup) bool
- func (ps *PlayerState) Die()
- func (ps *PlayerState) Pickup(p *timedPickup)
- func (ps *PlayerState) Reset()
- func (ps *PlayerState) SelectWeapon(id weapon.ID) (weapon.Weapon, bool)
- func (ps *PlayerState) Spawn()
- func (ps *PlayerState) ToWire() protocol.EntityState
- type Server
- type Tactics
- type TacticsTeam
- type Team
- type TeamMode
- type Teamplay
- func (m Teamplay) CleanUp()
- func (m Teamplay) HandlePacket(p *Player, message P.Message) bool
- func (*Teamplay) ID() gamemode.ID
- func (m Teamplay) NeedsMapInfo() bool
- func (m Teamplay) Pause()
- func (m Teamplay) PickupsInitPacket() P.Message
- func (m Teamplay) Resume()
- func (*Teamplay) Spawn(ps *PlayerState)
Constants ¶
This section is empty.
Variables ¶
View Source
var NoTeam = &Team{Name: "none"}
Functions ¶
func NewCasualClock ¶
func NewCompetitiveClock ¶
func NewEndlessClock ¶
Types ¶
type BySizeAndScore ¶
type BySizeAndScore []*Team
sorts teams ascending by size, then score
func (BySizeAndScore) Len ¶
func (teams BySizeAndScore) Len() int
func (BySizeAndScore) Less ¶
func (teams BySizeAndScore) Less(i, j int) bool
func (BySizeAndScore) Swap ¶
func (teams BySizeAndScore) Swap(i, j int)
type CTF ¶
type CTF struct {
// contains filtered or unexported fields
}
func (*CTF) NeedsMapInfo ¶
func (CTF) PickupsInitPacket ¶
func (*CTF) Spawn ¶
func (*CTF) Spawn(ps *PlayerState)
type CaptureMode ¶
type Competitive ¶
type CoopEdit ¶
type CoopEdit struct {
// contains filtered or unexported fields
}
func NewCoopEdit ¶
func (CoopEdit) HandleFrag ¶
func (m CoopEdit) HandleFrag(actor, victim *Player)
func (CoopEdit) NeedsMapInfo ¶
func (m CoopEdit) NeedsMapInfo() bool
func (CoopEdit) PickupsInitPacket ¶
func (*CoopEdit) Spawn ¶
func (*CoopEdit) Spawn(ps *PlayerState)
type Effic ¶
type Effic struct {
// contains filtered or unexported fields
}
func (*Effic) NeedsMapInfo ¶
func (*Effic) NeedsMapInfo() bool
func (*Effic) Spawn ¶
func (*Effic) Spawn(ps *PlayerState)
type EfficCTF ¶
type EfficCTF struct {
// contains filtered or unexported fields
}
func NewEfficCTF ¶
func (*EfficCTF) Spawn ¶
func (*EfficCTF) Spawn(ps *PlayerState)
type EfficTeam ¶
type EfficTeam struct {
// contains filtered or unexported fields
}
func NewEfficTeam ¶
func (*EfficTeam) NeedsMapInfo ¶
func (*EfficTeam) NeedsMapInfo() bool
func (*EfficTeam) Spawn ¶
func (*EfficTeam) Spawn(ps *PlayerState)
type FFA ¶
type FFA struct {
// contains filtered or unexported fields
}
func (FFA) NeedsMapInfo ¶
func (m FFA) NeedsMapInfo() bool
func (FFA) PickupsInitPacket ¶
func (*FFA) Spawn ¶
func (*FFA) Spawn(ps *PlayerState)
type Insta ¶
type Insta struct {
// contains filtered or unexported fields
}
func (*Insta) NeedsMapInfo ¶
func (*Insta) NeedsMapInfo() bool
func (*Insta) Spawn ¶
func (*Insta) Spawn(ps *PlayerState)
type InstaCTF ¶
type InstaCTF struct {
// contains filtered or unexported fields
}
func NewInstaCTF ¶
func (*InstaCTF) Spawn ¶
func (*InstaCTF) Spawn(ps *PlayerState)
type InstaTeam ¶
type InstaTeam struct {
// contains filtered or unexported fields
}
func NewInstaTeam ¶
func (*InstaTeam) NeedsMapInfo ¶
func (*InstaTeam) NeedsMapInfo() bool
func (*InstaTeam) Spawn ¶
func (*InstaTeam) Spawn(ps *PlayerState)
type PickupMode ¶
type PickupMode interface { HandlesPackets NeedsMapInfo() bool PickupsInitPacket() P.Message }
type Player ¶
type Player struct { CN uint32 Name string Team *Team Model int32 Position *geom.Vector PlayerState }
func (*Player) ApplyDamage ¶
type PlayerState ¶
type PlayerState struct { State playerstate.ID // The user's state before entering edit mode EditState playerstate.ID // fields that reset at spawn LastSpawnAttempt time.Time QuadTimer *timer.Timer LastShot time.Time GunReloadEnd time.Time // reset at spawn to value depending on mode Health int32 Armour int32 ArmourType armour.ID SelectedWeapon weapon.Weapon Ammo map[weapon.ID]int32 // weapon → ammo // reset at map change LifeSequence int32 LastDeath time.Time MaxHealth int32 Frags int32 Deaths int32 Teamkills int32 DamagePotential int32 Damage int32 Flags int32 }
func NewPlayerState ¶
func NewPlayerState() PlayerState
func (*PlayerState) CanPickup ¶
func (ps *PlayerState) CanPickup(p *timedPickup) bool
func (*PlayerState) Die ¶
func (ps *PlayerState) Die()
func (*PlayerState) Pickup ¶
func (ps *PlayerState) Pickup(p *timedPickup)
func (*PlayerState) SelectWeapon ¶
func (*PlayerState) Spawn ¶
func (ps *PlayerState) Spawn()
func (*PlayerState) ToWire ¶
func (ps *PlayerState) ToWire() protocol.EntityState
type Tactics ¶
type Tactics struct {
// contains filtered or unexported fields
}
func NewTactics ¶
func (*Tactics) NeedsMapInfo ¶
func (*Tactics) NeedsMapInfo() bool
func (*Tactics) Spawn ¶
func (*Tactics) Spawn(ps *PlayerState)
type TacticsTeam ¶
type TacticsTeam struct {
// contains filtered or unexported fields
}
func NewTacticsTeam ¶
func NewTacticsTeam(s Server, keepTeams bool) *TacticsTeam
func (*TacticsTeam) ID ¶
func (*TacticsTeam) ID() gamemode.ID
func (*TacticsTeam) NeedsMapInfo ¶
func (*TacticsTeam) NeedsMapInfo() bool
func (*TacticsTeam) Spawn ¶
func (*TacticsTeam) Spawn(ps *PlayerState)
type Teamplay ¶
type Teamplay struct {
// contains filtered or unexported fields
}
func NewTeamplay ¶
func (Teamplay) NeedsMapInfo ¶
func (m Teamplay) NeedsMapInfo() bool
func (Teamplay) PickupsInitPacket ¶
func (*Teamplay) Spawn ¶
func (*Teamplay) Spawn(ps *PlayerState)
Click to show internal directories.
Click to hide internal directories.