mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-05 07:51:13 +00:00
Merge branch 'player-dot-ping' into 'next'
player.ping for the ping in milliseconds of the player See merge request KartKrew/Kart-Public!167
This commit is contained in:
commit
c9c8e5f15f
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include "d_player.h"
|
#include "d_player.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "d_clisrv.h"
|
||||||
|
|
||||||
#include "lua_script.h"
|
#include "lua_script.h"
|
||||||
#include "lua_libs.h"
|
#include "lua_libs.h"
|
||||||
|
@ -385,6 +386,8 @@ static int player_get(lua_State *L)
|
||||||
else if (fastcmp(field,"fovadd"))
|
else if (fastcmp(field,"fovadd"))
|
||||||
lua_pushfixed(L, plr->fovadd);
|
lua_pushfixed(L, plr->fovadd);
|
||||||
#endif
|
#endif
|
||||||
|
else if (fastcmp(field,"ping"))
|
||||||
|
lua_pushinteger(L, playerpingtable[( plr - players )]);
|
||||||
else {
|
else {
|
||||||
lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS);
|
lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS);
|
||||||
I_Assert(lua_istable(L, -1));
|
I_Assert(lua_istable(L, -1));
|
||||||
|
|
Loading…
Reference in a new issue