mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -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.IsAfk = !p.IsAfk;
|
||||||
p.afkMessage = p.IsAfk ? message : null;
|
p.afkMessage = p.IsAfk ? message : null;
|
||||||
TabList.Update(p, true);
|
TabList.Update(p, true);
|
||||||
|
p.LastAction = DateTime.UtcNow;
|
||||||
|
|
||||||
bool send = !Server.chatmod && !p.muted;
|
bool send = !Server.chatmod && !p.muted;
|
||||||
if (p.IsAfk) {
|
if (p.IsAfk) {
|
||||||
|
@ -756,8 +756,13 @@ return;
|
|||||||
if (cancelmove) {
|
if (cancelmove) {
|
||||||
SendPos(0xFF, pos[0], pos[1], pos[2], rot[0], rot[1]); return;
|
SendPos(0xFF, pos[0], pos[1], pos[2], rot[0], rot[1]); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = new ushort[3] { x, y, z };
|
pos = new ushort[3] { x, y, z };
|
||||||
rot = new byte[2] { rotx, roty };
|
rot = new byte[2] { rotx, roty };
|
||||||
|
if (!Moved()) return;
|
||||||
|
|
||||||
|
LastAction = DateTime.UtcNow;
|
||||||
|
if (IsAfk) CmdAfk.ToggleAfk(this, "");
|
||||||
/*if (!CheckIfInsideBlock()) { clippos = pos; cliprot = rot; }*/
|
/*if (!CheckIfInsideBlock()) { clippos = pos; cliprot = rot; }*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user