Documentation ¶
Index ¶
- Constants
- Variables
- func AOMsg(msgs ...mt.IDAOMsg)
- func Distance(a, b mt.Vec) float32
- func FilterRelevantAdds(pos mt.Pos, adds []mt.AOAdd) (r []mt.AOAdd)
- func FilterRelevantMsgs(pos mt.Pos, msgs []mt.IDAOMsg) (r []mt.IDAOMsg)
- func FilterRelevantRms(pos mt.Pos, rms []mt.AOID) (r []mt.AOID)
- func FreeAOID(id mt.AOID)
- func GetAOID() mt.AOID
- func GetAOPos(id mt.AOID) (bool, mt.AOPos)
- func JoinHook(clt *minetest.Client)
- func LeaveHook(l *minetest.Leave)
- func ProcessPkt(clt *minetest.Client, pkt *mt.Pkt)
- func RegisterAO(ao ActiveObject) mt.AOID
- func RegisterAO0Maker(f func(clt *minetest.Client) mt.AOInitData)
- func RmAO(ids ...mt.AOID)
- func SendPkts()
- func Tick()
- type AOInteract
- type AOPhys
- type AOState
- func (s *AOState) GetAnimState() AnimState
- func (s *AOState) GetArmor() []mt.Group
- func (s *AOState) GetAttach() mt.AOAttach
- func (s *AOState) GetBones() map[string]mt.AOBonePos
- func (s *AOState) GetHP() uint16
- func (s *AOState) GetPhys() AOPhys
- func (s *AOState) GetPos() mt.AOPos
- func (s *AOState) GetTextureMod() mt.Texture
- type ActiveObject
- type ActiveObjectS
- func (ao *ActiveObjectS) Delete(DelReason)
- func (ao *ActiveObjectS) GetBonePos(str string) (p mt.AOBonePos, ok bool)
- func (ao *ActiveObjectS) GetID() mt.AOID
- func (ao *ActiveObjectS) GetProps() mt.AOProps
- func (ao *ActiveObjectS) InitPkt(id mt.AOID, clt *minetest.Client) mt.AOInitData
- func (ao *ActiveObjectS) Interact(AOInteract)
- func (ao *ActiveObjectS) SetID(id mt.AOID)
- type AnimState
- type ClientData
- type DelReason
Constants ¶
View Source
const ( GlobalAOIDmax = mt.AOID(2 ^ 32) GlobalAOIDmin = mt.AOID(1) )
View Source
const ( Client aoidType = true Global = false )
Variables ¶
View Source
var (
ReleventDistance float32 = 100 // in nodes; distance around player their still informed about AOs
)
Functions ¶
func ProcessPkt ¶
func RegisterAO ¶
func RegisterAO(ao ActiveObject) mt.AOID
RegisterAO registers a initialized ActiveObject
func RegisterAO0Maker ¶
func RegisterAO0Maker(f func(clt *minetest.Client) mt.AOInitData)
Register player AO0 / self RegisterSelfAOMaker is used to register the AO maker for each client
Types ¶
type AOInteract ¶
type AOInteract struct { Player *minetest.Client Action mt.Interaction ItemSlot uint16 Pos mt.PlayerPos }
AOInteract describes a interaction with a active object
type AOPhys ¶
type AOPhys struct {
Walk, Jump, Gravety float32
}
func (AOPhys) NotDefault ¶
returns true if Walk|Jump|Gravety is not 1
func (AOPhys) Pkt ¶
func (p AOPhys) Pkt() *mt.AOCmdPhysOverride
pkt returns a mt.ToCltAOPhysOverride
type AOState ¶
type AOState struct { Anim AnimState Pos mt.AOPos Armor []mt.Group Attach mt.AOAttach Phys AOPhys Bones map[string]mt.AOBonePos HP uint16 TextureMod mt.Texture }
func (*AOState) GetAnimState ¶
func (*AOState) GetTextureMod ¶
type ActiveObject ¶
type ActiveObject interface { SetID(mt.AOID) GetID() mt.AOID GetPos() mt.AOPos GetBonePos(string) (mt.AOBonePos, bool) GetBones() map[string]mt.AOBonePos GetProps() mt.AOProps GetArmor() []mt.Group InitPkt(mt.AOID, *minetest.Client) mt.AOInitData Interact(AOInteract) Delete(DelReason) }
ActiveObject describes a active object. an example struct is located in example.go (`ActiveObjectS`)
func GetAO ¶
func GetAO(id mt.AOID) ActiveObject
type ActiveObjectS ¶
type ActiveObjectS struct { AOState ID mt.AOID AnimSpeed float32 Attach mt.AOAttach Props mt.AOProps }
ActiveObjectS is a example for a ActiveObject interface
func (*ActiveObjectS) Delete ¶
func (ao *ActiveObjectS) Delete(DelReason)
func (*ActiveObjectS) GetBonePos ¶
func (ao *ActiveObjectS) GetBonePos(str string) (p mt.AOBonePos, ok bool)
func (*ActiveObjectS) GetID ¶
func (ao *ActiveObjectS) GetID() mt.AOID
func (*ActiveObjectS) GetProps ¶
func (ao *ActiveObjectS) GetProps() mt.AOProps
func (*ActiveObjectS) InitPkt ¶
func (ao *ActiveObjectS) InitPkt(id mt.AOID, clt *minetest.Client) mt.AOInitData
func (*ActiveObjectS) Interact ¶
func (ao *ActiveObjectS) Interact(AOInteract)
func (*ActiveObjectS) SetID ¶
func (ao *ActiveObjectS) SetID(id mt.AOID)
type ClientData ¶
type ClientData struct {
// contains filtered or unexported fields
}
Data kept per client
func (*ClientData) QueueAdd ¶
func (cd *ClientData) QueueAdd(adds ...mt.AOID)
Click to show internal directories.
Click to hide internal directories.