Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #13 from LeonMrBonnie/fix-natives-in-events
Browse files Browse the repository at this point in the history
Fix natives in events
  • Loading branch information
drakeee committed Feb 1, 2021
2 parents adf878d + 67c582c commit deb2de0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/CLuaResourceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ bool CLuaResourceImpl::Start()

#else
this->resource->EnableNatives();
this->resource->PushNativesScope();
auto scope = this->resource->PushNativesScope();

alt::String mainFile = resource->GetMain();
alt::String script{this->GetScript(mainFile)};
Expand Down Expand Up @@ -269,7 +269,7 @@ bool CLuaResourceImpl::OnEvent(const alt::CEvent* ev)
{
//DEBUG_INFO(alt::String("CLuaResourceImpl::OnEvent::") + runtime->GetEventType(ev));
#ifdef ALT_CLIENT_API
this->resource->PushNativesScope();
auto scope = this->resource->PushNativesScope();
#endif

auto runtime = &CLuaScriptRuntime::Instance();
Expand Down
2 changes: 1 addition & 1 deletion src/CLuaScriptRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class CLuaScriptRuntime : public alt::IScriptRuntime
~CLuaScriptRuntime() { };

private:
const semver::version version{ 1, 1, 0, alt::ICore::SDK_VERSION, semver::branch::dev };
const semver::version version{ 1, 1, 1, alt::ICore::SDK_VERSION, semver::branch::dev };
#ifdef ALT_SERVER_API
alt::config::Node::Dict serverConfigDict;
#endif
Expand Down

0 comments on commit deb2de0

Please sign in to comment.