Prop Footsteps

From Valve Developer Community
Revision as of 15:46, 10 November 2007 by BocbaSclal (talk | contribs)
Jump to navigation Jump to search

gold teeth fta receivers ipod software pedicure pogo club index medical transcription sex clothing page body builder porn sweet sixteen party favors marine gps celebs movies security guards homepage polio disease gaymuscle ugg boots willow lane bunk beds link url apartments depakote side effects download free 3gp pontiac g6 link post office missouri manufactured homes link free photo personal tractor supply misleading graphs sexy girlfriend page benztropine sapphic erotica videos dinner dash download link car dealer los angeles health insurance quotes burberry handbag westjet airline gay personals free porno mpegs disney toons xxx video de sexo charcoal blowjob black and decker parts banned books small business credit card kitchen islands enell bra index map carolina ardohain erotic story florida flights soccer cleats phoenix apartments wardrobe malfunctions free sex stories accuchek diabetic supply american express black card candystand free anti virus download ravel shoes metal detector stepper motors car auctions love hina page pedicure burberry winamp download free hennessy cognac adirondack chair evoker.cn map ring tone maker vulkanik.cn baby shoes chocolate fountains lemonade diet site meds california home sexual pictures turkce music shelby mustang gt 500 children video bed bath anal sex movies skagen watches antique christmas post card rv sales maryland lipovarin clootie.cn semi trucks

Note.pngNote:This issue has been resolved in the Half-Life 2: Episode Two codebase; if you are using its code, you should not try to implement this mod.

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.

Note.pngNote:This will not make any difference if PlayStepSound is overridden by the player entity (i.e. HL2MP).

Basic Fix

src\cl_dll\c_baseplayer.cpp

Shift Trace Start Up

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

Smaller Trace Box Height

	Ray_t ray;
	ray.Init( start, end, GetPlayerMins(), GetPlayerMaxs() );
	Ray_t ray;
	Vector mins = GetPlayerMins();
	Vector maxs = GetPlayerMaxs();
	maxs.z = mins.z + 1;
	ray.Init( start, end, mins, maxs);

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 Trace Start Up

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

Smaller Trace Box Height & Change Trace Mask

	TracePlayerBBox( start, end, MASK_PLAYERSOLID_BRUSHONLY, COLLISION_GROUP_PLAYER_MOVEMENT, trace );
	Ray_t ray;
	Vector mins = player->GetPlayerMins();
	Vector maxs = player->GetPlayerMaxs();
	maxs.z = mins.z + 1;
	ray.Init( start, end, mins, maxs);
	UTIL_TraceRay( ray, MASK_PLAYERSOLID, player, COLLISION_GROUP_PLAYER_MOVEMENT, &trace );

HL2MP Override Removal

src\cl_dll\hl2mp\c_hl2mp_player.h

Prototype Removal

  • PlayStepSound
  • PrecacheFootStepSounds

src\game_shared\hl2mp\hl2mp_player_shared.cpp

Symbol Removal

  • PlayStepSound
  • PrecacheFootStepSounds

src\dlls\hl2mp_dll\hl2mp_player.cpp

Precache

In function CHL2MP_Player::Precache
Remove
	PrecacheFootStepSounds();

src\dlls\hl2mp_dll\hl2mp_player.h

Prototype Removal

  • PlayStepSound
  • PrecacheFootStepSounds