From b36ca89e1646a370fd3be933ff066ddbf1fd60b8 Mon Sep 17 00:00:00 2001 From: Jisk Date: Mon, 24 Jul 2023 18:00:31 +0000 Subject: [PATCH] Port player.ping from SRB2Kart --- src/lua_playerlib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index f76ec1689..ae3c06d31 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -222,6 +222,7 @@ enum player_e player_blocked, player_jointime, player_quittime, + player_ping, #ifdef HWRENDER player_fovadd, #endif @@ -368,6 +369,7 @@ static const char *const player_opt[] = { "blocked", "jointime", "quittime", + "ping", #ifdef HWRENDER "fovadd", #endif @@ -819,6 +821,9 @@ static int player_get(lua_State *L) case player_quittime: lua_pushinteger(L, plr->quittime); break; + case player_ping: + lua_pushinteger(L, playerpingtable[plr - players]); + break; #ifdef HWRENDER case player_fovadd: lua_pushfixed(L, plr->fovadd);