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

Method MapHandler

src/bzfs/lua/MapObject.cpp:54–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54MapHandler::MapHandler(const std::string& name)
55 : objName(name)
56 , luaRef(LUA_NOREF) {
57 mapHandlers[objName] = this;
58
59 lua_State* L = LuaServer::GetL();
60 if (L == NULL) {
61 return;
62 }
63 if (!lua_isfunction(L, -1)) {
64 return;
65 }
66 luaRef = luaL_ref(L, LUA_REGISTRYINDEX);
67}
68
69
70MapHandler::~MapHandler() {

Callers

nothing calls this directly

Calls 1

luaL_refFunction · 0.50

Tested by

no test coverage detected