A Garry's Mod server module that provides physics environment control and message filtering capabilities.
- Physics environment control through
iphysenv
interface (only main) - Filtering of common spam messages and warnings
- Hooks for handling unreasonable entity positions
- Download the latest release for your platform
- Place the binary in your server's
garrysmod/lua/bin
directory - Add
require("sho")
to your server's startup scripts
-- Control physics simulation
iphysenv.ShouldSimulate(true) -- Enable/disable physics simulation
iphysenv.Status() -- Get current simulation status
-- Modify gravity
iphysenv.SetGravity(Vector(0, 0, -600))
local gravity = iphysenv.GetGravity()
The module provides hooks for detecting and handling invalid entity positions:
hook.Add("sho:SetAbsOrigin", "handle_bad_pos", function(entityIndex)
local ent = Entity(entityIndex)
if not IsValid(ent) then return end
-- Handle the invalid position...
end)
Requires:
- garrysmod_common
- A compatible C++ compiler
- premake5
- Clone:
git clone https://github.com/user/gmsv_sho.git
- Run premake:
premake5 vs2019 # Or your preferred generator
- Build using generated project files