physenv.AddSurfaceData

From Garry's Mod
Jump to: navigation, search
 physenv.AddSurfaceData( )

Contents

Description

Adds surface properties to the game's physics environment.

BUG

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

Arguments

string properties

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

Examples

Example

Adds the "" 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"
}]])


Personal tools
Navigation