diff options
| author | raven <citrons@mondecitronne.com> | 2026-03-21 14:15:43 -0500 |
|---|---|---|
| committer | raven <citrons@mondecitronne.com> | 2026-03-21 14:15:43 -0500 |
| commit | f29c5d9c8a25d1271b51203f0a481fc33f08d564 (patch) | |
| tree | 78ec271a4b58dc5798d09293250288ccb0cad88e /server/player.go | |
| parent | 426709baff567ea0666cea9b317c5c3dddfc53f9 (diff) | |
/tp command
Diffstat (limited to 'server/player.go')
| -rw-r--r-- | server/player.go | 16 |
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, + }) }) } |
