diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index 3cce6fe7..b5837247 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -238,6 +238,14 @@ float EV_HLDM_PlayTextureSound( int idx, pmtrace_t *ptr, float *vecSrc, float *v fattn = 1.0; cnt = 2; break; + case CHAR_TEX_SNOW: + fvol = 0.9; + fvolbar = 0.1; + rgsz[0] = "player/pl_snow1.wav"; + rgsz[1] = "player/pl_snow2.wav"; + rgsz[2] = "player/pl_snow3.wav"; + cnt = 3; + break; } // play material hit sound diff --git a/dlls/client.cpp b/dlls/client.cpp index 75c4c5f3..214ae8b9 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -892,6 +892,11 @@ void ClientPrecache( void ) PRECACHE_SOUND( "player/pl_wade3.wav" ); PRECACHE_SOUND( "player/pl_wade4.wav" ); + PRECACHE_SOUND( "player/pl_snow1.wav" ); // walk on snow + PRECACHE_SOUND( "player/pl_snow2.wav" ); + PRECACHE_SOUND( "player/pl_snow3.wav" ); + PRECACHE_SOUND( "player/pl_snow4.wav" ); + PRECACHE_SOUND( "debris/wood1.wav" ); // hit wood texture PRECACHE_SOUND( "debris/wood2.wav" ); PRECACHE_SOUND( "debris/wood3.wav" ); diff --git a/dlls/gearbox/ctf_gamerules.cpp b/dlls/gearbox/ctf_gamerules.cpp index 8d72883a..b585f1f8 100644 --- a/dlls/gearbox/ctf_gamerules.cpp +++ b/dlls/gearbox/ctf_gamerules.cpp @@ -598,6 +598,7 @@ void CCTFMultiplay::ChangePlayerTeam(CBasePlayer *pPlayer, int iTeam) WRITE_BYTE(ENTINDEX(pPlayer->edict())); WRITE_SHORT(pPlayer->pev->frags); WRITE_SHORT(pPlayer->m_iDeaths); + WRITE_SHORT(0); WRITE_SHORT(pPlayer->pev->team); MESSAGE_END(); diff --git a/dlls/sound.cpp b/dlls/sound.cpp index 6637fe53..d9355e53 100644 --- a/dlls/sound.cpp +++ b/dlls/sound.cpp @@ -1652,6 +1652,14 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in fattn = 1.0; cnt = 2; break; + case CHAR_TEX_SNOW: + fvol = 0.9; + fvolbar = 0.1; + rgsz[0] = "player/pl_snow1.wav"; + rgsz[1] = "player/pl_snow2.wav"; + rgsz[2] = "player/pl_snow3.wav"; + cnt = 3; + break; } // did we hit a breakable? diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index c2513555..9b69156e 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -72,6 +72,7 @@ playermove_t *pmove = NULL; #define CHAR_TEX_COMPUTER 'P' #define CHAR_TEX_GLASS 'Y' #define CHAR_TEX_FLESH 'F' +#define CHAR_TEX_SNOW 'O' #define STEP_CONCRETE 0 // default step sound #define STEP_METAL 1 // metal floor @@ -82,6 +83,7 @@ playermove_t *pmove = NULL; #define STEP_SLOSH 6 // shallow liquid puddle #define STEP_WADE 7 // wading in liquid #define STEP_LADDER 8 // climbing ladder +#define STEP_SNOW 9 #define PLAYER_FATAL_FALL_SPEED 1024// approx 60 feet #define PLAYER_MAX_SAFE_FALL_SPEED 580// approx 20 feet @@ -486,6 +488,25 @@ void PM_PlayStepSound( int step, float fvol ) break; } break; + case STEP_SNOW: + switch( irand ) + { + // right foot + case 0: + pmove->PM_PlaySound( CHAN_BODY, "player/pl_snow1.wav", fvol, ATTN_NORM, 0, PITCH_NORM ); + break; + case 1: + pmove->PM_PlaySound( CHAN_BODY, "player/pl_snow3.wav", fvol, ATTN_NORM, 0, PITCH_NORM ); + break; + // left foot + case 2: + pmove->PM_PlaySound( CHAN_BODY, "player/pl_snow2.wav", fvol, ATTN_NORM, 0, PITCH_NORM ); + break; + case 3: + pmove->PM_PlaySound( CHAN_BODY, "player/pl_snow4.wav", fvol, ATTN_NORM, 0, PITCH_NORM ); + break; + } + break; } } @@ -508,6 +529,8 @@ int PM_MapTextureTypeStepType( char chTextureType ) return STEP_TILE; case CHAR_TEX_SLOSH: return STEP_SLOSH; + case CHAR_TEX_SNOW: + return STEP_SNOW; } } @@ -646,7 +669,8 @@ void PM_UpdateStepSound( void ) fvol = fWalking ? 0.2 : 0.5; pmove->flTimeStepSound = fWalking ? 400 : 300; break; - case CHAR_TEX_DIRT: + case CHAR_TEX_DIRT: + case CHAR_TEX_SNOW: fvol = fWalking ? 0.25 : 0.55; pmove->flTimeStepSound = fWalking ? 400 : 300; break;