Prop Footsteps

From Valve Developer Community
Revision as of 21:47, 30 March 2006 by Ts2do (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

For player footsteps, Valve used MASK_PLAYERSOLID_BRUSHONLY rather than MASK_PLAYERSOLID. This difference made it so only the static world would have dynamic footsteps. The following precedure will show how to fix this issue.

src\cl_dll\c_baseplayer.cpp

Shift Start Up

	// Straight down
	end.z -= 64;
	// Straight down
	start.z += 1;
	end.z -= 64;

Change Trace Mask

	UTIL_TraceRay( ray, MASK_PLAYERSOLID_BRUSHONLY, this, COLLISION_GROUP_PLAYER_MOVEMENT, &trace );
	UTIL_TraceRay( ray, MASK_PLAYERSOLID, this, COLLISION_GROUP_PLAYER_MOVEMENT, &trace );

src\game_shared\gamemovement.cpp

Shift Start Up

	// Straight down
	end[2] -= 64;
	// Straight down
	start[2] += 1;
	end[2] -= 64;

Change Trace Mask

	TracePlayerBBox( start, end, MASK_PLAYERSOLID_BRUSHONLY, COLLISION_GROUP_PLAYER_MOVEMENT, trace ); 
	TracePlayerBBox( start, end, MASK_PLAYERSOLID, COLLISION_GROUP_PLAYER_MOVEMENT, trace );