Documentation ¶
Index ¶
- Variables
- func NewCasualClock(s Server, m HasTimers) *casualClock
- func NewCompetitiveClock(s Server, m HasTimers) *competitiveClock
- type BySizeAndScore
- type CTF
- type CTFMode
- type CaptureMode
- type Clock
- type Competitive
- 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() []byte
- type Server
- type Tactics
- type TacticsTeam
- type Team
- type TeamMode
- type Teamplay
- func (m Teamplay) CleanUp()
- func (m Teamplay) HandlePacket(p *Player, packetType nmc.ID, pkt *protocol.Packet) bool
- func (*Teamplay) ID() gamemode.ID
- func (m Teamplay) NeedsMapInfo() bool
- func (m Teamplay) Pause()
- func (m Teamplay) PickupsInitPacket() []interface{}
- 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 ¶
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) HandlePacket ¶
func (*CTF) NeedsMapInfo ¶
func (CTF) PickupsInitPacket ¶
func (m CTF) PickupsInitPacket() []interface{}
func (*CTF) Spawn ¶
func (*CTF) Spawn(ps *PlayerState)
type CaptureMode ¶
type Competitive ¶
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) HandlePacket ¶
func (FFA) NeedsMapInfo ¶
func (m FFA) NeedsMapInfo() bool
func (FFA) PickupsInitPacket ¶
func (m FFA) PickupsInitPacket() []interface{}
func (*FFA) Spawn ¶
func (*FFA) Spawn(ps *PlayerState)
type HandlesPackets ¶
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() []interface{} }
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 // 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 int Deaths int Teamkills int DamagePotential int32 Damage int32 Flags int }
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() []byte
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) HandlePacket ¶
func (Teamplay) NeedsMapInfo ¶
func (m Teamplay) NeedsMapInfo() bool
func (Teamplay) PickupsInitPacket ¶
func (m Teamplay) PickupsInitPacket() []interface{}
func (*Teamplay) Spawn ¶
func (*Teamplay) Spawn(ps *PlayerState)
Click to show internal directories.
Click to hide internal directories.