VM 0-16-00
Client-side
This commit is contained in:
Victor Chow 2001-11-08 02:37:11 +00:00
parent 929db5bd13
commit f311101353
4 changed files with 22 additions and 12 deletions

View file

@ -889,6 +889,7 @@ typedef struct {
// Elder: rq3 marks
qhandle_t slashMarkShader;
qhandle_t glassMarkShader;
qhandle_t metalMarkShader;
// powerup shaders
qhandle_t quadShader;
@ -997,6 +998,8 @@ typedef struct {
sfxHandle_t sfx_glassric1;
sfxHandle_t sfx_glassric2;
sfxHandle_t sfx_glassric3;
// Elder: Shell tumble sound
sfxHandle_t sfx_shelltumble;
sfxHandle_t sfx_railg;
sfxHandle_t sfx_rockexp;

View file

@ -176,7 +176,8 @@ void CG_FragmentBounceSound( localEntity_t *le, trace_t *trace ) {
trap_S_StartSound( trace->endpos, ENTITYNUM_WORLD, CHAN_AUTO, s );
}
} else if ( le->leBounceSoundType == LEBS_BRASS ) {
// Elder: play bounce sound
trap_S_StartSound( trace->endpos, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.sfx_shelltumble);
}
// don't allow a fragment to make multiple bounce sounds,

View file

@ -804,7 +804,8 @@ static void CG_RegisterSounds( void ) {
cgs.media.sfx_glassric1 = trap_S_RegisterSound ("sound/world/impactglass01.wav", qfalse);
cgs.media.sfx_glassric2 = trap_S_RegisterSound ("sound/world/impactglass02.wav", qfalse);
cgs.media.sfx_glassric3 = trap_S_RegisterSound ("sound/world/impactglass03.wav", qfalse);
cgs.media.sfx_shelltumble = trap_S_RegisterSound ("sound/misc/shell.wav", qfalse);
cgs.media.sfx_railg = trap_S_RegisterSound ("sound/weapons/railgun/railgf1a.wav", qfalse);
cgs.media.sfx_rockexp = trap_S_RegisterSound ("sound/weapons/rocket/rocklx1a.wav", qfalse);
cgs.media.sfx_plasmaexp = trap_S_RegisterSound ("sound/weapons/plasma/plasmx1a.wav", qfalse);
@ -1173,6 +1174,7 @@ static void CG_RegisterGraphics( void ) {
// Elder: added
cgs.media.slashMarkShader = trap_R_RegisterShader( "gfx/damage/slash_mrk" );
cgs.media.glassMarkShader = trap_R_RegisterShader( "gfx/damage/glass_mrk" );
cgs.media.metalMarkShader = trap_R_RegisterShader( "gfx/damage/metal_mrk" );
// register the inline models
cgs.numInlineModels = trap_CM_NumInlineModels();

View file

@ -1017,9 +1017,6 @@ void CG_RegisterWeapon( int weaponNum ) {
MAKERGB( weaponInfo->flashDlightColor, 1, 0.75f, 0 );
weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/mp5/mp5fire.wav", qfalse );
weaponInfo->ejectBrassFunc = CG_MachineGunEjectBrass;
//weaponInfo->reloadSound1 = trap_S_RegisterSound( "sound/weapons/mp5/mp5out.wav", qfalse );
//weaponInfo->reloadSound2 = trap_S_RegisterSound( "sound/weapons/mp5/mp5in.wav", qfalse );
//weaponInfo->reloadSound3 = trap_S_RegisterSound( "sound/weapons/mp5/mp5slide.wav", qfalse );
cgs.media.bulletExplosionShader = trap_R_RegisterShader( "bulletExplosion" );
Com_sprintf( filename, sizeof(filename), "models/weapons2/mp5/animation.cfg" );
@ -1027,6 +1024,15 @@ void CG_RegisterWeapon( int weaponNum ) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
if (weapAnimLoad) {
Com_sprintf( filename, sizeof(filename), "models/weapons2/mp5/sound.cfg" );
if ( !CG_ParseWeaponSoundFile(filename, weaponInfo) ) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
case WP_HANDCANNON:
@ -1547,6 +1553,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
if ( weapon->item->giTag == WP_PISTOL ||
weapon->item->giTag == WP_AKIMBO ||
weapon->item->giTag == WP_M4 ||
weapon->item->giTag == WP_MP5 ||
weapon->item->giTag == WP_M3 ||
weapon->item->giTag == WP_HANDCANNON ||
weapon->item->giTag == WP_SSG3000 ||
@ -2865,16 +2872,12 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
case WP_SSG3000:
mod = cgs.media.bulletFlashModel;
shader = cgs.media.bulletExplosionShader;
if (soundType == IMPACTSOUND_GLASS)
mark = cgs.media.glassMarkShader;
else
mark = cgs.media.bulletMarkShader;
radius = 8;
r = rand() & 3;
if (soundType == IMPACTSOUND_METAL)
{
mark = cgs.media.metalMarkShader;
if ( r < 2 )
sfx = cgs.media.sfx_metalric1;
else if ( r == 2 )
@ -2884,6 +2887,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
}
else if (soundType == IMPACTSOUND_GLASS)
{
mark = cgs.media.glassMarkShader;
if ( r < 2 )
sfx = cgs.media.sfx_glassric1;
else if ( r == 2 )
@ -2893,6 +2897,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
}
else
{
mark = cgs.media.bulletMarkShader;
if ( r == 0 )
sfx = cgs.media.sfx_ric1;
else if ( r == 1 )
@ -2900,7 +2905,6 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
else
sfx = cgs.media.sfx_ric3;
}
radius = 8;
break;
/*