flags

package
v1.0.278 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2025 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NoHealth       = 1 << 0
	NoItems        = 1 << 1
	WeaponsStay    = 1 << 2
	NoFalling      = 1 << 3
	InstantItems   = 1 << 4
	SameLevel      = 1 << 5
	SkinTeams      = 1 << 6
	ModelTeams     = 1 << 7
	NoFriendlyFire = 1 << 8
	SpawnFarthest  = 1 << 9
	ForceRespawn   = 1 << 10
	NoArmor        = 1 << 11
	AllowExit      = 1 << 12
	InfiniteAmmo   = 1 << 13
	QuadDrop       = 1 << 14
	FixedFOV       = 1 << 15
)

Variables

View Source
var (
	FreeForAllServer = WeaponsStay | InstantItems | ForceRespawn
	TDMServer        = SpawnFarthest | ForceRespawn | QuadDrop
)

Functions

func Modify

func Modify(val int, inst string) int

Modify will return a new dmflag value based on a string of instructions. Each instruction should be prefixed with either "+" or "-" for including or excluding and separated by spaces. Each is an abbreviation of the related flag, e.g. "ia" for "infinite ammo", "qd" for "quad drop", etc.

func ToString

func ToString(f int) string

ToSring will return a string representing the dmflags in english. The flags will be comma delimited and sorted alphabetically (ascending).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL