From a21ed9ceac71feaed90ee1fddbc2ec639a6c40f9 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Fri, 28 Apr 2023 01:00:21 +0200 Subject: [PATCH] Fix reallocs maybe --- src/client/component/fastfiles.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/client/component/fastfiles.cpp b/src/client/component/fastfiles.cpp index af429d91..42c061ff 100644 --- a/src/client/component/fastfiles.cpp +++ b/src/client/component/fastfiles.cpp @@ -583,11 +583,17 @@ namespace fastfiles return new_pool; } - template + template char* reallocate_asset_pool_multiplier() { constexpr auto pool_size = get_pool_type_size(Type); - return reallocate_asset_pool(); + return reallocate_asset_pool(pool_size * Multiplier)>(); + } + + template + char* reallocate_asset_pool_multiplier() + { + return reallocate_asset_pool_multiplier(Multiplier)>(); } #define RVA(ptr) static_cast(reinterpret_cast(ptr) - 0_b) @@ -1038,11 +1044,11 @@ namespace fastfiles void reallocate_asset_pools() { - //reallocate_attachment_and_weapon(); - reallocate_asset_pool_multiplier(); - reallocate_asset_pool_multiplier(); - reallocate_asset_pool_multiplier(); - reallocate_asset_pool_multiplier(); + reallocate_attachment_and_weapon(); + reallocate_asset_pool_multiplier(); + reallocate_asset_pool_multiplier(); + reallocate_asset_pool_multiplier(); + reallocate_asset_pool_multiplier(); } }