MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / Set_GfxBlock

Function Set_GfxBlock

src/lua/LuaCallOuts.cpp:1989–2003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1987
1988
1989static int Set_GfxBlock(lua_State* L, GfxBlock& gfxBlock) {
1990 EventClient* ec = L2H(L);
1991 if ((ec == luaUser) && gfxBlock.worldBlock()) {
1992 return luaL_pushnil(L);
1993 }
1994 luaL_checktype(L, 2, LUA_TBOOLEAN);
1995 const bool block = lua_tobool(L, 2);
1996 if (!block) {
1997 gfxBlock.remove(ec);
1998 return luaL_pushnil(L);
1999 }
2000 const bool queue = lua_isboolean(L, 3) && lua_tobool(L, 3);
2001 lua_pushboolean(L, gfxBlock.set(ec, queue));
2002 return 1;
2003}
2004
2005
2006int LuaCallOuts::SetGfxBlock(lua_State* L) {

Callers 7

SetGfxBlockMethod · 0.85
SetPlayerGfxBlockMethod · 0.85
SetFlagGfxBlockMethod · 0.85
SetFlagRadarGfxBlockMethod · 0.85
SetShotGfxBlockMethod · 0.85
SetShotRadarGfxBlockMethod · 0.85

Calls 8

L2HFunction · 0.85
luaL_pushnilFunction · 0.85
lua_toboolFunction · 0.85
worldBlockMethod · 0.80
luaL_checktypeFunction · 0.50
lua_pushbooleanFunction · 0.50
removeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected