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

Method GetSceneNodeInfo

src/lua/LuaSceneNode.cpp:563–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561
562
563int LuaSceneNodeMgr::GetSceneNodeInfo(lua_State* L) {
564 LuaSceneNode* sceneNode = CheckLuaSceneNode(L, 1);
565 if (sceneNode == NULL) {
566 lua_pushnil(L);
567 return 1;
568 }
569
570 lua_pushboolean(L, sceneNode->active);
571 lua_pushboolean(L, sceneNode->renderNode.useTransform);
572 lua_pushboolean(L, sceneNode->renderNode.useArrays);
573
574 switch (sceneNode->trackMode) {
575 case LuaSceneNode::TrackNone: { lua_pushstdstring(L, "none"); }
576 case LuaSceneNode::TrackTank: { lua_pushstdstring(L, "tank"); }
577 case LuaSceneNode::TrackFlag: { lua_pushstdstring(L, "flag"); }
578 case LuaSceneNode::TrackShot: { lua_pushstdstring(L, "shot"); }
579 }
580 lua_pushint(L, sceneNode->trackTarget);
581
582 return 5;
583}
584
585
586int LuaSceneNodeMgr::GetSceneNodePosition(lua_State* L) {

Callers

nothing calls this directly

Calls 5

CheckLuaSceneNodeFunction · 0.85
lua_pushstdstringFunction · 0.85
lua_pushintFunction · 0.85
lua_pushnilFunction · 0.50
lua_pushbooleanFunction · 0.50

Tested by

no test coverage detected