diff --git a/rehlds/public/rehlds/rehlds_interfaces.h b/rehlds/public/rehlds/rehlds_interfaces.h index d30af0f..d740b03 100644 --- a/rehlds/public/rehlds/rehlds_interfaces.h +++ b/rehlds/public/rehlds/rehlds_interfaces.h @@ -123,4 +123,6 @@ public: virtual int GetDecalNameNum() = 0; virtual double GetTime() = 0; + virtual void SetResourcesNum(int num) = 0; + virtual struct resource_s *GetResource(int index) = 0; }; diff --git a/rehlds/rehlds/rehlds_interfaces_impl.cpp b/rehlds/rehlds/rehlds_interfaces_impl.cpp index a9fff47..d7814e6 100644 --- a/rehlds/rehlds/rehlds_interfaces_impl.cpp +++ b/rehlds/rehlds/rehlds_interfaces_impl.cpp @@ -230,6 +230,14 @@ double EXT_FUNC CRehldsServerData::GetTime() { return g_psv.time; } +void EXT_FUNC CRehldsServerData::SetResourcesNum(int num) { + g_psv.num_resources = num; +} + +struct resource_s *EXT_FUNC CRehldsServerData::GetResource(int index) { + return &g_psv.resourcelist[index]; +} + void Rehlds_Interfaces_FreeClients() { if (g_GameClients == NULL) diff --git a/rehlds/rehlds/rehlds_interfaces_impl.h b/rehlds/rehlds/rehlds_interfaces_impl.h index 23aff4f..acb5dcd 100644 --- a/rehlds/rehlds/rehlds_interfaces_impl.h +++ b/rehlds/rehlds/rehlds_interfaces_impl.h @@ -117,6 +117,8 @@ public: virtual int GetDecalNameNum(); virtual double GetTime(); + virtual void SetResourcesNum(int num); + virtual struct resource_s *GetResource(int index); }; extern CGameClient** g_GameClients;