2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-01 01:25:38 +03:00

Merge pull request #119 from s1lentq/master

ReHLDS API: Added functions SetResourcesNum and GetResourcesAt
This commit is contained in:
theAsmodai 2016-01-07 16:25:46 +03:00
commit 4068cb1b81
3 changed files with 12 additions and 0 deletions

View File

@ -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;
};

View File

@ -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)

View File

@ -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;