mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Don'
t count hidden players for 'users' parameter in server heartbeat.
This commit is contained in:
parent
0d3a6d31c1
commit
0596bf5e01
@ -38,7 +38,16 @@ namespace MCGalaxy {
|
||||
"&public=" + Server.pub +
|
||||
"&version=7" +
|
||||
"&salt=" + Server.salt +
|
||||
"&users=" + PlayerInfo.Online.Count + "&software=MCGalaxy";
|
||||
"&users=" + PlayerCount() + "&software=MCGalaxy";
|
||||
}
|
||||
|
||||
static int PlayerCount() {
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
int count = 0;
|
||||
foreach (Player p in players) {
|
||||
if (!p.hidden) count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
bool UrlSaid = false;
|
||||
|
@ -63,7 +63,7 @@ namespace MCGalaxy {
|
||||
p.SendPos(0xFF, who.pos[0], who.pos[1], who.pos[2], who.rot[0], who.rot[1]);
|
||||
}
|
||||
} else if (p.possess != "") {
|
||||
Player who = PlayerInfo.Find(p.possess);
|
||||
Player who = PlayerInfo.FindExact(p.possess);
|
||||
if (who == null || who.level != p.level)
|
||||
p.possess = "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user