mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-06 07:18:42 +00:00
chore: some cleanup work on WorldServer and PerformanceManager
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
Reference in New Issue
Block a user