From 0950d460c82c165039747da750907617decd02e0 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:55:51 -0800 Subject: [PATCH] feat: Implement VirtualMachine::GetSingleton() --- CommonLibSF/src/RE/V/VirtualMachine.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CommonLibSF/src/RE/V/VirtualMachine.cpp diff --git a/CommonLibSF/src/RE/V/VirtualMachine.cpp b/CommonLibSF/src/RE/V/VirtualMachine.cpp new file mode 100644 index 00000000..ee0706c9 --- /dev/null +++ b/CommonLibSF/src/RE/V/VirtualMachine.cpp @@ -0,0 +1,11 @@ +#include "RE/V/VirtualMachine.h" +#include "RE/G/GameVM.h" + +namespace RE::BSScript::Internal +{ + VirtualMachine* VirtualMachine::GetSingleton() + { + auto vm = GameVM::GetSingleton(); + return vm ? static_cast(vm->impl.get()) : nullptr; + } +} \ No newline at end of file