The halflife module contains functions that interact with the HL2 engine.
Constants that identify Source Engine versions.
Returns the current map name, excluding the ”.bsp” extension
Returns a float containing a high-precision time value for profiling the engine.
| Return type: | float |
|---|
Returns the game description of the mod. If original is True, it retrieves the original game description, ignoring any potential hooks from plug-ins.
Returns the name of game’s directory, e.g. ‘cstrike’ or ‘tf’
Returns the game time based on the game tick as a float.
| Return type: | float |
|---|
Guesses the SDK version a mod was compiled against. If nothing specific is known about the game, the engine version is used instead. The return values are guaranteed to increase chronologically (that is, a later release will have a higher value).
Returns a SOURCE_SDK constant identifying the engine version.
Returns whether or not the given decal is precached.
Returns whether the server is dedicated.
Returns whether the given generic file is precached.
Returns whether the given map is valid or not. map should contain a map name, excluding the ”.bsp” extension.
Returns whether the given model is precached.
Returns whether the sound is precached.
Precaches the passed decal, generic file, etc. If preload is True, the file will be precached before level startup.