spot

package
v0.1.73 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spot

type Spot struct {

	// Map is the base map's name, such as dl_midtown.
	Map string `protobuf:"bytes,1,opt,name=map,proto3" json:"map,omitempty"`
	// Models are the model paths the objects use, such as
	// models/props/crate.vmdl, each once. A mode precaches the models of the
	// spots it loads.
	Models []string `protobuf:"bytes,2,rep,name=models,proto3" json:"models,omitempty"`
	// Builders are the Steam IDs of the players who placed objects, each once.
	Builders []uint64 `protobuf:"fixed64,3,rep,packed,name=builders,proto3" json:"builders,omitempty"`
	// Objects are the placed objects in placement order.
	Objects []*SpotObject `protobuf:"bytes,4,rep,name=objects,proto3" json:"objects,omitempty"`
	// contains filtered or unexported fields
}

Spot is a base map and the objects players placed on it. A mode loads a spot by spawning each object on the compiled map; nothing is compiled. Objects name their model and builder by index into the spot's tables, so a spot of a few hundred objects fits in a few kilobytes. Every field is a scalar or a list, so encoding a spot twice yields the same bytes.

func (*Spot) CloneMessageVT

func (m *Spot) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Spot) CloneVT

func (m *Spot) CloneVT() *Spot

func (*Spot) EqualMessageVT

func (this *Spot) EqualMessageVT(thatMsg any) bool

func (*Spot) EqualVT

func (this *Spot) EqualVT(that *Spot) bool

func (*Spot) GetBuilders

func (x *Spot) GetBuilders() []uint64

func (*Spot) GetMap

func (x *Spot) GetMap() string

func (*Spot) GetModels

func (x *Spot) GetModels() []string

func (*Spot) GetObjects

func (x *Spot) GetObjects() []*SpotObject

func (*Spot) MarshalJSON

func (x *Spot) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Spot to JSON.

func (*Spot) MarshalProtoJSON

func (x *Spot) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Spot message to JSON.

func (*Spot) MarshalProtoText

func (x *Spot) MarshalProtoText() string

func (*Spot) MarshalToSizedBufferVT

func (m *Spot) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Spot) MarshalToVT

func (m *Spot) MarshalToVT(dAtA []byte) (int, error)

func (*Spot) MarshalVT

func (m *Spot) MarshalVT() (dAtA []byte, err error)

func (*Spot) ProtoMessage

func (*Spot) ProtoMessage()

func (*Spot) Reset

func (x *Spot) Reset()

func (*Spot) SizeVT

func (m *Spot) SizeVT() (n int)

func (*Spot) String

func (x *Spot) String() string

func (*Spot) UnmarshalJSON

func (x *Spot) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Spot from JSON.

func (*Spot) UnmarshalProtoJSON

func (x *Spot) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Spot message from JSON.

func (*Spot) UnmarshalVT

func (m *Spot) UnmarshalVT(dAtA []byte) error

type SpotObject

type SpotObject struct {

	// Model indexes the spot's models.
	Model uint32 `protobuf:"varint,1,opt,name=model,proto3" json:"model,omitempty"`
	// X, Y and Z are the model's origin.
	X float32 `protobuf:"fixed32,2,opt,name=x,proto3" json:"x,omitempty"`
	Y float32 `protobuf:"fixed32,3,opt,name=y,proto3" json:"y,omitempty"`
	Z float32 `protobuf:"fixed32,4,opt,name=z,proto3" json:"z,omitempty"`
	// Pitch, yaw and roll are the model's rotation, in degrees.
	Pitch float32 `protobuf:"fixed32,5,opt,name=pitch,proto3" json:"pitch,omitempty"`
	Yaw   float32 `protobuf:"fixed32,6,opt,name=yaw,proto3" json:"yaw,omitempty"`
	Roll  float32 `protobuf:"fixed32,7,opt,name=roll,proto3" json:"roll,omitempty"`
	// Scale multiplies the model's size; zero means 1.
	Scale float32 `protobuf:"fixed32,8,opt,name=scale,proto3" json:"scale,omitempty"`
	// Bounce launches a hero who lands on the object upward at this speed, in
	// units per second. Zero makes an ordinary object.
	Bounce float32 `protobuf:"fixed32,9,opt,name=bounce,proto3" json:"bounce,omitempty"`
	// Builder indexes the spot's builders, plus one; zero means nobody.
	Builder uint32 `protobuf:"varint,10,opt,name=builder,proto3" json:"builder,omitempty"`
	// contains filtered or unexported fields
}

SpotObject is one solid object placed in a spot.

func (*SpotObject) CloneMessageVT

func (m *SpotObject) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SpotObject) CloneVT

func (m *SpotObject) CloneVT() *SpotObject

func (*SpotObject) EqualMessageVT

func (this *SpotObject) EqualMessageVT(thatMsg any) bool

func (*SpotObject) EqualVT

func (this *SpotObject) EqualVT(that *SpotObject) bool

func (*SpotObject) GetBounce

func (x *SpotObject) GetBounce() float32

func (*SpotObject) GetBuilder

func (x *SpotObject) GetBuilder() uint32

func (*SpotObject) GetModel

func (x *SpotObject) GetModel() uint32

func (*SpotObject) GetPitch

func (x *SpotObject) GetPitch() float32

func (*SpotObject) GetRoll

func (x *SpotObject) GetRoll() float32

func (*SpotObject) GetScale

func (x *SpotObject) GetScale() float32

func (*SpotObject) GetX

func (x *SpotObject) GetX() float32

func (*SpotObject) GetY

func (x *SpotObject) GetY() float32

func (*SpotObject) GetYaw

func (x *SpotObject) GetYaw() float32

func (*SpotObject) GetZ

func (x *SpotObject) GetZ() float32

func (*SpotObject) MarshalJSON

func (x *SpotObject) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SpotObject to JSON.

func (*SpotObject) MarshalProtoJSON

func (x *SpotObject) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SpotObject message to JSON.

func (*SpotObject) MarshalProtoText

func (x *SpotObject) MarshalProtoText() string

func (*SpotObject) MarshalToSizedBufferVT

func (m *SpotObject) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SpotObject) MarshalToVT

func (m *SpotObject) MarshalToVT(dAtA []byte) (int, error)

func (*SpotObject) MarshalVT

func (m *SpotObject) MarshalVT() (dAtA []byte, err error)

func (*SpotObject) ProtoMessage

func (*SpotObject) ProtoMessage()

func (*SpotObject) Reset

func (x *SpotObject) Reset()

func (*SpotObject) SizeVT

func (m *SpotObject) SizeVT() (n int)

func (*SpotObject) String

func (x *SpotObject) String() string

func (*SpotObject) UnmarshalJSON

func (x *SpotObject) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SpotObject from JSON.

func (*SpotObject) UnmarshalProtoJSON

func (x *SpotObject) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SpotObject message from JSON.

func (*SpotObject) UnmarshalVT

func (m *SpotObject) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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