summaryrefslogtreecommitdiff
path: root/server/player.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/player.go')
-rw-r--r--server/player.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/server/player.go b/server/player.go
index ba4767c..396a152 100644
--- a/server/player.go
+++ b/server/player.go
@@ -28,9 +28,10 @@ type playerState struct {
}
const (
- defaultAuth = iota
- opAuth
- ConsoleAuth
+ defaultAuth
+ cheatAuth = 100
+ opAuth = 200
+ ConsoleAuth = 900
)
var playerNameRegex = regexp.MustCompile("^[.-_a-zA-Z0-9]*$")
@@ -160,7 +161,14 @@ func (p *player) ChangeLevel(from phony.Actor, lvl levelId, pos entityPos) {
func (p *player) MovePlayer(
from phony.Actor, pos entityPos, facing entityFacing) {
p.Act(from, func() {
- p.level.OnMovePlayer(p, pos, facing)
+ p.client.SendPacket(p, &classic.SpawnPlayer {
+ PlayerId: -1,
+ X: classic.FShort(pos.X),
+ Y: classic.FShort(pos.Y),
+ Z: classic.FShort(pos.Z),
+ Yaw: facing.Yaw,
+ Pitch: facing.Pitch,
+ })
})
}