From 02e09c4d03fcaa0a98bda26fadc8e2919be191d9 Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:48:00 +0300 Subject: [PATCH] Move GameTime_t to a separate file --- public/entity2/entitysystem.h | 13 +------------ public/gametime.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 public/gametime.h diff --git a/public/entity2/entitysystem.h b/public/entity2/entitysystem.h index ae3d658c..8db687a5 100644 --- a/public/entity2/entitysystem.h +++ b/public/entity2/entitysystem.h @@ -20,6 +20,7 @@ #include "entityhandle.h" #include "concreteentitylist.h" #include "entitydatainstantiator.h" +#include "gametime.h" class CKV3Arena; class CEntityClass; @@ -43,18 +44,6 @@ extern CGameEntitySystem* GameEntitySystem(); typedef void (*EntityResourceManifestCreationCallback_t)(IEntityResourceManifest *, void *); -struct GameTime_t -{ -public: - GameTime_t( float value = 0.0f ) : m_Value( value ) {} - - float GetTime() const { return m_Value; } - void SetTime( float value ) { m_Value = value; } - -private: - float m_Value; -}; - enum EntityIOTargetType_t { ENTITY_IO_TARGET_INVALID = -1, diff --git a/public/gametime.h b/public/gametime.h new file mode 100644 index 00000000..f08b90c6 --- /dev/null +++ b/public/gametime.h @@ -0,0 +1,22 @@ +#ifndef GAME_TIME_H +#define GAME_TIME_H + +#ifdef _WIN32 +#pragma once +#endif + +struct GameTime_t +{ +public: + GameTime_t( float value = 0.0f ) : m_Value( value ) {} + + float GetTime() const { return m_Value; } + void SetTime( float value ) { m_Value = value; } + + bool operator==( const GameTime_t &other ) const { return m_Value == other.m_Value; } + +private: + float m_Value; +}; + +#endif // GAME_TIME_H