Added GetGameTickCount native (bug 5209, r=psychonic).
This commit is contained in:
parent
44d9551bd6
commit
f65de3bbbb
@ -43,7 +43,7 @@ class SM:
|
||||
'HL2SDKOBVALVE': 'hl2sdk-ob-valve',
|
||||
'HL2SDKL4D': 'hl2sdk-l4d',
|
||||
'HL2SDKL4D2': 'hl2sdk-l4d2',
|
||||
'MYSQL5': 'mysql-5.0'
|
||||
# 'MYSQL5': 'mysql-5.0'
|
||||
}
|
||||
|
||||
if AMBuild.target['platform'] != 'darwin':
|
||||
@ -403,7 +403,7 @@ FileList = [
|
||||
['extensions', 'cstrike', 'AMBuilder'],
|
||||
['extensions', 'curl', 'AMBuilder'],
|
||||
['extensions', 'geoip', 'AMBuilder'],
|
||||
['extensions', 'mysql', 'AMBuilder'],
|
||||
# ['extensions', 'mysql', 'AMBuilder'],
|
||||
['extensions', 'sdktools', 'AMBuilder'],
|
||||
['extensions', 'topmenus', 'AMBuilder'],
|
||||
['extensions', 'updater', 'AMBuilder'],
|
||||
|
@ -87,6 +87,11 @@ static cell_t GetGameTime(IPluginContext *pContext, const cell_t *params)
|
||||
return sp_ftoc(gpGlobals->curtime);
|
||||
}
|
||||
|
||||
static cell_t GetGameTickCount(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
return gpGlobals->tickcount;
|
||||
}
|
||||
|
||||
static cell_t CreateFakeClient(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
if (!g_SourceMod.IsMapRunning())
|
||||
@ -524,6 +529,7 @@ REGISTER_NATIVES(halflifeNatives)
|
||||
{"GetGameDescription", GetGameDescription},
|
||||
{"GetGameFolderName", GetGameFolderName},
|
||||
{"GetGameTime", GetGameTime},
|
||||
{"GetGameTickCount", GetGameTickCount},
|
||||
{"GetRandomFloat", GetRandomFloat},
|
||||
{"GetRandomInt", GetRandomInt},
|
||||
{"IsDedicatedServer", IsDedicatedServer},
|
||||
|
@ -128,6 +128,13 @@ native Float:GetEngineTime();
|
||||
*/
|
||||
native Float:GetGameTime();
|
||||
|
||||
/**
|
||||
* Returns the game's internal tick count.
|
||||
*
|
||||
* @return Game tick count.
|
||||
*/
|
||||
native GetGameTickCount();
|
||||
|
||||
/**
|
||||
* Returns the game description from the mod.
|
||||
*
|
||||
|
@ -224,7 +224,7 @@ AddHL2Library('sourcemod', 'bin')
|
||||
AddNormalLibrary('sourcemod.logic', 'bin')
|
||||
AddNormalLibrary('sourcepawn.jit.x86', 'bin')
|
||||
AddNormalLibrary('geoip.ext', 'extensions')
|
||||
AddNormalLibrary('dbi.mysql.ext', 'extensions')
|
||||
#AddNormalLibrary('dbi.mysql.ext', 'extensions')
|
||||
AddNormalLibrary('dbi.sqlite.ext', 'extensions')
|
||||
|
||||
AddNormalLibrary('game.cstrike.ext.2.ep2v', 'extensions')
|
||||
|
Loading…
Reference in New Issue
Block a user