From bc3887d75a630acb49ac6c1d7bc39b5c97aa9ef0 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 30 May 2020 15:28:04 +0200 Subject: [PATCH] Fix an issue with the new hitboxcache --- src/entityhitboxcache.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/entityhitboxcache.cpp b/src/entityhitboxcache.cpp index d1f69e65..3100c5ca 100644 --- a/src/entityhitboxcache.cpp +++ b/src/entityhitboxcache.cpp @@ -7,6 +7,7 @@ #include #include "common.hpp" +#include "MiscTemporary.hpp" namespace hitbox_cache { @@ -127,10 +128,12 @@ matrix3x4_t *EntityHitboxCache::GetBones(int numbones) if (!bones_setup) { // Reset game cache - if (!bonecache_enabled) + if (!bonecache_enabled && CE_GOOD(parent_ref)) { re::C_BaseAnimating::InvalidateBoneCache(RAW_ENT(parent_ref)); - re::C_BaseAnimating::Interpolate(RAW_ENT(parent_ref), bones_setup_time); + // Only use when nolerp is on as this breaks game visuals a tad + if (nolerp) + re::C_BaseAnimating::Interpolate(RAW_ENT(parent_ref), bones_setup_time); } // If numbones is not set, get it from some terrible and unnamed variable