Prop Footsteps: Difference between revisions
Jump to navigation
Jump to search
Note:This will not make any difference if
mNo edit summary |
|||
Line 49: | Line 49: | ||
|style="text-align:center;"|↓ | |style="text-align:center;"|↓ | ||
|- | |- | ||
|<pre style="margin:0px 0px 0px 0px;">Ray_t ray; | |<pre style="margin:0px 0px 0px 0px;"> Ray_t ray; | ||
Vector mins = player->GetPlayerMins(); | Vector mins = player->GetPlayerMins(); | ||
Vector maxs = player->GetPlayerMaxs(); | Vector maxs = player->GetPlayerMaxs(); | ||
Line 56: | Line 56: | ||
UTIL_TraceRay( ray, MASK_PLAYERSOLID, player, COLLISION_GROUP_PLAYER_MOVEMENT, &trace );</pre> | UTIL_TraceRay( ray, MASK_PLAYERSOLID, player, COLLISION_GROUP_PLAYER_MOVEMENT, &trace );</pre> | ||
|} | |} | ||
==HL2MP Override Removal== | ==HL2MP Override Removal== | ||
===src\cl_dll\hl2mp\c_hl2mp_player.h=== | ===src\cl_dll\hl2mp\c_hl2mp_player.h=== |
Revision as of 21:59, 18 April 2006
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.

PlayStepSound
is overridden by the player entity (i.e. HL2MP).Basic Fix
src\cl_dll\c_baseplayer.cpp
Shift 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 ); |
Shift 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
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