1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Serverlist: Add ping indicators (#5164)

This commit is contained in:
kilbith
2017-02-03 14:53:43 +01:00
committed by Zeno-
parent 3b9ae409c7
commit 03b34cb3dd
8 changed files with 29 additions and 1 deletions

View File

@@ -577,6 +577,13 @@ int ModApiMainMenu::l_get_favorites(lua_State *L)
lua_settable(L, top_lvl2);
}
if (servers[i].isMember("ping")) {
float ping = servers[i]["ping"].asFloat();
lua_pushstring(L, "ping");
lua_pushnumber(L, ping);
lua_settable(L, top_lvl2);
}
lua_settable(L, top);
index++;
}