MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / tpfGetActor

Function tpfGetActor

ogsr_engine/xrGame/level_script.cpp:56–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56CScriptGameObject* tpfGetActor()
57{
58 static bool first_time = true;
59 if (first_time)
60 ai().script_engine().script_log(eLuaMessageTypeError, "Do not use level.actor function!");
61 first_time = false;
62
63 CActor* l_tpActor = smart_cast<CActor*>(Level().CurrentEntity());
64 if (l_tpActor)
65 return (smart_cast<CGameObject*>(l_tpActor)->lua_game_object());
66 else
67 return (0);
68}
69
70CScriptGameObject* get_object_by_name(LPCSTR caObjectName)
71{

Callers

nothing calls this directly

Calls 2

script_logMethod · 0.80
lua_game_objectMethod · 0.80

Tested by

no test coverage detected