forked from UNLOZE/sm-plugins
Refactor Status plugin and reduce sendbuffer
This commit is contained in:
@@ -17,34 +17,33 @@ stock float GetServerFPS()
|
||||
stock Handle GetServerFPSConf()
|
||||
{
|
||||
static Handle hGameConf = null;
|
||||
|
||||
|
||||
if (hGameConf == null)
|
||||
{
|
||||
hGameConf = LoadGameConfigFile("serverfps.games");
|
||||
|
||||
|
||||
if (hGameConf == null)
|
||||
{
|
||||
SetFailState("Couldn't find \"serverfps.games\" configuration file");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return hGameConf;
|
||||
}
|
||||
|
||||
stock Address GetHostTimeFrame()
|
||||
{
|
||||
static Address pHostTimeFrame = Address_Null;
|
||||
|
||||
|
||||
if (pHostTimeFrame == Address_Null)
|
||||
{
|
||||
pHostTimeFrame = GameConfGetAddress(GetServerFPSConf(), "HostTimeFrame");
|
||||
|
||||
|
||||
if (pHostTimeFrame == Address_Null)
|
||||
{
|
||||
SetFailState("Failed to find time frame address");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return pHostTimeFrame;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user