Skip to content

Commit

Permalink
Allow to override 'object' Lua property of CScriptBinderObject class
Browse files Browse the repository at this point in the history
This allows to run Call of Chernobyl correctly (#1529).

Though, I'm not sure if it's right, but original luabind was allowing
writing to readonly objects anyway.
  • Loading branch information
Xottab-DUTY committed Jan 2, 2025
1 parent f0fada0 commit 9049947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xrGame/script_binder_object_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SCRIPT_EXPORT(CScriptBinderObject, (),
module(luaState)
[
class_<CScriptBinderObject, no_bases, default_holder, CScriptBinderObjectWrapper>("object_binder")
.def_readonly("object", &CScriptBinderObject::m_object)
.def_readwrite("object", &CScriptBinderObject::m_object)
.def(constructor<CScriptGameObject*>())
.def("reinit", &CScriptBinderObject::reinit, &CScriptBinderObjectWrapper::reinit_static)
.def("reload", &CScriptBinderObject::reload, &CScriptBinderObjectWrapper::reload_static)
Expand Down

0 comments on commit 9049947

Please sign in to comment.