mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-25 22:35:31 +03:00
Added VScript functions for checking the platform the server/client is using
This commit is contained in:
parent
eb4d01a988
commit
a1ab1616c5
@ -938,6 +938,26 @@ bool ScriptIsClient()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ScriptIsWindows()
|
||||
{
|
||||
return IsWindows();
|
||||
}
|
||||
|
||||
bool ScriptIsLinux()
|
||||
{
|
||||
return IsLinux();
|
||||
}
|
||||
|
||||
bool ScriptIsOSX()
|
||||
{
|
||||
return IsOSX();
|
||||
}
|
||||
|
||||
bool ScriptIsPosix()
|
||||
{
|
||||
return IsPosix();
|
||||
}
|
||||
|
||||
// Notification printing on the right edge of the screen
|
||||
void NPrint( int pos, const char* fmt )
|
||||
{
|
||||
@ -1077,5 +1097,10 @@ void RegisterSharedScriptFunctions()
|
||||
ScriptRegisterFunction( g_pScriptVM, GetFrameCount, "Absolute frame counter" );
|
||||
//ScriptRegisterFunction( g_pScriptVM, GetTickCount, "Simulation ticks" );
|
||||
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptIsWindows, "IsWindows", "Returns true if the game is being run on a Windows machine." );
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptIsLinux, "IsLinux", "Returns true if the game is being run on a Linux machine." );
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptIsOSX, "IsOSX", "Returns true if the game is being run on an OSX machine." );
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptIsPosix, "IsPosix", "Returns true if the game is being run on a Posix machine." );
|
||||
|
||||
RegisterScriptSingletons();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user