Make Warp less performance intensive (again)

This commit is contained in:
BenCat07 2020-12-08 18:41:14 +01:00
parent 45c63a1f1d
commit ea91fb2d79
2 changed files with 4 additions and 0 deletions

View File

@ -268,6 +268,8 @@ void Warp(float accumulated_extra_samples, bool finalTick)
return; return;
} }
PROF_SECTION(warp_profiler);
int warp_ticks = warp_amount; int warp_ticks = warp_amount;
if (warp_amount_override) if (warp_amount_override)
warp_ticks = warp_amount_override; warp_ticks = warp_amount_override;

View File

@ -233,6 +233,8 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs
} }
// PROF_BEGIN(); // PROF_BEGIN();
// Do not update if in warp, since the entities will stay identical either way
if (!hacks::tf2::warp::in_warp)
{ {
PROF_SECTION(EntityCache); PROF_SECTION(EntityCache);
entity_cache::Update(); entity_cache::Update();