Skip to content

Commit

Permalink
using the lock causes freezes for some users
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisSoemers committed Apr 23, 2023
1 parent cfce54d commit f42427d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
########################################################################################################################
project(
PAPER
VERSION 2.2.2
VERSION 2.2.3
DESCRIPTION "The PAper Papyrus ExtendeR. Plugin to expose new functions and events to Skyrim's 'Papyrus' scripting language. "
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
Expand Down
8 changes: 4 additions & 4 deletions include/OnContainerChangedEventHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ namespace OnContainerChangedEvents {
virtual bool matchesFilter(RE::VMHandle handle) override {
auto vm = RE::SkyrimVM::GetSingleton();

const auto& constInventoryEventFilterMapLock =
GetManualRelocateMemberVariable<RE::BSSpinLock>(vm, REL::VariantOffset(0x8940, 0x8940, 0x8960));
//const auto& constInventoryEventFilterMapLock =
// GetManualRelocateMemberVariable<RE::BSSpinLock>(vm, REL::VariantOffset(0x8940, 0x8940, 0x8960));

auto& inventoryEventFilterMapLock = const_cast<RE::BSSpinLock&>(constInventoryEventFilterMapLock);
RE::BSSpinLockGuard locker(inventoryEventFilterMapLock);
//auto& inventoryEventFilterMapLock = const_cast<RE::BSSpinLock&>(constInventoryEventFilterMapLock);
//RE::BSSpinLockGuard locker(inventoryEventFilterMapLock);

const auto& inventoryEventFilterMap =
GetManualRelocateMemberVariable<RE::BSTHashMap<RE::VMHandle, RE::SkyrimVM::InventoryEventFilterLists*>>(
Expand Down
4 changes: 2 additions & 2 deletions include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// Instead, edit the template in /cmake/version.h.in

#define PROJECT_VER 2.2.2
#define PROJECT_VER 2.2.3
#define PROJECT_VER_MAJOR 2
#define PROJECT_VER_MINOR 2
#define PROJECT_VER_PATCH 2
#define PROJECT_VER_PATCH 3
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "paper-plugin",
"version-string": "2.2.2",
"version-string": "2.2.3",
"port-version": 0,
"description": "The PAper Papyrus ExtendeR. Plugin to expose new functions and events to Skyrim's 'Papyrus' scripting language.",
"license": "Apache-2.0",
Expand Down

0 comments on commit f42427d

Please sign in to comment.