cleaned up some more

This commit is contained in:
2026-08-10 17:31:33 +02:00
parent 1e348c5abb
commit c8c2334bcc
8 changed files with 1 additions and 145 deletions

View File

@@ -2,14 +2,10 @@
#include "common.h"
#include "gameconfig.h"
#include "networksystem/inetworkserializer.h"
#include "overrides.h"
#include "playerslot.h"
#include <cstring>
extern CGameConfig* g_gameConfig;
extern bool g_enabled;
extern bool g_armed;
using SendSnapshotFn = void (*)(void*, void*);
@@ -85,7 +81,7 @@ static void Detour_PackEntity(void* self, void* arg1, int entityIndex, void* ent
{
++g_packEntityCalls;
if (!g_enabled || !g_armed || !entityData || !g_overrides.HasPackedOverrides())
if (!g_armed || !entityData || !g_overrides.HasPackedOverrides())
{
g_packEntity(self, arg1, entityIndex, entityData, arg4, arg5, arg6, arg7, arg8, arg9);
return;
@@ -191,20 +187,3 @@ void ShutdownSnapshotDetour()
g_packEntities = nullptr;
g_packEntity = nullptr;
}
void DumpDetourStats()
{
SPMessage("hooks: snapshot calls=%llu; pack calls=%llu; pack_entity calls=%llu generic_spoofs=%llu; fullupdate writes=%llu budget=%d\n",
static_cast<unsigned long long>(g_snapshotCalls),
static_cast<unsigned long long>(g_packCalls),
static_cast<unsigned long long>(g_packEntityCalls),
static_cast<unsigned long long>(g_packEntityGenericSpoofs),
static_cast<unsigned long long>(g_fullUpdateWrites),
g_fullUpdateBudget);
}
void RequestSnapshotFullUpdates(int budget)
{
if (budget > g_fullUpdateBudget)
g_fullUpdateBudget = budget;
}