mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Make unafk instantly when your own rotation changes.
This commit is contained in:
parent
9136e2f39d
commit
14651c1e68
@ -45,6 +45,7 @@ namespace MCGalaxy.Commands {
|
||||
p.IsAfk = !p.IsAfk;
|
||||
p.afkMessage = p.IsAfk ? message : null;
|
||||
TabList.Update(p, true);
|
||||
p.LastAction = DateTime.UtcNow;
|
||||
|
||||
bool send = !Server.chatmod && !p.muted;
|
||||
if (p.IsAfk) {
|
||||
|
@ -755,9 +755,14 @@ return;
|
||||
|
||||
if (cancelmove) {
|
||||
SendPos(0xFF, pos[0], pos[1], pos[2], rot[0], rot[1]); return;
|
||||
}
|
||||
}
|
||||
|
||||
pos = new ushort[3] { x, y, z };
|
||||
rot = new byte[2] { rotx, roty };
|
||||
if (!Moved()) return;
|
||||
|
||||
LastAction = DateTime.UtcNow;
|
||||
if (IsAfk) CmdAfk.ToggleAfk(this, "");
|
||||
/*if (!CheckIfInsideBlock()) { clippos = pos; cliprot = rot; }*/
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user