Help us shape the future of Go! Take the 2026 Go Developer Survey

combat

package
v0.1.58 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DamageEvent

type DamageEvent struct {

	// Victim is the entity taking the hit.
	Victim uint32 `protobuf:"varint,1,opt,name=victim,proto3" json:"victim,omitempty"`
	// Attacker is the entity credited with the hit. Zero makes the hit a
	// hazard, such as poison gas, which credits no one and ignores the
	// inflictor and hit group.
	Attacker uint32 `protobuf:"varint,2,opt,name=attacker,proto3" json:"attacker,omitempty"`
	// Inflictor is what delivered the hit, such as a projectile.
	Inflictor uint32 `protobuf:"varint,3,opt,name=inflictor,proto3" json:"inflictor,omitempty"`
	// Ability is the ability that dealt the hit.
	Ability uint32 `protobuf:"varint,4,opt,name=ability,proto3" json:"ability,omitempty"`
	// Flags are the game's damage flags.
	Flags uint64 `protobuf:"varint,5,opt,name=flags,proto3" json:"flags,omitempty"`
	// HitGroup is the body part hit; 1 is the head and -1 means none.
	HitGroup int32 `protobuf:"varint,6,opt,name=hit_group,json=hitGroup,proto3" json:"hitGroup,omitempty"`
	// Amount is the hit's damage before resistances.
	Amount float32 `protobuf:"fixed32,7,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

DamageEvent is one hit before the game applies it. Handles are zero when the game names no such entity.

func (*DamageEvent) CloneMessageVT

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

func (*DamageEvent) CloneVT

func (m *DamageEvent) CloneVT() *DamageEvent

func (*DamageEvent) EqualMessageVT

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

func (*DamageEvent) EqualVT

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

func (*DamageEvent) GetAbility

func (x *DamageEvent) GetAbility() uint32

func (*DamageEvent) GetAmount

func (x *DamageEvent) GetAmount() float32

func (*DamageEvent) GetAttacker

func (x *DamageEvent) GetAttacker() uint32

func (*DamageEvent) GetFlags

func (x *DamageEvent) GetFlags() uint64

func (*DamageEvent) GetHitGroup

func (x *DamageEvent) GetHitGroup() int32

func (*DamageEvent) GetInflictor

func (x *DamageEvent) GetInflictor() uint32

func (*DamageEvent) GetVictim

func (x *DamageEvent) GetVictim() uint32

func (*DamageEvent) MarshalJSON

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

MarshalJSON marshals the DamageEvent to JSON.

func (*DamageEvent) MarshalProtoJSON

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

MarshalProtoJSON marshals the DamageEvent message to JSON.

func (*DamageEvent) MarshalProtoText

func (x *DamageEvent) MarshalProtoText() string

func (*DamageEvent) MarshalToSizedBufferVT

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

func (*DamageEvent) MarshalToVT

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

func (*DamageEvent) MarshalVT

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

func (*DamageEvent) ProtoMessage

func (*DamageEvent) ProtoMessage()

func (*DamageEvent) Reset

func (x *DamageEvent) Reset()

func (*DamageEvent) SizeVT

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

func (*DamageEvent) String

func (x *DamageEvent) String() string

func (*DamageEvent) UnmarshalJSON

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

UnmarshalJSON unmarshals the DamageEvent from JSON.

func (*DamageEvent) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the DamageEvent message from JSON.

func (*DamageEvent) UnmarshalVT

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

type DamageResult

type DamageResult struct {

	// Block cancels the hit's health loss, force, effects and procs.
	Block *bool `protobuf:"varint,1,opt,name=block,proto3,oneof" json:"block,omitempty"`
	// Amount replaces the hit's damage when present.
	Amount *float32 `protobuf:"fixed32,2,opt,name=amount,proto3,oneof" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

DamageResult answers a DamageEvent. An empty result lets the hit through.

func (*DamageResult) CloneMessageVT

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

func (*DamageResult) CloneVT

func (m *DamageResult) CloneVT() *DamageResult

func (*DamageResult) EqualMessageVT

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

func (*DamageResult) EqualVT

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

func (*DamageResult) GetAmount

func (x *DamageResult) GetAmount() float32

func (*DamageResult) GetBlock

func (x *DamageResult) GetBlock() bool

func (*DamageResult) MarshalJSON

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

MarshalJSON marshals the DamageResult to JSON.

func (*DamageResult) MarshalProtoJSON

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

MarshalProtoJSON marshals the DamageResult message to JSON.

func (*DamageResult) MarshalProtoText

func (x *DamageResult) MarshalProtoText() string

func (*DamageResult) MarshalToSizedBufferVT

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

func (*DamageResult) MarshalToVT

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

func (*DamageResult) MarshalVT

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

func (*DamageResult) ProtoMessage

func (*DamageResult) ProtoMessage()

func (*DamageResult) Reset

func (x *DamageResult) Reset()

func (*DamageResult) SizeVT

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

func (*DamageResult) String

func (x *DamageResult) String() string

func (*DamageResult) UnmarshalJSON

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

UnmarshalJSON unmarshals the DamageResult from JSON.

func (*DamageResult) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the DamageResult message from JSON.

func (*DamageResult) UnmarshalVT

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

type DamagedEvent

type DamagedEvent struct {

	// Victim is the entity that took the hit.
	Victim uint32 `protobuf:"varint,1,opt,name=victim,proto3" json:"victim,omitempty"`
	// Attacker is the entity credited with the hit, or zero for a hazard.
	Attacker uint32 `protobuf:"varint,2,opt,name=attacker,proto3" json:"attacker,omitempty"`
	// Ability is the ability that dealt the hit.
	Ability uint32 `protobuf:"varint,3,opt,name=ability,proto3" json:"ability,omitempty"`
	// HealthLost is the health the hit removed, after resistances.
	HealthLost int32 `protobuf:"varint,4,opt,name=health_lost,json=healthLost,proto3" json:"healthLost,omitempty"`
	// HealthBefore is the victim's health before the hit; a hit that removes
	// all of it kills.
	HealthBefore int32 `protobuf:"varint,5,opt,name=health_before,json=healthBefore,proto3" json:"healthBefore,omitempty"`
	// Dealt is the hit's damage after resistances, before the victim's health
	// capped it.
	Dealt int32 `protobuf:"varint,6,opt,name=dealt,proto3" json:"dealt,omitempty"`
	// contains filtered or unexported fields
}

DamagedEvent reports one hit the game applied.

func (*DamagedEvent) CloneMessageVT

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

func (*DamagedEvent) CloneVT

func (m *DamagedEvent) CloneVT() *DamagedEvent

func (*DamagedEvent) EqualMessageVT

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

func (*DamagedEvent) EqualVT

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

func (*DamagedEvent) GetAbility

func (x *DamagedEvent) GetAbility() uint32

func (*DamagedEvent) GetAttacker

func (x *DamagedEvent) GetAttacker() uint32

func (*DamagedEvent) GetDealt

func (x *DamagedEvent) GetDealt() int32

func (*DamagedEvent) GetHealthBefore

func (x *DamagedEvent) GetHealthBefore() int32

func (*DamagedEvent) GetHealthLost

func (x *DamagedEvent) GetHealthLost() int32

func (*DamagedEvent) GetVictim

func (x *DamagedEvent) GetVictim() uint32

func (*DamagedEvent) MarshalJSON

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

MarshalJSON marshals the DamagedEvent to JSON.

func (*DamagedEvent) MarshalProtoJSON

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

MarshalProtoJSON marshals the DamagedEvent message to JSON.

func (*DamagedEvent) MarshalProtoText

func (x *DamagedEvent) MarshalProtoText() string

func (*DamagedEvent) MarshalToSizedBufferVT

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

func (*DamagedEvent) MarshalToVT

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

func (*DamagedEvent) MarshalVT

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

func (*DamagedEvent) ProtoMessage

func (*DamagedEvent) ProtoMessage()

func (*DamagedEvent) Reset

func (x *DamagedEvent) Reset()

func (*DamagedEvent) SizeVT

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

func (*DamagedEvent) String

func (x *DamagedEvent) String() string

func (*DamagedEvent) UnmarshalJSON

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

UnmarshalJSON unmarshals the DamagedEvent from JSON.

func (*DamagedEvent) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the DamagedEvent message from JSON.

func (*DamagedEvent) UnmarshalVT

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

type HitOptions

type HitOptions struct {

	// Victim is the hero or unit to hurt. The world, props and buildings are
	// refused: the client crashes on their damage events.
	Victim uint32 `protobuf:"varint,1,opt,name=victim,proto3" json:"victim,omitempty"`
	// Attacker is the entity credited with the hit. Without one the hit is a
	// hazard, such as poison gas, which credits no one and ignores the
	// inflictor and hit group.
	Attacker *uint32 `protobuf:"varint,2,opt,name=attacker,proto3,oneof" json:"attacker,omitempty"`
	// Inflictor is what delivered the hit; the default is the attacker.
	Inflictor *uint32 `protobuf:"varint,3,opt,name=inflictor,proto3,oneof" json:"inflictor,omitempty"`
	// Amount is the damage before resistances.
	Amount float32 `protobuf:"fixed32,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// HitGroup is the body part hit; 1 is the head. The default is the game's
	// choice.
	HitGroup *int32 `protobuf:"varint,5,opt,name=hit_group,json=hitGroup,proto3,oneof" json:"hitGroup,omitempty"`
	// Ability is the entity handle of the ability that dealt the hit, as
	// Ability.entity reports it.
	Ability *uint32 `protobuf:"varint,6,opt,name=ability,proto3,oneof" json:"ability,omitempty"`
	// contains filtered or unexported fields
}

HitOptions describes damage the mod deals.

func (*HitOptions) CloneMessageVT

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

func (*HitOptions) CloneVT

func (m *HitOptions) CloneVT() *HitOptions

func (*HitOptions) EqualMessageVT

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

func (*HitOptions) EqualVT

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

func (*HitOptions) GetAbility

func (x *HitOptions) GetAbility() uint32

func (*HitOptions) GetAmount

func (x *HitOptions) GetAmount() float32

func (*HitOptions) GetAttacker

func (x *HitOptions) GetAttacker() uint32

func (*HitOptions) GetHitGroup

func (x *HitOptions) GetHitGroup() int32

func (*HitOptions) GetInflictor

func (x *HitOptions) GetInflictor() uint32

func (*HitOptions) GetVictim

func (x *HitOptions) GetVictim() uint32

func (*HitOptions) MarshalJSON

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

MarshalJSON marshals the HitOptions to JSON.

func (*HitOptions) MarshalProtoJSON

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

MarshalProtoJSON marshals the HitOptions message to JSON.

func (*HitOptions) MarshalProtoText

func (x *HitOptions) MarshalProtoText() string

func (*HitOptions) MarshalToSizedBufferVT

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

func (*HitOptions) MarshalToVT

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

func (*HitOptions) MarshalVT

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

func (*HitOptions) ProtoMessage

func (*HitOptions) ProtoMessage()

func (*HitOptions) Reset

func (x *HitOptions) Reset()

func (*HitOptions) SizeVT

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

func (*HitOptions) String

func (x *HitOptions) String() string

func (*HitOptions) UnmarshalJSON

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

UnmarshalJSON unmarshals the HitOptions from JSON.

func (*HitOptions) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the HitOptions message from JSON.

func (*HitOptions) UnmarshalVT

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

type ImpactEvent

type ImpactEvent struct {

	// Entity is the projectile's entity handle.
	Entity uint32 `protobuf:"varint,1,opt,name=entity,proto3" json:"entity,omitempty"`
	// Name is the projectile's designer name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Owner is the entity that fired it, or zero.
	Owner uint32 `protobuf:"varint,3,opt,name=owner,proto3" json:"owner,omitempty"`
	// Player is the slot of the player whose hero fired it, or -1.
	Player int32 `protobuf:"varint,4,opt,name=player,proto3" json:"player,omitempty"`
	// Start and End are the projectile's movement this frame, which ended in
	// the strike.
	Start *geometry.Vec3 `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"`
	End   *geometry.Vec3 `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"`
	// Position is where it struck.
	Position *geometry.Vec3 `protobuf:"bytes,7,opt,name=position,proto3" json:"position,omitempty"`
	// Hit is the entity struck, or zero for the world.
	Hit uint32 `protobuf:"varint,8,opt,name=hit,proto3" json:"hit,omitempty"`
	// contains filtered or unexported fields
}

ImpactEvent is a watched projectile striking something.

func (*ImpactEvent) CloneMessageVT

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

func (*ImpactEvent) CloneVT

func (m *ImpactEvent) CloneVT() *ImpactEvent

func (*ImpactEvent) EqualMessageVT

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

func (*ImpactEvent) EqualVT

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

func (*ImpactEvent) GetEnd

func (x *ImpactEvent) GetEnd() *geometry.Vec3

func (*ImpactEvent) GetEntity

func (x *ImpactEvent) GetEntity() uint32

func (*ImpactEvent) GetHit

func (x *ImpactEvent) GetHit() uint32

func (*ImpactEvent) GetName

func (x *ImpactEvent) GetName() string

func (*ImpactEvent) GetOwner

func (x *ImpactEvent) GetOwner() uint32

func (*ImpactEvent) GetPlayer

func (x *ImpactEvent) GetPlayer() int32

func (*ImpactEvent) GetPosition

func (x *ImpactEvent) GetPosition() *geometry.Vec3

func (*ImpactEvent) GetStart

func (x *ImpactEvent) GetStart() *geometry.Vec3

func (*ImpactEvent) MarshalJSON

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

MarshalJSON marshals the ImpactEvent to JSON.

func (*ImpactEvent) MarshalProtoJSON

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

MarshalProtoJSON marshals the ImpactEvent message to JSON.

func (*ImpactEvent) MarshalProtoText

func (x *ImpactEvent) MarshalProtoText() string

func (*ImpactEvent) MarshalToSizedBufferVT

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

func (*ImpactEvent) MarshalToVT

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

func (*ImpactEvent) MarshalVT

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

func (*ImpactEvent) ProtoMessage

func (*ImpactEvent) ProtoMessage()

func (*ImpactEvent) Reset

func (x *ImpactEvent) Reset()

func (*ImpactEvent) SizeVT

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

func (*ImpactEvent) String

func (x *ImpactEvent) String() string

func (*ImpactEvent) UnmarshalJSON

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

UnmarshalJSON unmarshals the ImpactEvent from JSON.

func (*ImpactEvent) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the ImpactEvent message from JSON.

func (*ImpactEvent) UnmarshalVT

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

type LaunchEvent

type LaunchEvent struct {

	// Entity is the projectile's entity handle.
	Entity uint32 `protobuf:"varint,1,opt,name=entity,proto3" json:"entity,omitempty"`
	// Name is the projectile's designer name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Owner is the entity that fired it, or zero.
	Owner uint32 `protobuf:"varint,3,opt,name=owner,proto3" json:"owner,omitempty"`
	// Player is the slot of the player whose hero fired it, or -1.
	Player int32 `protobuf:"varint,4,opt,name=player,proto3" json:"player,omitempty"`
	// Position is where the projectile is.
	Position *geometry.Vec3 `protobuf:"bytes,5,opt,name=position,proto3" json:"position,omitempty"`
	// contains filtered or unexported fields
}

LaunchEvent is a watched projectile's first frame.

func (*LaunchEvent) CloneMessageVT

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

func (*LaunchEvent) CloneVT

func (m *LaunchEvent) CloneVT() *LaunchEvent

func (*LaunchEvent) EqualMessageVT

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

func (*LaunchEvent) EqualVT

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

func (*LaunchEvent) GetEntity

func (x *LaunchEvent) GetEntity() uint32

func (*LaunchEvent) GetName

func (x *LaunchEvent) GetName() string

func (*LaunchEvent) GetOwner

func (x *LaunchEvent) GetOwner() uint32

func (*LaunchEvent) GetPlayer

func (x *LaunchEvent) GetPlayer() int32

func (*LaunchEvent) GetPosition

func (x *LaunchEvent) GetPosition() *geometry.Vec3

func (*LaunchEvent) MarshalJSON

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

MarshalJSON marshals the LaunchEvent to JSON.

func (*LaunchEvent) MarshalProtoJSON

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

MarshalProtoJSON marshals the LaunchEvent message to JSON.

func (*LaunchEvent) MarshalProtoText

func (x *LaunchEvent) MarshalProtoText() string

func (*LaunchEvent) MarshalToSizedBufferVT

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

func (*LaunchEvent) MarshalToVT

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

func (*LaunchEvent) MarshalVT

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

func (*LaunchEvent) ProtoMessage

func (*LaunchEvent) ProtoMessage()

func (*LaunchEvent) Reset

func (x *LaunchEvent) Reset()

func (*LaunchEvent) SizeVT

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

func (*LaunchEvent) String

func (x *LaunchEvent) String() string

func (*LaunchEvent) UnmarshalJSON

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

UnmarshalJSON unmarshals the LaunchEvent from JSON.

func (*LaunchEvent) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the LaunchEvent message from JSON.

func (*LaunchEvent) UnmarshalVT

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

type ProjectileOptions

type ProjectileOptions struct {

	// Names lists designer names, such as rocket_launcher_rocket_projectile.
	Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	// KeepMomentum gives each live hero back the motion it had before a
	// watched projectile's explosion, so the mod's Impact handler sets the
	// push.
	KeepMomentum *bool `protobuf:"varint,2,opt,name=keep_momentum,json=keepMomentum,proto3,oneof" json:"keepMomentum,omitempty"`
	// contains filtered or unexported fields
}

ProjectileOptions selects the projectiles a mod watches.

func (*ProjectileOptions) CloneMessageVT

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

func (*ProjectileOptions) CloneVT

func (m *ProjectileOptions) CloneVT() *ProjectileOptions

func (*ProjectileOptions) EqualMessageVT

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

func (*ProjectileOptions) EqualVT

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

func (*ProjectileOptions) GetKeepMomentum

func (x *ProjectileOptions) GetKeepMomentum() bool

func (*ProjectileOptions) GetNames

func (x *ProjectileOptions) GetNames() []string

func (*ProjectileOptions) MarshalJSON

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

MarshalJSON marshals the ProjectileOptions to JSON.

func (*ProjectileOptions) MarshalProtoJSON

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

MarshalProtoJSON marshals the ProjectileOptions message to JSON.

func (*ProjectileOptions) MarshalProtoText

func (x *ProjectileOptions) MarshalProtoText() string

func (*ProjectileOptions) MarshalToSizedBufferVT

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

func (*ProjectileOptions) MarshalToVT

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

func (*ProjectileOptions) MarshalVT

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

func (*ProjectileOptions) ProtoMessage

func (*ProjectileOptions) ProtoMessage()

func (*ProjectileOptions) Reset

func (x *ProjectileOptions) Reset()

func (*ProjectileOptions) SizeVT

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

func (*ProjectileOptions) String

func (x *ProjectileOptions) String() string

func (*ProjectileOptions) UnmarshalJSON

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

UnmarshalJSON unmarshals the ProjectileOptions from JSON.

func (*ProjectileOptions) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the ProjectileOptions message from JSON.

func (*ProjectileOptions) UnmarshalVT

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

type TraceHit

type TraceHit struct {

	// Position is the hit point.
	Position *geometry.Vec3 `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"`
	// Normal is the surface's direction at the hit point.
	Normal *geometry.Vec3 `protobuf:"bytes,2,opt,name=normal,proto3" json:"normal,omitempty"`
	// StartSolid is true when the line began inside something solid.
	StartSolid bool `protobuf:"varint,3,opt,name=start_solid,json=startSolid,proto3" json:"startSolid,omitempty"`
	// Entity is the entity hit, or zero for the world.
	Entity uint32 `protobuf:"varint,4,opt,name=entity,proto3" json:"entity,omitempty"`
	// contains filtered or unexported fields
}

TraceHit is where a traced line first hit something.

func (*TraceHit) CloneMessageVT

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

func (*TraceHit) CloneVT

func (m *TraceHit) CloneVT() *TraceHit

func (*TraceHit) EqualMessageVT

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

func (*TraceHit) EqualVT

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

func (*TraceHit) GetEntity

func (x *TraceHit) GetEntity() uint32

func (*TraceHit) GetNormal

func (x *TraceHit) GetNormal() *geometry.Vec3

func (*TraceHit) GetPosition

func (x *TraceHit) GetPosition() *geometry.Vec3

func (*TraceHit) GetStartSolid

func (x *TraceHit) GetStartSolid() bool

func (*TraceHit) MarshalJSON

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

MarshalJSON marshals the TraceHit to JSON.

func (*TraceHit) MarshalProtoJSON

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

MarshalProtoJSON marshals the TraceHit message to JSON.

func (*TraceHit) MarshalProtoText

func (x *TraceHit) MarshalProtoText() string

func (*TraceHit) MarshalToSizedBufferVT

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

func (*TraceHit) MarshalToVT

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

func (*TraceHit) MarshalVT

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

func (*TraceHit) ProtoMessage

func (*TraceHit) ProtoMessage()

func (*TraceHit) Reset

func (x *TraceHit) Reset()

func (*TraceHit) SizeVT

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

func (*TraceHit) String

func (x *TraceHit) String() string

func (*TraceHit) UnmarshalJSON

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

UnmarshalJSON unmarshals the TraceHit from JSON.

func (*TraceHit) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the TraceHit message from JSON.

func (*TraceHit) UnmarshalVT

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

type TraceOptions

type TraceOptions struct {

	// Start is where the line begins.
	Start *geometry.Vec3 `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	// End is where the line ends.
	End *geometry.Vec3 `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// Layers selects what the line can hit; the default is solid and
	// hitboxes.
	Layers *uint64 `protobuf:"varint,3,opt,name=layers,proto3,oneof" json:"layers,omitempty"`
	// Exclude removes things in these layers from the hits.
	Exclude *uint64 `protobuf:"varint,4,opt,name=exclude,proto3,oneof" json:"exclude,omitempty"`
	// Ignore lists entity handles the line passes through.
	Ignore []uint32 `protobuf:"varint,5,rep,packed,name=ignore,proto3" json:"ignore,omitempty"`
	// contains filtered or unexported fields
}

TraceOptions describes a line to test against the world. Layers are bits of the game's collision layers: bit 0 is solid, 2 trigger, 4 player clip, 18 player and 19 NPC.

func (*TraceOptions) CloneMessageVT

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

func (*TraceOptions) CloneVT

func (m *TraceOptions) CloneVT() *TraceOptions

func (*TraceOptions) EqualMessageVT

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

func (*TraceOptions) EqualVT

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

func (*TraceOptions) GetEnd

func (x *TraceOptions) GetEnd() *geometry.Vec3

func (*TraceOptions) GetExclude

func (x *TraceOptions) GetExclude() uint64

func (*TraceOptions) GetIgnore

func (x *TraceOptions) GetIgnore() []uint32

func (*TraceOptions) GetLayers

func (x *TraceOptions) GetLayers() uint64

func (*TraceOptions) GetStart

func (x *TraceOptions) GetStart() *geometry.Vec3

func (*TraceOptions) MarshalJSON

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

MarshalJSON marshals the TraceOptions to JSON.

func (*TraceOptions) MarshalProtoJSON

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

MarshalProtoJSON marshals the TraceOptions message to JSON.

func (*TraceOptions) MarshalProtoText

func (x *TraceOptions) MarshalProtoText() string

func (*TraceOptions) MarshalToSizedBufferVT

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

func (*TraceOptions) MarshalToVT

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

func (*TraceOptions) MarshalVT

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

func (*TraceOptions) ProtoMessage

func (*TraceOptions) ProtoMessage()

func (*TraceOptions) Reset

func (x *TraceOptions) Reset()

func (*TraceOptions) SizeVT

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

func (*TraceOptions) String

func (x *TraceOptions) String() string

func (*TraceOptions) UnmarshalJSON

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

UnmarshalJSON unmarshals the TraceOptions from JSON.

func (*TraceOptions) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the TraceOptions message from JSON.

func (*TraceOptions) UnmarshalVT

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

type TraceResponse

type TraceResponse struct {
	Hit *TraceHit `protobuf:"bytes,1,opt,name=hit,proto3" json:"hit,omitempty"`
	// contains filtered or unexported fields
}

TraceResponse holds where a line hit, absent for a miss.

func (*TraceResponse) CloneMessageVT

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

func (*TraceResponse) CloneVT

func (m *TraceResponse) CloneVT() *TraceResponse

func (*TraceResponse) EqualMessageVT

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

func (*TraceResponse) EqualVT

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

func (*TraceResponse) GetHit

func (x *TraceResponse) GetHit() *TraceHit

func (*TraceResponse) MarshalJSON

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

MarshalJSON marshals the TraceResponse to JSON.

func (*TraceResponse) MarshalProtoJSON

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

MarshalProtoJSON marshals the TraceResponse message to JSON.

func (*TraceResponse) MarshalProtoText

func (x *TraceResponse) MarshalProtoText() string

func (*TraceResponse) MarshalToSizedBufferVT

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

func (*TraceResponse) MarshalToVT

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

func (*TraceResponse) MarshalVT

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

func (*TraceResponse) ProtoMessage

func (*TraceResponse) ProtoMessage()

func (*TraceResponse) Reset

func (x *TraceResponse) Reset()

func (*TraceResponse) SizeVT

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

func (*TraceResponse) String

func (x *TraceResponse) String() string

func (*TraceResponse) UnmarshalJSON

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

UnmarshalJSON unmarshals the TraceResponse from JSON.

func (*TraceResponse) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the TraceResponse message from JSON.

func (*TraceResponse) UnmarshalVT

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

Jump to

Keyboard shortcuts

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