Update replayfreecam lua global to use camera.freecam for currently viewed player
This commit is contained in:
1 parent
3156851554
commit
da9c19bba4
1 file changed
+11
-1
+11
-1
@@ -8542,6 +8542,16 @@ static int lua_enumlib_mariomode_get(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lua_enumlib_replayfreecam_get(lua_State *L)
|
||||
{
|
||||
if (dedicated) // huh?
|
||||
lua_pushboolean(L, false);
|
||||
else
|
||||
lua_pushboolean(L, camera[R_GetViewNumber()].freecam);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lua_enumlib_twodlevel_get(lua_State *L)
|
||||
{
|
||||
lua_pushboolean(L, twodlevel);
|
||||
@@ -9219,7 +9229,7 @@ int LUA_EnumLib(lua_State *L)
|
||||
|
||||
lua_pushcfunction(L, lua_glib_new_getter);
|
||||
lua_pushliteral(L, "replayfreecam");
|
||||
lua_glib_push_bool_getter(L, &demo.freecam);
|
||||
lua_pushcfunction(L, lua_enumlib_replayfreecam_get);
|
||||
lua_call(L, 2, 0);
|
||||
|
||||
if (!mathlib)
|
||||
|
||||
Reference in new issue
Block a user