mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-10-12 12:20:07 +00:00
renamed cnet.CNPeer -> cnet.Peer
This commit is contained in:
@@ -20,6 +20,6 @@ type Entity interface {
|
||||
SetPosition(x, y, z int)
|
||||
SetAngle(angle int)
|
||||
|
||||
DisappearFromViewOf(peer *cnet.CNPeer)
|
||||
EnterIntoViewOf(peer *cnet.CNPeer)
|
||||
DisappearFromViewOf(peer *cnet.Peer)
|
||||
EnterIntoViewOf(peer *cnet.Peer)
|
||||
}
|
||||
|
@@ -63,13 +63,13 @@ func (npc *NPC) SetAngle(angle int) {
|
||||
npc.Angle = angle
|
||||
}
|
||||
|
||||
func (npc *NPC) DisappearFromViewOf(peer *cnet.CNPeer) {
|
||||
func (npc *NPC) DisappearFromViewOf(peer *cnet.Peer) {
|
||||
peer.Send(protocol.P_FE2CL_NPC_EXIT, protocol.SP_FE2CL_NPC_EXIT{
|
||||
INPC_ID: int32(npc.ID),
|
||||
})
|
||||
}
|
||||
|
||||
func (npc *NPC) EnterIntoViewOf(peer *cnet.CNPeer) {
|
||||
func (npc *NPC) EnterIntoViewOf(peer *cnet.Peer) {
|
||||
peer.Send(protocol.P_FE2CL_NPC_NEW, protocol.SP_FE2CL_NPC_NEW{
|
||||
NPCAppearanceData: npc.GetAppearanceData(),
|
||||
})
|
||||
|
@@ -8,11 +8,11 @@ import (
|
||||
|
||||
type Player struct {
|
||||
db.Player
|
||||
Peer *cnet.CNPeer
|
||||
Peer *cnet.Peer
|
||||
Chunk ChunkPosition
|
||||
}
|
||||
|
||||
func NewPlayer(peer *cnet.CNPeer, player *db.Player) *Player {
|
||||
func NewPlayer(peer *cnet.Peer, player *db.Player) *Player {
|
||||
return &Player{
|
||||
Player: *player,
|
||||
Peer: peer,
|
||||
@@ -52,13 +52,13 @@ func (plr *Player) SetAngle(angle int) {
|
||||
plr.Angle = angle
|
||||
}
|
||||
|
||||
func (plr *Player) DisappearFromViewOf(peer *cnet.CNPeer) {
|
||||
func (plr *Player) DisappearFromViewOf(peer *cnet.Peer) {
|
||||
peer.Send(protocol.P_FE2CL_PC_EXIT, protocol.SP_FE2CL_PC_EXIT{
|
||||
IID: int32(plr.PlayerID),
|
||||
})
|
||||
}
|
||||
|
||||
func (plr *Player) EnterIntoViewOf(peer *cnet.CNPeer) {
|
||||
func (plr *Player) EnterIntoViewOf(peer *cnet.Peer) {
|
||||
peer.Send(protocol.P_FE2CL_PC_NEW, protocol.SP_FE2CL_PC_NEW{
|
||||
PCAppearanceData: plr.GetAppearanceData(),
|
||||
})
|
||||
|
Reference in New Issue
Block a user