chore: some cleanup work on WorldServer and PerformanceManager

This commit is contained in:
David Markowitz
2025-05-02 16:33:28 -07:00
parent b31f9670d1
commit 7c8ca1c1cb
4 changed files with 160 additions and 160 deletions

View File

@@ -1,22 +1,16 @@
#pragma once
#include <cstdint>
#include <map>
#include "dCommonVars.h"
struct PerformanceProfile {
uint32_t serverFrameDelta;
};
class PerformanceManager {
public:
static void SelectProfile(LWOMAPID mapID);
static uint32_t GetServerFrameDelta();
private:
static PerformanceProfile m_CurrentProfile;
static PerformanceProfile m_DefaultProfile;
static PerformanceProfile m_InactiveProfile;
static std::map<LWOMAPID, PerformanceProfile> m_Profiles;
using PerformanceProfile = uint32_t;
namespace PerformanceManager {
/* Sets a performance profile for a given world. */
void SelectProfile(LWOMAPID mapID);
/* Gets the frame millisecond delta. Will return a higher value if the zone is empty. */
uint32_t GetServerFrameDelta();
};