Garry's Mod Wiki


  physenv.AddSurfaceData( string properties )


Adds surface properties to the game's physics environment.

The game has a limit of 128 surface properties - this includes properties loaded automatically from surfaceproperties.txt. Due to this, there's only a small amount of open slots that can be registered with GMod's provided surfaceproperties.txt.

Issue Tracker: 2604


1 string properties
The properties to add. Each one should include "base" or the game will crash due to some values being missing.


Adds the "scout_baseball" surface property from TF2.

physenv.AddSurfaceData([["scout_baseball" { "base" "rubber" "bulletimpact" "Weapon_Baseball.HitWorld" "scraperough" "Grenade.ScrapeRough" "scrapesmooth" "Grenade.ScrapeSmooth" "impacthard" "Weapon_Baseball.HitWorld" "impactsoft" "Weapon_Baseball.HitWorld" "rolling" "Grenade.Roll" }]])