mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 23:32:06 +00:00
Elder:
0-15-00 VMs Client-side
This commit is contained in:
parent
af767d3b8f
commit
19d863fa5d
5 changed files with 415 additions and 329 deletions
|
@ -303,14 +303,16 @@ static void CG_Item( centity_t *cent ) {
|
||||||
|
|
||||||
|
|
||||||
// autorotate at one of two speeds
|
// autorotate at one of two speeds
|
||||||
//Blaze: no rotating
|
//Blaze: no rotating
|
||||||
// if ( item->giType == IT_HEALTH ) {
|
/*
|
||||||
// VectorCopy( cg.autoAnglesFast, cent->lerpAngles );
|
if ( item->giType == IT_HEALTH ) {
|
||||||
// AxisCopy( cg.autoAxisFast, ent.axis );
|
VectorCopy( cg.autoAnglesFast, cent->lerpAngles );
|
||||||
// } else {
|
AxisCopy( cg.autoAxisFast, ent.axis );
|
||||||
// VectorCopy( cg.autoAngles, cent->lerpAngles );
|
} else {
|
||||||
// AxisCopy( cg.autoAxis, ent.axis );
|
VectorCopy( cg.autoAngles, cent->lerpAngles );
|
||||||
// }
|
AxisCopy( cg.autoAxis, ent.axis );
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (item->giType == IT_WEAPON && item->giTag != WP_KNIFE &&
|
if (item->giType == IT_WEAPON && item->giTag != WP_KNIFE &&
|
||||||
(es->pos.trDelta[0] != 0 || es->pos.trDelta[1] != 0 || es->pos.trDelta[2] != 0) ) {
|
(es->pos.trDelta[0] != 0 || es->pos.trDelta[1] != 0 || es->pos.trDelta[2] != 0) ) {
|
||||||
|
@ -325,11 +327,16 @@ static void CG_Item( centity_t *cent ) {
|
||||||
VectorNegate(ent.axis[2], ent.axis[1]);
|
VectorNegate(ent.axis[2], ent.axis[1]);
|
||||||
VectorCopy(myvec, ent.axis[2]);
|
VectorCopy(myvec, ent.axis[2]);
|
||||||
}
|
}
|
||||||
else if (item->giType == IT_HOLDABLE &&
|
else if (item->giType == IT_HOLDABLE)
|
||||||
(es->pos.trDelta[0] != 0 || es->pos.trDelta[1] != 0 || es->pos.trDelta[2] != 0))
|
|
||||||
{
|
{
|
||||||
VectorCopy( cg.autoAnglesFast, cent->lerpAngles );
|
//Elder: rotate item if moving
|
||||||
AxisCopy( cg.autoAxisFast, ent.axis );
|
if (es->pos.trDelta[0] != 0 || es->pos.trDelta[1] != 0 || es->pos.trDelta[2] != 0)
|
||||||
|
{
|
||||||
|
VectorCopy( cg.autoAnglesFast, cent->lerpAngles );
|
||||||
|
AxisCopy( cg.autoAxisFast, ent.axis );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
AnglesToAxis(es->angles, ent.axis);
|
||||||
}
|
}
|
||||||
|
|
||||||
wi = NULL;
|
wi = NULL;
|
||||||
|
@ -342,6 +349,10 @@ static void CG_Item( centity_t *cent ) {
|
||||||
|
|
||||||
vec3_t myvec;
|
vec3_t myvec;
|
||||||
|
|
||||||
|
// Elder: bad hack -- but oh well.
|
||||||
|
if (es->pos.trDelta[0] == 0 && es->pos.trDelta[1] == 0 && es->pos.trDelta[2] == 0)
|
||||||
|
AnglesToAxis(es->angles, ent.axis);
|
||||||
|
|
||||||
//CG_Printf("Should not be in here if it's a thrown knife\n");
|
//CG_Printf("Should not be in here if it's a thrown knife\n");
|
||||||
wi = &cg_weapons[item->giTag];
|
wi = &cg_weapons[item->giTag];
|
||||||
cent->lerpOrigin[0] -=
|
cent->lerpOrigin[0] -=
|
||||||
|
@ -356,16 +367,17 @@ static void CG_Item( centity_t *cent ) {
|
||||||
wi->weaponMidpoint[0] * ent.axis[0][2] +
|
wi->weaponMidpoint[0] * ent.axis[0][2] +
|
||||||
wi->weaponMidpoint[1] * ent.axis[1][2] +
|
wi->weaponMidpoint[1] * ent.axis[1][2] +
|
||||||
wi->weaponMidpoint[2] * ent.axis[2][2];
|
wi->weaponMidpoint[2] * ent.axis[2][2];
|
||||||
//Blaze: Dont raise the weapon, but lower it
|
//Blaze: Dont raise the weapon, but lower it
|
||||||
//Elder: increased value
|
|
||||||
//Elder: don't lower knives by much - this is bad hardcode but oh well
|
//Elder: don't lower knives by much - this is bad hardcode but oh well
|
||||||
if ( item->giTag == WP_KNIFE)
|
if ( item->giTag == WP_KNIFE)
|
||||||
cent->lerpOrigin[2] -= 10;
|
cent->lerpOrigin[2] -= 10;
|
||||||
else
|
else
|
||||||
cent->lerpOrigin[2] -= 14;
|
cent->lerpOrigin[2] -= 14;
|
||||||
// cent->lerpOrigin[2] += 8; // an extra height boost
|
|
||||||
|
|
||||||
if (es->pos.trDelta[0] == 0 && es->pos.trDelta[1] == 0 && es->pos.trDelta[2] == 0) {
|
// cent->lerpOrigin[2] += 8; // an extra height boost
|
||||||
|
|
||||||
|
if (es->pos.trDelta[0] == 0 && es->pos.trDelta[1] == 0 && es->pos.trDelta[2] == 0)
|
||||||
|
{
|
||||||
// Blaze: rotate the gun by 90 degrees to place it on the ground
|
// Blaze: rotate the gun by 90 degrees to place it on the ground
|
||||||
VectorCopy(ent.axis[1], myvec);
|
VectorCopy(ent.axis[1], myvec);
|
||||||
VectorNegate(ent.axis[2], ent.axis[1]);
|
VectorNegate(ent.axis[2], ent.axis[1]);
|
||||||
|
|
|
@ -446,7 +446,7 @@ static void CG_Obituary_Head( entityState_t *ent ) {
|
||||||
target = ent->otherEntityNum;
|
target = ent->otherEntityNum;
|
||||||
attacker = ent->otherEntityNum2;
|
attacker = ent->otherEntityNum2;
|
||||||
mod = ent->eventParm;
|
mod = ent->eventParm;
|
||||||
CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker);
|
|
||||||
if ( target < 0 || target >= MAX_CLIENTS ) {
|
if ( target < 0 || target >= MAX_CLIENTS ) {
|
||||||
CG_Error( "CG_Obituary: target out of range" );
|
CG_Error( "CG_Obituary: target out of range" );
|
||||||
}
|
}
|
||||||
|
@ -655,7 +655,7 @@ static void CG_Obituary_Chest( entityState_t *ent ) {
|
||||||
target = ent->otherEntityNum;
|
target = ent->otherEntityNum;
|
||||||
attacker = ent->otherEntityNum2;
|
attacker = ent->otherEntityNum2;
|
||||||
mod = ent->eventParm;
|
mod = ent->eventParm;
|
||||||
CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker);
|
|
||||||
if ( target < 0 || target >= MAX_CLIENTS ) {
|
if ( target < 0 || target >= MAX_CLIENTS ) {
|
||||||
CG_Error( "CG_Obituary: target out of range" );
|
CG_Error( "CG_Obituary: target out of range" );
|
||||||
}
|
}
|
||||||
|
@ -834,7 +834,7 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
|
||||||
target = ent->otherEntityNum;
|
target = ent->otherEntityNum;
|
||||||
attacker = ent->otherEntityNum2;
|
attacker = ent->otherEntityNum2;
|
||||||
mod = ent->eventParm;
|
mod = ent->eventParm;
|
||||||
CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker);
|
|
||||||
if ( target < 0 || target >= MAX_CLIENTS ) {
|
if ( target < 0 || target >= MAX_CLIENTS ) {
|
||||||
CG_Error( "CG_Obituary: target out of range" );
|
CG_Error( "CG_Obituary: target out of range" );
|
||||||
}
|
}
|
||||||
|
@ -2360,19 +2360,28 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
DEBUGNAME("EV_BREAK_GLASS1");
|
DEBUGNAME("EV_BREAK_GLASS1");
|
||||||
// Change cgs.media.gibSound to whatever sound you want it to use
|
// Change cgs.media.gibSound to whatever sound you want it to use
|
||||||
// I think the gib sound sounds pretty good
|
// I think the gib sound sounds pretty good
|
||||||
//Elder: gonna move this into the function
|
//Elder: gonna move this into the function some day
|
||||||
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glassSound );
|
if ( rand() % 2 )
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glassSound );
|
||||||
|
else
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glass2Sound );
|
||||||
//Elder: modified
|
//Elder: modified
|
||||||
CG_BreakGlass( cent->lerpOrigin, es->eventParm, 0 );
|
CG_BreakGlass( cent->lerpOrigin, es->eventParm, 0 );
|
||||||
break;
|
break;
|
||||||
case EV_BREAK_GLASS2:
|
case EV_BREAK_GLASS2:
|
||||||
DEBUGNAME("EV_BREAK_GLASS2");
|
DEBUGNAME("EV_BREAK_GLASS2");
|
||||||
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glassSound );
|
if ( rand() % 2 )
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glassSound );
|
||||||
|
else
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glass2Sound );
|
||||||
CG_BreakGlass( cent->lerpOrigin, es->eventParm, 1 );
|
CG_BreakGlass( cent->lerpOrigin, es->eventParm, 1 );
|
||||||
break;
|
break;
|
||||||
case EV_BREAK_GLASS3:
|
case EV_BREAK_GLASS3:
|
||||||
DEBUGNAME("EV_BREAK_GLASS3");
|
DEBUGNAME("EV_BREAK_GLASS3");
|
||||||
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glassSound );
|
if ( rand() % 2 )
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glassSound );
|
||||||
|
else
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.glass2Sound );
|
||||||
CG_BreakGlass( cent->lerpOrigin, es->eventParm, 2 );
|
CG_BreakGlass( cent->lerpOrigin, es->eventParm, 2 );
|
||||||
break;
|
break;
|
||||||
case EV_STOPLOOPINGSOUND:
|
case EV_STOPLOOPINGSOUND:
|
||||||
|
|
|
@ -861,6 +861,7 @@ typedef struct {
|
||||||
qhandle_t rq3_healthicon2;
|
qhandle_t rq3_healthicon2;
|
||||||
|
|
||||||
qhandle_t smokePuffShader;
|
qhandle_t smokePuffShader;
|
||||||
|
qhandle_t smokePuffAnimShader;
|
||||||
qhandle_t smokePuffRageProShader;
|
qhandle_t smokePuffRageProShader;
|
||||||
qhandle_t shotgunSmokePuffShader;
|
qhandle_t shotgunSmokePuffShader;
|
||||||
qhandle_t plasmaBallShader;
|
qhandle_t plasmaBallShader;
|
||||||
|
@ -1025,7 +1026,8 @@ typedef struct {
|
||||||
sfxHandle_t youSuckSound;
|
sfxHandle_t youSuckSound;
|
||||||
#endif
|
#endif
|
||||||
sfxHandle_t gibSound;
|
sfxHandle_t gibSound;
|
||||||
sfxHandle_t glassSound;//Blaze: Reaction breakable glass
|
sfxHandle_t glassSound; //Blaze: Reaction breakable glass
|
||||||
|
sfxHandle_t glass2Sound;
|
||||||
sfxHandle_t gibBounce1Sound;
|
sfxHandle_t gibBounce1Sound;
|
||||||
sfxHandle_t gibBounce2Sound;
|
sfxHandle_t gibBounce2Sound;
|
||||||
sfxHandle_t gibBounce3Sound;
|
sfxHandle_t gibBounce3Sound;
|
||||||
|
|
|
@ -656,6 +656,7 @@ static void CG_RegisterSounds( void ) {
|
||||||
cgs.media.gibSound = trap_S_RegisterSound( "sound/player/gibsplt1.wav", qfalse );
|
cgs.media.gibSound = trap_S_RegisterSound( "sound/player/gibsplt1.wav", qfalse );
|
||||||
//Blaze: Reaction breakable glass
|
//Blaze: Reaction breakable glass
|
||||||
cgs.media.glassSound = trap_S_RegisterSound( "sound/world/glassbk.wav", qfalse );
|
cgs.media.glassSound = trap_S_RegisterSound( "sound/world/glassbk.wav", qfalse );
|
||||||
|
cgs.media.glass2Sound = trap_S_RegisterSound( "sound/world/glassbk2.wav", qfalse );
|
||||||
cgs.media.gibBounce1Sound = trap_S_RegisterSound( "sound/player/gibimp1.wav", qfalse );
|
cgs.media.gibBounce1Sound = trap_S_RegisterSound( "sound/player/gibimp1.wav", qfalse );
|
||||||
cgs.media.gibBounce2Sound = trap_S_RegisterSound( "sound/player/gibimp2.wav", qfalse );
|
cgs.media.gibBounce2Sound = trap_S_RegisterSound( "sound/player/gibimp2.wav", qfalse );
|
||||||
cgs.media.gibBounce3Sound = trap_S_RegisterSound( "sound/player/gibimp3.wav", qfalse );
|
cgs.media.gibBounce3Sound = trap_S_RegisterSound( "sound/player/gibimp3.wav", qfalse );
|
||||||
|
@ -924,6 +925,8 @@ static void CG_RegisterGraphics( void ) {
|
||||||
cgs.media.scoreboardTime = trap_R_RegisterShaderNoMip( "menu/tab/time.tga" );
|
cgs.media.scoreboardTime = trap_R_RegisterShaderNoMip( "menu/tab/time.tga" );
|
||||||
|
|
||||||
cgs.media.smokePuffShader = trap_R_RegisterShader( "smokePuff" );
|
cgs.media.smokePuffShader = trap_R_RegisterShader( "smokePuff" );
|
||||||
|
// Elder: expanding animated smoke puff
|
||||||
|
cgs.media.smokePuffAnimShader = trap_R_RegisterShader( "smokePuff-rq3" );
|
||||||
cgs.media.smokePuffRageProShader = trap_R_RegisterShader( "smokePuffRagePro" );
|
cgs.media.smokePuffRageProShader = trap_R_RegisterShader( "smokePuffRagePro" );
|
||||||
cgs.media.shotgunSmokePuffShader = trap_R_RegisterShader( "shotgunSmokePuff" );
|
cgs.media.shotgunSmokePuffShader = trap_R_RegisterShader( "shotgunSmokePuff" );
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
|
|
|
@ -1021,6 +1021,12 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||||
//weaponInfo->reloadSound2 = trap_S_RegisterSound( "sound/weapons/mp5/mp5in.wav", qfalse );
|
//weaponInfo->reloadSound2 = trap_S_RegisterSound( "sound/weapons/mp5/mp5in.wav", qfalse );
|
||||||
//weaponInfo->reloadSound3 = trap_S_RegisterSound( "sound/weapons/mp5/mp5slide.wav", qfalse );
|
//weaponInfo->reloadSound3 = trap_S_RegisterSound( "sound/weapons/mp5/mp5slide.wav", qfalse );
|
||||||
cgs.media.bulletExplosionShader = trap_R_RegisterShader( "bulletExplosion" );
|
cgs.media.bulletExplosionShader = trap_R_RegisterShader( "bulletExplosion" );
|
||||||
|
|
||||||
|
Com_sprintf( filename, sizeof(filename), "models/weapons2/mp5/animation.cfg" );
|
||||||
|
if ( !CG_ParseWeaponAnimFile(filename, weaponInfo) ) {
|
||||||
|
Com_Printf("Failed to load weapon animation file %s\n", filename);
|
||||||
|
weapAnimLoad = qfalse;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WP_HANDCANNON:
|
case WP_HANDCANNON:
|
||||||
|
@ -1847,29 +1853,32 @@ void CG_AddViewWeapon( playerState_t *ps ) {
|
||||||
AnglesToAxis( angles, hand.axis );
|
AnglesToAxis( angles, hand.axis );
|
||||||
|
|
||||||
//Elder: temp hack
|
//Elder: temp hack
|
||||||
//if ( ps->weapon != WP_PISTOL && ps->weapon != WP_M3)
|
// map torso animations to weapon animations
|
||||||
//{
|
/*
|
||||||
// map torso animations to weapon animations
|
if ( cg_gun_frame.integer ||
|
||||||
if ( cg_gun_frame.integer ||
|
ps->weapon == WP_PISTOL ||
|
||||||
ps->weapon == WP_PISTOL ||
|
ps->weapon == WP_M3 ||
|
||||||
ps->weapon == WP_M3 ||
|
ps->weapon == WP_HANDCANNON ||
|
||||||
ps->weapon == WP_HANDCANNON ||
|
ps->weapon == WP_SSG3000 ||
|
||||||
ps->weapon == WP_SSG3000 ||
|
ps->weapon == WP_M4 ||
|
||||||
ps->weapon == WP_M4 ||
|
ps->weapon == WP_MP5 ||
|
||||||
ps->weapon == WP_AKIMBO ||
|
ps->weapon == WP_AKIMBO ||
|
||||||
ps->weapon == WP_GRENADE ||
|
ps->weapon == WP_GRENADE ||
|
||||||
ps->weapon == WP_KNIFE) {
|
ps->weapon == WP_KNIFE ) {
|
||||||
// development tool
|
*/
|
||||||
hand.frame = hand.oldframe = cg_gun_frame.integer;
|
// development tool
|
||||||
hand.backlerp = 0;
|
hand.frame = hand.oldframe = cg_gun_frame.integer;
|
||||||
} else {
|
hand.backlerp = 0;
|
||||||
// get clientinfo for animation map
|
/*
|
||||||
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
|
} else {
|
||||||
hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame );
|
// get clientinfo for animation map
|
||||||
hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame );
|
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
|
||||||
hand.backlerp = cent->pe.torso.backlerp;
|
hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame );
|
||||||
}
|
hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame );
|
||||||
//}
|
hand.backlerp = cent->pe.torso.backlerp;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
hand.hModel = weapon->handsModel;
|
hand.hModel = weapon->handsModel;
|
||||||
hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON | RF_MINLIGHT;
|
hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON | RF_MINLIGHT;
|
||||||
|
@ -2389,7 +2398,6 @@ void CG_Weapon_f( void ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cg.snap->ps.weapon == WP_SSG3000) {
|
if (cg.snap->ps.weapon == WP_SSG3000) {
|
||||||
//trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_ITEM, cgs.media.lensSound);
|
|
||||||
trap_S_StartLocalSound( cgs.media.lensSound, CHAN_ITEM);
|
trap_S_StartLocalSound( cgs.media.lensSound, CHAN_ITEM);
|
||||||
if (cg_RQ3_ssgZoomAssist.integer)
|
if (cg_RQ3_ssgZoomAssist.integer)
|
||||||
CG_RQ3_Zoom();
|
CG_RQ3_Zoom();
|
||||||
|
@ -2398,12 +2406,14 @@ void CG_Weapon_f( void ) {
|
||||||
{
|
{
|
||||||
CG_RQ3_GrenadeMode();
|
CG_RQ3_GrenadeMode();
|
||||||
}
|
}
|
||||||
else
|
// only play "click" sound for M4/MP5/Pistol
|
||||||
|
else if (cg.snap->ps.weapon == WP_M4 || cg.snap->ps.weapon == WP_MP5 ||
|
||||||
|
cg.snap->ps.weapon == WP_PISTOL )
|
||||||
{
|
{
|
||||||
//do weapon select sound
|
|
||||||
trap_S_StartLocalSound( cgs.media.weapToggleSound, CHAN_ITEM);
|
trap_S_StartLocalSound( cgs.media.weapToggleSound, CHAN_ITEM);
|
||||||
}
|
}
|
||||||
trap_SendClientCommand("weapon");
|
trap_SendClientCommand("weapon");
|
||||||
|
|
||||||
//Elder: added to get out of function at this point
|
//Elder: added to get out of function at this point
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2848,280 +2858,321 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
|
||||||
duration = 600;
|
duration = 600;
|
||||||
|
|
||||||
switch ( weapon ) {
|
switch ( weapon ) {
|
||||||
|
case WP_M4:
|
||||||
|
case WP_MP5:
|
||||||
|
case WP_PISTOL:
|
||||||
|
case WP_AKIMBO:
|
||||||
|
case WP_SSG3000:
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
|
||||||
//Blaze: Reaction M4
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
case WP_M4:
|
mark = cgs.media.glassMarkShader;
|
||||||
mod = cgs.media.bulletFlashModel;
|
else
|
||||||
shader = cgs.media.bulletExplosionShader;
|
mark = cgs.media.bulletMarkShader;
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
mark = cgs.media.glassMarkShader;
|
|
||||||
else
|
|
||||||
mark = cgs.media.bulletMarkShader;
|
|
||||||
|
|
||||||
r = rand() & 3;
|
r = rand() & 3;
|
||||||
if (soundType == IMPACTSOUND_METAL)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_metalric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_glassric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_ric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
radius = 8;
|
if (soundType == IMPACTSOUND_METAL)
|
||||||
break;
|
{
|
||||||
//Blaze: Reaction Pistol
|
if ( r < 2 )
|
||||||
case WP_PISTOL:
|
sfx = cgs.media.sfx_metalric1;
|
||||||
mod = cgs.media.bulletFlashModel;
|
else if ( r == 2 )
|
||||||
shader = cgs.media.bulletExplosionShader;
|
sfx = cgs.media.sfx_metalric2;
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
else
|
||||||
mark = cgs.media.glassMarkShader;
|
sfx = cgs.media.sfx_metalric3;
|
||||||
else
|
}
|
||||||
mark = cgs.media.bulletMarkShader;
|
else if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
{
|
||||||
|
if ( r < 2 )
|
||||||
|
sfx = cgs.media.sfx_glassric1;
|
||||||
|
else if ( r == 2 )
|
||||||
|
sfx = cgs.media.sfx_glassric2;
|
||||||
|
else
|
||||||
|
sfx = cgs.media.sfx_glassric3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( r == 0 )
|
||||||
|
sfx = cgs.media.sfx_ric1;
|
||||||
|
else if ( r == 1 )
|
||||||
|
sfx = cgs.media.sfx_ric2;
|
||||||
|
else
|
||||||
|
sfx = cgs.media.sfx_ric3;
|
||||||
|
}
|
||||||
|
radius = 8;
|
||||||
|
break;
|
||||||
|
|
||||||
r = rand() & 3;
|
|
||||||
if (soundType == IMPACTSOUND_METAL)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_metalric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_glassric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_ric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
radius = 8;
|
|
||||||
break;
|
|
||||||
case WP_SSG3000:
|
|
||||||
mod = cgs.media.bulletFlashModel;
|
|
||||||
shader = cgs.media.bulletExplosionShader;
|
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
mark = cgs.media.glassMarkShader;
|
|
||||||
else
|
|
||||||
mark = cgs.media.bulletMarkShader;
|
|
||||||
|
|
||||||
r = rand() & 3;
|
|
||||||
if (soundType == IMPACTSOUND_METAL)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_metalric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_glassric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_ric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
radius = 8;
|
|
||||||
break;
|
|
||||||
case WP_AKIMBO:
|
|
||||||
mod = cgs.media.bulletFlashModel;
|
|
||||||
shader = cgs.media.bulletExplosionShader;
|
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
mark = cgs.media.glassMarkShader;
|
|
||||||
else
|
|
||||||
mark = cgs.media.bulletMarkShader;
|
|
||||||
|
|
||||||
r = rand() & 3;
|
|
||||||
if (soundType == IMPACTSOUND_METAL)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_metalric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_glassric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_ric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_ric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
radius = 8;
|
|
||||||
break;
|
|
||||||
|
|
||||||
//Blaze: Reaction MP5
|
|
||||||
case WP_MP5:
|
|
||||||
mod = cgs.media.bulletFlashModel;
|
|
||||||
shader = cgs.media.bulletExplosionShader;
|
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
mark = cgs.media.glassMarkShader;
|
|
||||||
else
|
|
||||||
mark = cgs.media.bulletMarkShader;
|
|
||||||
|
|
||||||
r = rand() & 3;
|
|
||||||
if (soundType == IMPACTSOUND_METAL)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_metalric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_metalric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
{
|
|
||||||
if ( r < 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric1;
|
|
||||||
} else if ( r == 2 ) {
|
|
||||||
sfx = cgs.media.sfx_glassric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_glassric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( r == 0 ) {
|
|
||||||
sfx = cgs.media.sfx_ric1;
|
|
||||||
} else if ( r == 1 ) {
|
|
||||||
sfx = cgs.media.sfx_ric2;
|
|
||||||
} else {
|
|
||||||
sfx = cgs.media.sfx_ric3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
radius = 8;
|
|
||||||
break;
|
|
||||||
//Blaze: Reaction Shotgun
|
|
||||||
case WP_M3:
|
|
||||||
mod = cgs.media.bulletFlashModel;
|
|
||||||
shader = cgs.media.bulletExplosionShader;
|
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
mark = cgs.media.glassMarkShader;
|
|
||||||
else
|
|
||||||
mark = cgs.media.bulletMarkShader;
|
|
||||||
sfx = 0;
|
|
||||||
radius = 4;
|
|
||||||
break;
|
|
||||||
case WP_HANDCANNON:
|
|
||||||
mod = cgs.media.bulletFlashModel;
|
|
||||||
shader = cgs.media.bulletExplosionShader;
|
|
||||||
if (soundType == IMPACTSOUND_GLASS)
|
|
||||||
mark = cgs.media.glassMarkShader;
|
|
||||||
else
|
|
||||||
mark = cgs.media.bulletMarkShader;
|
|
||||||
sfx = 0;
|
|
||||||
radius = 4;
|
|
||||||
break;
|
|
||||||
case WP_GRENADE:
|
|
||||||
mod = cgs.media.dishFlashModel;
|
|
||||||
shader = cgs.media.grenadeExplosionShader;
|
|
||||||
sfx = cgs.media.sfx_rockexp;
|
|
||||||
mark = cgs.media.burnMarkShader;
|
|
||||||
radius = 96; //64
|
|
||||||
light = 350; //300
|
|
||||||
isSprite = qtrue;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WP_KNIFE:
|
|
||||||
/*
|
/*
|
||||||
mod = cgs.media.dishFlashModel;
|
//Blaze: Reaction M4
|
||||||
//shader = cgs.media.grenadeExplosionShader;
|
case WP_M4:
|
||||||
sfx = cgs.media.sfx_rockexp;
|
mod = cgs.media.bulletFlashModel;
|
||||||
mark = cgs.media.burnMarkShader;
|
shader = cgs.media.bulletExplosionShader;
|
||||||
radius = 64;
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
light = 300;
|
mark = cgs.media.glassMarkShader;
|
||||||
isSprite = qtrue;
|
else
|
||||||
break;
|
mark = cgs.media.bulletMarkShader;
|
||||||
|
|
||||||
|
r = rand() & 3;
|
||||||
|
if (soundType == IMPACTSOUND_METAL)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_metalric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_glassric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_ric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
radius = 8;
|
||||||
|
break;
|
||||||
|
//Blaze: Reaction Pistol
|
||||||
|
case WP_PISTOL:
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
mark = cgs.media.glassMarkShader;
|
||||||
|
else
|
||||||
|
mark = cgs.media.bulletMarkShader;
|
||||||
|
|
||||||
|
r = rand() & 3;
|
||||||
|
if (soundType == IMPACTSOUND_METAL)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_metalric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_glassric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_ric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
radius = 8;
|
||||||
|
break;
|
||||||
|
case WP_SSG3000:
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
mark = cgs.media.glassMarkShader;
|
||||||
|
else
|
||||||
|
mark = cgs.media.bulletMarkShader;
|
||||||
|
|
||||||
|
r = rand() & 3;
|
||||||
|
if (soundType == IMPACTSOUND_METAL)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_metalric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_glassric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_ric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
radius = 8;
|
||||||
|
break;
|
||||||
|
case WP_AKIMBO:
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
mark = cgs.media.glassMarkShader;
|
||||||
|
else
|
||||||
|
mark = cgs.media.bulletMarkShader;
|
||||||
|
|
||||||
|
r = rand() & 3;
|
||||||
|
if (soundType == IMPACTSOUND_METAL)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_metalric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_glassric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_ric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_ric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
radius = 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//Blaze: Reaction MP5
|
||||||
|
case WP_MP5:
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
mark = cgs.media.glassMarkShader;
|
||||||
|
else
|
||||||
|
mark = cgs.media.bulletMarkShader;
|
||||||
|
|
||||||
|
r = rand() & 3;
|
||||||
|
if (soundType == IMPACTSOUND_METAL)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_metalric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_metalric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (soundType == IMPACTSOUND_GLASS)
|
||||||
|
{
|
||||||
|
if ( r < 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric1;
|
||||||
|
} else if ( r == 2 ) {
|
||||||
|
sfx = cgs.media.sfx_glassric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_glassric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( r == 0 ) {
|
||||||
|
sfx = cgs.media.sfx_ric1;
|
||||||
|
} else if ( r == 1 ) {
|
||||||
|
sfx = cgs.media.sfx_ric2;
|
||||||
|
} else {
|
||||||
|
sfx = cgs.media.sfx_ric3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
radius = 8;
|
||||||
|
break;
|
||||||
*/
|
*/
|
||||||
if (weapModification == RQ3_WPMOD_KNIFESLASH)
|
|
||||||
{
|
case WP_M3:
|
||||||
|
case WP_HANDCANNON:
|
||||||
mod = cgs.media.bulletFlashModel;
|
mod = cgs.media.bulletFlashModel;
|
||||||
shader = cgs.media.bulletExplosionShader;
|
shader = cgs.media.bulletExplosionShader;
|
||||||
mark = cgs.media.slashMarkShader;
|
if (soundType == IMPACTSOUND_GLASS)
|
||||||
sfx = cgs.media.knifeClankSound;
|
mark = cgs.media.glassMarkShader;
|
||||||
radius = rand() % 4 + 6;
|
else
|
||||||
}
|
mark = cgs.media.bulletMarkShader;
|
||||||
else
|
sfx = 0;
|
||||||
{
|
radius = 4;
|
||||||
mod = cgs.media.bulletFlashModel;
|
break;
|
||||||
shader = cgs.media.bulletExplosionShader;
|
|
||||||
sfx = cgs.media.knifeClankSound;
|
case WP_GRENADE:
|
||||||
}
|
mod = cgs.media.dishFlashModel;
|
||||||
break;
|
shader = cgs.media.grenadeExplosionShader;
|
||||||
default:
|
sfx = cgs.media.sfx_rockexp;
|
||||||
break;
|
mark = cgs.media.burnMarkShader;
|
||||||
|
radius = 96; //64
|
||||||
|
light = 350; //300
|
||||||
|
isSprite = qtrue;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WP_KNIFE:
|
||||||
|
/*
|
||||||
|
mod = cgs.media.dishFlashModel;
|
||||||
|
//shader = cgs.media.grenadeExplosionShader;
|
||||||
|
sfx = cgs.media.sfx_rockexp;
|
||||||
|
mark = cgs.media.burnMarkShader;
|
||||||
|
radius = 64;
|
||||||
|
light = 300;
|
||||||
|
isSprite = qtrue;
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
if (weapModification == RQ3_WPMOD_KNIFESLASH)
|
||||||
|
{
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
mark = cgs.media.slashMarkShader;
|
||||||
|
sfx = cgs.media.knifeClankSound;
|
||||||
|
radius = rand() % 4 + 6;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mod = cgs.media.bulletFlashModel;
|
||||||
|
shader = cgs.media.bulletExplosionShader;
|
||||||
|
sfx = cgs.media.knifeClankSound;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Knives, SSG, and grenades always play sound
|
//
|
||||||
if (weapon == WP_KNIFE || weapon == WP_SSG3000 || weapon == WP_GRENADE)
|
// ricochet sound
|
||||||
|
//
|
||||||
|
if (weapon == WP_KNIFE || weapon == WP_SSG3000 || weapon == WP_GRENADE ||
|
||||||
|
soundType == IMPACTSOUND_METAL )
|
||||||
i = 1;
|
i = 1;
|
||||||
else
|
else
|
||||||
//Elder: 90% of the time render a bullet ricochet sound
|
//Elder: 90% of the time render a bullet ricochet sound
|
||||||
|
@ -3153,18 +3204,21 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
|
||||||
// impact mark
|
// impact mark
|
||||||
//
|
//
|
||||||
alphaFade = (mark == cgs.media.energyMarkShader); // plasma fades alpha, all others fade color
|
alphaFade = (mark == cgs.media.energyMarkShader); // plasma fades alpha, all others fade color
|
||||||
|
|
||||||
//Blaze: No more railgun
|
//Blaze: No more railgun
|
||||||
//if ( weapon == WP_RAILGUN ) {
|
/*
|
||||||
// float *color;
|
if ( weapon == WP_RAILGUN ) {
|
||||||
|
float *color;
|
||||||
|
|
||||||
// colorize with client color
|
// colorize with client color
|
||||||
// color = cgs.clientinfo[clientNum].color;
|
color = cgs.clientinfo[clientNum].color;
|
||||||
// CG_ImpactMark( mark, origin, dir, random()*360, color[0],color[1], color[2],1, alphaFade, radius, qfalse );
|
CG_ImpactMark( mark, origin, dir, random()*360, color[0],color[1], color[2],1, alphaFade, radius, qfalse );
|
||||||
//} else {
|
} else {
|
||||||
|
*/
|
||||||
|
|
||||||
// Elder: Our knife slashes aren't vertical so don't go beyond 45 degrees
|
// Elder: Our knife slashes are vertical
|
||||||
if (weapon == WP_KNIFE)
|
if (weapon == WP_KNIFE)
|
||||||
angle = random() * 90 + 45;
|
angle = random() * 90;
|
||||||
else
|
else
|
||||||
angle = random() * 360;
|
angle = random() * 360;
|
||||||
|
|
||||||
|
@ -3173,6 +3227,10 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// impact visual effects
|
||||||
|
//
|
||||||
|
|
||||||
//Elder: 75% of the time render a smoke puff
|
//Elder: 75% of the time render a smoke puff
|
||||||
i = rand() % 4;
|
i = rand() % 4;
|
||||||
if (cg_RQ3_impactEffects.integer && i < 3)
|
if (cg_RQ3_impactEffects.integer && i < 3)
|
||||||
|
@ -3184,6 +3242,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
|
||||||
case WP_MP5:
|
case WP_MP5:
|
||||||
case WP_M4:
|
case WP_M4:
|
||||||
case WP_PISTOL:
|
case WP_PISTOL:
|
||||||
|
case WP_AKIMBO:
|
||||||
case WP_SSG3000:
|
case WP_SSG3000:
|
||||||
puffDir[0] = 0;
|
puffDir[0] = 0;
|
||||||
puffDir[1] = 0;
|
puffDir[1] = 0;
|
||||||
|
@ -3200,7 +3259,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin,
|
||||||
650,
|
650,
|
||||||
cg.time, 0,
|
cg.time, 0,
|
||||||
LEF_PUFF_DONT_SCALE,
|
LEF_PUFF_DONT_SCALE,
|
||||||
cgs.media.smokePuffShader );
|
cgs.media.smokePuffAnimShader );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3370,7 +3429,7 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum, int shellWe
|
||||||
// SURF_NOIMPACT will not make a flame puff or a mark
|
// SURF_NOIMPACT will not make a flame puff or a mark
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( tr.surfaceFlags & SURF_METALSTEPS )
|
if ( (tr.surfaceFlags & SURF_METALSTEPS) || (tr.surfaceFlags & SURF_METAL2) )
|
||||||
{
|
{
|
||||||
//Blaze: Changed WP_SHOTGUN to WP_M3
|
//Blaze: Changed WP_SHOTGUN to WP_M3
|
||||||
if (shellWeapon == WP_M3)
|
if (shellWeapon == WP_M3)
|
||||||
|
@ -3394,13 +3453,14 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum, int shellWe
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Blaze: Changed WP_SHOTGUN to WP_M3
|
// Elder: By default, the M3 and HC will spark on all surfaces
|
||||||
|
// Blaze: Changed WP_SHOTGUN to WP_M3
|
||||||
if (shellWeapon == WP_M3)
|
if (shellWeapon == WP_M3)
|
||||||
CG_MissileHitWall( WP_M3, 0, tr.endpos, tr.plane.normal, IMPACTSOUND_DEFAULT, 0 );
|
CG_MissileHitWall( WP_M3, 0, tr.endpos, tr.plane.normal, IMPACTSOUND_METAL, 0 );
|
||||||
else if (shellWeapon == WP_HANDCANNON && crandom() > 0.5)
|
else if (shellWeapon == WP_HANDCANNON && crandom() > 0.5)
|
||||||
{
|
{
|
||||||
//Elder: show only approximately every other impact mark
|
//Elder: show only approximately every other impact mark
|
||||||
CG_MissileHitWall( WP_HANDCANNON, 0, tr.endpos, tr.plane.normal, IMPACTSOUND_DEFAULT, 0 );
|
CG_MissileHitWall( WP_HANDCANNON, 0, tr.endpos, tr.plane.normal, IMPACTSOUND_METAL, 0 );
|
||||||
}
|
}
|
||||||
//CG_MissileHitWall( WP_M3, 0, tr.endpos, tr.plane.normal, IMPACTSOUND_DEFAULT, 0 );
|
//CG_MissileHitWall( WP_M3, 0, tr.endpos, tr.plane.normal, IMPACTSOUND_DEFAULT, 0 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue