physenv
physenv
This module fixes https://github.com/Facepunch/garrysmod-issues/issues/642 and adds a few small things.
Supports: Linux32
| Windows32
Will soon have support for Windows & Linux64 Windows currently likes to crash :(
Methods
IPhysicsEnvironment physenv.CreateEnvironment( )
Creates a new physics environment.
It will apply all settings from the main environment on the newly created on to match.
If you notice Physics objects that have a invalid entity, report this. But this should normally never happen.
In this case, this means that something is failing to remove physics objects and it will cause random crashes.
physenv.DestroyAllCollisionSets()
Destroys all collision sets.
physenv.DestroyEnvironment( IPhysicsEnvironment environment )
Destroys the given physics environment.
physenv.EnablePhysHook( boolean shouldCall )
Enables/Disables the
HolyLib:OnPhysFrame
hook.
Returns the collision set by the given index.
Only 32 collision sets can exist at the same time!
Returns the collision set by the given index or creates it if needed.
Only 32 collision sets can exist at the same time!
Returns the physics environment by the given index.
IPhysicsEnvironment physenv.GetCurrentEnvironment( )
Returns the currently simulating environment.
number physenv.GetLagThreshold( )
Returns the lag threshold.
Only works on Linux32
physenv.IVP_NoSkip()
Let the simulation run normally.
physenv.IVP_SkipImpact()
Skip all impact calls.
physenv.IVP_SkipSimulation()
Skip the entire simulation.
Players that collide with props will be randomly teleported!
physenv.SetLagThreshold( number ms )
The lag threshold which, if exceeded, triggers the
HolyLib:PhysicsLag
hook.
Only works on Linux32
physenv.SetPhysSkipType( type IVP_SkipType )
Sets the skiptype for the current simulation.
This is reset after the simulation ended.
Only works on Linux32