Renamed weapons in weapon_t ...

... to more common names WP_0 to WP_15.
This commit is contained in:
Walter Julius Hennecke 2012-03-16 13:05:41 +01:00
parent f7ff41879b
commit 0acb013a7a
40 changed files with 1071 additions and 1071 deletions

View file

@ -1368,7 +1368,7 @@ static void CG_DrawStatusBar( void )
// Radar // Radar
// By Sam "-=Jazz=-"Dickinson // By Sam "-=Jazz=-"Dickinson
// http://www.telefragged.com/jazz // http://www.telefragged.com/jazz
if ( ( cg.snap->ps.weapon == WP_TRICORDER || cg.snap->ps.weapon == WP_COMPRESSION_RIFLE ) && cg_drawradar.integer != 0 && !cg.zoomed ) if ( ( cg.snap->ps.weapon == WP_2 || cg.snap->ps.weapon == WP_6 ) && cg_drawradar.integer != 0 && !cg.zoomed )
{ {
vec4_t radColor; vec4_t radColor;
@ -3042,7 +3042,7 @@ static void CG_DrawCrosshair(void) {
} }
//TiM: With the new crosshair rendering system, this should be no problem //TiM: With the new crosshair rendering system, this should be no problem
/*if ( cg.snap->ps.weapon == WP_NULL_HAND ) { //Teh hand has no crosshair /*if ( cg.snap->ps.weapon == WP_1 ) { //Teh hand has no crosshair
return; return;
}*/ }*/
@ -3133,25 +3133,25 @@ static void CG_DrawCrosshair(void) {
/*switch(cg.snap->ps.weapon) /*switch(cg.snap->ps.weapon)
{ {
default: default:
case WP_PHASER: hShader = cgs.media.crosshair[0]; break; case WP_5: hShader = cgs.media.crosshair[0]; break;
case WP_COMPRESSION_RIFLE: hShader = cgs.media.crosshair[1]; break; case WP_6: hShader = cgs.media.crosshair[1]; break;
case WP_NULL_HAND: hShader = cgs.media.crosshair[4]; break; case WP_1: hShader = cgs.media.crosshair[4]; break;
case WP_COFFEE: hShader = cgs.media.crosshair[2]; break; case WP_4: hShader = cgs.media.crosshair[2]; break;
case WP_DISRUPTOR: hShader = cgs.media.crosshair[3]; break; case WP_10: hShader = cgs.media.crosshair[3]; break;
case WP_GRENADE_LAUNCHER: hShader = cgs.media.crosshair[6]; break; case WP_8: hShader = cgs.media.crosshair[6]; break;
case WP_TR116: hShader = cgs.media.crosshair[5]; break; case WP_7: hShader = cgs.media.crosshair[5]; break;
case WP_QUANTUM_BURST: hShader = cgs.media.crosshair[7]; break; case WP_9: hShader = cgs.media.crosshair[7]; break;
case WP_DERMAL_REGEN: hShader = cgs.media.crosshair[8]; break; case WP_13: hShader = cgs.media.crosshair[8]; break;
case WP_VOYAGER_HYPO: hShader = cgs.media.crosshair[9]; break; case WP_12: hShader = cgs.media.crosshair[9]; break;
case WP_TOOLKIT: hShader = cgs.media.crosshair[11]; break; case WP_14: hShader = cgs.media.crosshair[11]; break;
case WP_MEDKIT: hShader = cgs.media.crosshair[10]; break; case WP_11: hShader = cgs.media.crosshair[10]; break;
case WP_TRICORDER: hShader = cgs.media.crosshair[14]; break; case WP_2: hShader = cgs.media.crosshair[14]; break;
case WP_PADD: hShader = cgs.media.crosshair[13]; break; case WP_3: hShader = cgs.media.crosshair[13]; break;
case WP_NEUTRINO_PROBE: hShader = cgs.media.crosshair[12]; break; case WP_NEUTRINO_PROBE: hShader = cgs.media.crosshair[12]; break;
}*/ }*/
//If admins scan non-players //If admins scan non-players
if ( cg.predictedPlayerState.weapon == WP_TRICORDER && cg.predictedPlayerState.eFlags & EF_FIRING ) { if ( cg.predictedPlayerState.weapon == WP_2 && cg.predictedPlayerState.eFlags & EF_FIRING ) {
if (/*cg.predictedPlayerState.persistant[PERS_CLASS] == PC_ADMIN*/cg_showEntityNums.integer && cgs.clientinfo[cg.snap->ps.clientNum].isAdmin && cg.crosshairClientNum < ENTITYNUM_WORLD ) { if (/*cg.predictedPlayerState.persistant[PERS_CLASS] == PC_ADMIN*/cg_showEntityNums.integer && cgs.clientinfo[cg.snap->ps.clientNum].isAdmin && cg.crosshairClientNum < ENTITYNUM_WORLD ) {
vec4_t ccolor; vec4_t ccolor;
/*color[0] = colorTable[CT_YELLOW][0]; /*color[0] = colorTable[CT_YELLOW][0];
@ -3750,7 +3750,7 @@ static void CG_ScanForCrosshairEntity( void ) {
//VectorMA( start, 8192, cg.refdef.viewaxis[0], end ); //VectorMA( start, 8192, cg.refdef.viewaxis[0], end );
if ( cg.snap->ps.weapon == WP_TR116 && cg.zoomed ) { if ( cg.snap->ps.weapon == WP_7 && cg.zoomed ) {
CG_Trace( &trace, start, vec3_origin, vec3_origin, end, CG_Trace( &trace, start, vec3_origin, vec3_origin, end,
cg.snap->ps.clientNum, CONTENTS_BODY ); cg.snap->ps.clientNum, CONTENTS_BODY );
@ -3763,7 +3763,7 @@ static void CG_ScanForCrosshairEntity( void ) {
CG_Trace( &trace, start, vec3_origin, vec3_origin, end, CG_Trace( &trace, start, vec3_origin, vec3_origin, end,
cg.snap->ps.clientNum, MASK_SHOT ); //CONTENTS_SOLID|CONTENTS_BODY cg.snap->ps.clientNum, MASK_SHOT ); //CONTENTS_SOLID|CONTENTS_BODY
if ( cg.predictedPlayerState.weapon == WP_TRICORDER && cg.predictedPlayerState.eFlags & EF_FIRING if ( cg.predictedPlayerState.weapon == WP_2 && cg.predictedPlayerState.eFlags & EF_FIRING
&& (cg_entities[trace.entityNum].currentState.eType == ET_TRIC_STRING || cg_entities[trace.entityNum].currentState.eType == ET_MOVER_STR) ) && (cg_entities[trace.entityNum].currentState.eType == ET_TRIC_STRING || cg_entities[trace.entityNum].currentState.eType == ET_MOVER_STR) )
{ {
//Never mind if it's a valid useable ent //Never mind if it's a valid useable ent
@ -3843,7 +3843,7 @@ static void CG_DrawCrosshairNames( void ) {
//If they're actively firing the tricorder //If they're actively firing the tricorder
if( ( (cg.snap->ps.eFlags & EF_FIRING) && !(cg.snap->ps.eFlags & EF_ALT_FIRING) ) if( ( (cg.snap->ps.eFlags & EF_FIRING) && !(cg.snap->ps.eFlags & EF_ALT_FIRING) )
&& cg.snap->ps.weapon == WP_TRICORDER ) { && cg.snap->ps.weapon == WP_2 ) {
if(cg.crosshairClientNum != cg.predictedPlayerState.clientNum && cg.crosshairClientNum < MAX_CLIENTS ) { //ENTITYNUM_WORLD if(cg.crosshairClientNum != cg.predictedPlayerState.clientNum && cg.crosshairClientNum < MAX_CLIENTS ) { //ENTITYNUM_WORLD
drawCrosshairName = qfalse; drawCrosshairName = qfalse;
@ -3979,7 +3979,7 @@ static void CG_DrawCrosshairNames( void ) {
Com_sprintf( namestr, sizeof( namestr), "%s: %s", "Name", name ); Com_sprintf( namestr, sizeof( namestr), "%s: %s", "Name", name );
if ( cent->currentState.weapon != WP_NULL_HAND /*&& cg_weapons[ cent->currentState.weapon ].item*/ ) if ( cent->currentState.weapon != WP_1 /*&& cg_weapons[ cent->currentState.weapon ].item*/ )
{ {
if ( cg_weapons[ cent->currentState.weapon ].item->pickup_name ) { if ( cg_weapons[ cent->currentState.weapon ].item->pickup_name ) {
weap = cg_weapons[ cent->currentState.weapon ].item->pickup_name; weap = cg_weapons[ cent->currentState.weapon ].item->pickup_name;
@ -4463,7 +4463,7 @@ static void CG_DrawZoomMask( void )
return; return;
}*/ }*/
//TiM: New system. :) Base zoom on current active weapon. :) //TiM: New system. :) Base zoom on current active weapon. :)
if ( !(cg.snap->ps.weapon == WP_COMPRESSION_RIFLE || cg.snap->ps.weapon == WP_TR116) ) if ( !(cg.snap->ps.weapon == WP_6 || cg.snap->ps.weapon == WP_7) )
{ {
cg.zoomed = qfalse; cg.zoomed = qfalse;
cg.zoomLocked = qfalse; cg.zoomLocked = qfalse;
@ -4497,7 +4497,7 @@ static void CG_DrawZoomMask( void )
// Set fade color // Set fade color
trap_R_SetColor( color1 ); trap_R_SetColor( color1 );
if ( cg.snap->ps.weapon == WP_TR116 ) { if ( cg.snap->ps.weapon == WP_7 ) {
static int TR116LoopTime = 0; static int TR116LoopTime = 0;
//Loop the whirring sight sound //Loop the whirring sight sound
@ -4582,7 +4582,7 @@ static void CG_DrawZoomMask( void )
*/ */
//yellow //yellow
if ( cg.snap->ps.weapon == WP_TR116 ) { if ( cg.snap->ps.weapon == WP_7 ) {
color1[0] = 0.886f; color1[0] = 0.886f;
color1[1] = 0.749f; color1[1] = 0.749f;
color1[2] = 0.0f; color1[2] = 0.0f;
@ -4596,7 +4596,7 @@ static void CG_DrawZoomMask( void )
} }
// Convert zoom and view axis into some numbers to throw onto the screen // Convert zoom and view axis into some numbers to throw onto the screen
if ( cg.snap->ps.weapon == WP_TR116 ) { if ( cg.snap->ps.weapon == WP_7 ) {
x = 74; x = 74;
y = 340; y = 340;
} }
@ -4639,7 +4639,7 @@ static void CG_DrawZoomMask( void )
} }
trap_R_SetColor( color1 ); trap_R_SetColor( color1 );
if ( cg.snap->ps.weapon == WP_TR116 ) { if ( cg.snap->ps.weapon == WP_7 ) {
CG_DrawPic( start_x, start_y, width, height, cgs.media.zoomMask116Shader ); CG_DrawPic( start_x, start_y, width, height, cgs.media.zoomMask116Shader );
} }
else { else {

View file

@ -349,22 +349,22 @@ static void CG_Item( centity_t *cent ) {
// float scale; // float scale;
// RPG-X: Marcin: Custom angles for each weapon so they lie on the ground correctly. - 06/12/2008 // RPG-X: Marcin: Custom angles for each weapon so they lie on the ground correctly. - 06/12/2008
const vec3_t weaponangles[WP_NUM_WEAPONS] = { const vec3_t weaponangles[WP_NUM_WEAPONS] = {
{ 0, 0, 0 }, // WP_NONE { 0, 0, 0 }, // WP_0
{ 0, 0, 0 }, // WP_NULL_HAND { 0, 0, 0 }, // WP_1
{ 52, 280, 18 }, // WP_TRICORDER { 52, 280, 18 }, // WP_2
{ 48, 26, 33 }, // WP_PADD { 48, 26, 33 }, // WP_3
{ 335, 210, 347 }, // WP_COFFEE { 335, 210, 347 }, // WP_4
{ 15, 160, 65 }, // WP_PHASER { 15, 160, 65 }, // WP_5
{ 5, 10, 70 }, // WP_COMPRESSION_RIFLE { 5, 10, 70 }, // WP_6
{ 5, 6, 70 }, // WP_TR116 { 5, 6, 70 }, // WP_7
{ 5, 17, 70 }, // WP_GRENADE_LAUNCHER { 5, 17, 70 }, // WP_8
{ 350, 23, 70 }, // WP_QUANTUM_BURST { 350, 23, 70 }, // WP_9
{ 15, 187, 80 }, // WP_DISRUPTOR { 15, 187, 80 }, // WP_10
{ 0, 270, 86 }, // WP_MEDKIT { 0, 270, 86 }, // WP_11
{ 0, 247, 90 }, // WP_VOYAGER_HYPO { 0, 247, 90 }, // WP_12
{ 36, 190, 40 }, // WP_DERMAL_REGEN { 36, 190, 40 }, // WP_13
{ 0, 0, 105 }, // WP_TOOLKIT { 0, 0, 105 }, // WP_14
{ 0, 210, 90 } // WP_HYPERSPANNER { 0, 210, 90 } // WP_15
}; };
es = &cent->currentState; es = &cent->currentState;
@ -691,7 +691,7 @@ static void CG_Missile( centity_t *cent, qboolean altfire ) {
VectorCopy( cent->lerpOrigin, ent.origin); VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin); VectorCopy( cent->lerpOrigin, ent.oldorigin);
if ( cent->currentState.weapon == WP_QUANTUM_BURST ) { if ( cent->currentState.weapon == WP_9 ) {
ent.reType = RT_SPRITE; ent.reType = RT_SPRITE;
ent.data.sprite.radius = 16; ent.data.sprite.radius = 16;
ent.data.sprite.rotation = 0; ent.data.sprite.rotation = 0;
@ -716,7 +716,7 @@ static void CG_Missile( centity_t *cent, qboolean altfire ) {
} }
// spin as it moves // spin as it moves
if ( s1->pos.trType != TR_STATIONARY && (cent->currentState.weapon != WP_DISRUPTOR) ) { //RPG-X-TiM: Stop from spinning O_o I got dizzy if ( s1->pos.trType != TR_STATIONARY && (cent->currentState.weapon != WP_10) ) { //RPG-X-TiM: Stop from spinning O_o I got dizzy
//RotateAroundDirection( ent.axis, cg.time / 4 ); //RotateAroundDirection( ent.axis, cg.time / 4 );
RotateAroundDirection( ent.axis, cg.time * 0.25); RotateAroundDirection( ent.axis, cg.time * 0.25);
} else { } else {

View file

@ -387,8 +387,8 @@ static void CG_ItemPickup( int itemNum ) {
case 1: case 1:
// safe switching // safe switching
if ( (nNewWpn > nCurWpn) && if ( (nNewWpn > nCurWpn) &&
!(nNewWpn == WP_GRENADE_LAUNCHER) && !(nNewWpn == WP_8) &&
!(nNewWpn == WP_QUANTUM_BURST) ) !(nNewWpn == WP_9) )
{ {
// switch to new wpn // switch to new wpn
cg.weaponSelectTime = cg.time; cg.weaponSelectTime = cg.time;
@ -1077,7 +1077,7 @@ case EV_SHAKE_SOUND:
case EV_GRENADE_EXPLODE: case EV_GRENADE_EXPLODE:
DEBUGNAME("EV_GRENADE_EXPLODE"); DEBUGNAME("EV_GRENADE_EXPLODE");
CG_MissileHitWall( cent, WP_GRENADE_LAUNCHER, position, normal ); CG_MissileHitWall( cent, WP_8, position, normal );
break; break;
case EV_GRENADE_SHRAPNEL_EXPLODE: case EV_GRENADE_SHRAPNEL_EXPLODE:

View file

@ -1644,11 +1644,11 @@ void CG_InitModRules( void )
{ {
if ( cgs.pModDisintegration ) if ( cgs.pModDisintegration )
{//don't use up ammo in disintegration mode {//don't use up ammo in disintegration mode
altAmmoUsage[WP_COMPRESSION_RIFLE] = 0; altAmmoUsage[WP_6] = 0;
} }
if ( cgs.pModSpecialties ) if ( cgs.pModSpecialties )
{//tripwires use more ammo {//tripwires use more ammo
altAmmoUsage[WP_GRENADE_LAUNCHER] = 3; altAmmoUsage[WP_8] = 3;
} }
} }
@ -1723,7 +1723,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence ) {
BG_LoadItemNames(); BG_LoadItemNames();
cg.weaponSelect = WP_NULL_HAND; cg.weaponSelect = WP_1;
cgs.redflag = cgs.blueflag = -1; // For compatibily, default to unset for cgs.redflag = cgs.blueflag = -1; // For compatibily, default to unset for
// old servers // old servers

View file

@ -3969,7 +3969,7 @@ void CG_AddRefEntityWithPowerups( refEntity_t *ent, int powerups, int eFlags, be
if ( random() > 0.95f ) if ( random() > 0.95f )
{ {
// Play a zap sound to go it. // Play a zap sound to go it.
trap_S_StartSound (ent->origin, entNum, CHAN_AUTO, cg_weapons[WP_DERMAL_REGEN].altHitSound); trap_S_StartSound (ent->origin, entNum, CHAN_AUTO, cg_weapons[WP_13].altHitSound);
} }
} }
} }
@ -4133,15 +4133,15 @@ void CG_AttachHolsters ( centity_t *cent, refEntity_t *parent, int weapon )
holsterInner.shadowPlane = parent->shadowPlane; holsterInner.shadowPlane = parent->shadowPlane;
holsterInner.renderfx = parent->renderfx; holsterInner.renderfx = parent->renderfx;
holster.hModel = (weapon == WP_PHASER) ? cgs.media.phaserHolster : cgs.media.tricorderHolster; holster.hModel = (weapon == WP_5) ? cgs.media.phaserHolster : cgs.media.tricorderHolster;
holsterInner.hModel = (weapon == WP_PHASER) ? cgs.media.phaserHolsterInner : cgs.media.tricorderHolsterInner; holsterInner.hModel = (weapon == WP_5) ? cgs.media.phaserHolsterInner : cgs.media.tricorderHolsterInner;
if ( !holster.hModel ) { if ( !holster.hModel ) {
return; return;
} }
CG_PositionEntityOnTag( &holster, parent, parent->hModel, (weapon == WP_PHASER) ? "tag_p_holster" : "tag_t_holster" ); CG_PositionEntityOnTag( &holster, parent, parent->hModel, (weapon == WP_5) ? "tag_p_holster" : "tag_t_holster" );
CG_PositionEntityOnTag( &holsterInner, &holster, holster.hModel, (weapon == WP_PHASER) ? "tag_phaser" : "tag_tricorder" ); CG_PositionEntityOnTag( &holsterInner, &holster, holster.hModel, (weapon == WP_5) ? "tag_phaser" : "tag_tricorder" );
CG_AddRefEntityWithPowerups( &holster, cent->currentState.powerups, cent->currentState.eFlags, &cent->beamData, cent->cloakTime, cent->decloakTime, qfalse ); CG_AddRefEntityWithPowerups( &holster, cent->currentState.powerups, cent->currentState.eFlags, &cent->beamData, cent->cloakTime, cent->decloakTime, qfalse );
@ -4172,7 +4172,7 @@ void CG_AttachTools ( centity_t *cent, refEntity_t *parent, int weaponNum )
return; return;
} }
CG_PositionEntityOnTag( &tool, parent, parent->hModel, (weaponNum == WP_MEDKIT) ? "tag_torso" : "tag_lhand" ); CG_PositionEntityOnTag( &tool, parent, parent->hModel, (weaponNum == WP_11) ? "tag_torso" : "tag_lhand" );
if ( cent->currentState.weapon != weaponNum ) { if ( cent->currentState.weapon != weaponNum ) {
CG_AddRefEntityWithPowerups( &tool, cent->currentState.powerups, cent->currentState.eFlags, &cent->beamData, cent->cloakTime, cent->decloakTime, qfalse ); CG_AddRefEntityWithPowerups( &tool, cent->currentState.powerups, cent->currentState.eFlags, &cent->beamData, cent->cloakTime, cent->decloakTime, qfalse );
@ -4424,7 +4424,7 @@ void CG_Player( centity_t *cent ) {
//append this flag if zooming thru the TR-116. //append this flag if zooming thru the TR-116.
//It'll render players over everything else. Not quite as good as the TV 116, but it'll do the job. :) //It'll render players over everything else. Not quite as good as the TV 116, but it'll do the job. :)
if ( cg.snap->ps.weapon == WP_TR116 && cg.zoomed ) { if ( cg.snap->ps.weapon == WP_7 && cg.zoomed ) {
renderfx |= RF_DEPTHHACK; //This flag makes making haxx for EF SO EASY!!!! O_O!!!!! renderfx |= RF_DEPTHHACK; //This flag makes making haxx for EF SO EASY!!!! O_O!!!!!
} }
@ -4859,7 +4859,7 @@ void CG_Player( centity_t *cent ) {
//============================================================================= //=============================================================================
//TR-116 EyeScope!! :) //TR-116 EyeScope!! :)
// //
if ( cent->currentState.weapon == WP_TR116 ) if ( cent->currentState.weapon == WP_7 )
{ {
refEntity_t eyeScope; refEntity_t eyeScope;
@ -4906,7 +4906,7 @@ void CG_Player( centity_t *cent ) {
} }
//medical scanner //medical scanner
if ( cgs.classData[ci->pClass].isMedic && cent->currentState.weapon == WP_TRICORDER ) if ( cgs.classData[ci->pClass].isMedic && cent->currentState.weapon == WP_2 )
{ {
refEntity_t scanner; refEntity_t scanner;
@ -4977,23 +4977,23 @@ void CG_Player( centity_t *cent ) {
//should transmit each player's weapon list here, so we can make it dynamic now //should transmit each player's weapon list here, so we can make it dynamic now
//if player has the phaser, bolt it //if player has the phaser, bolt it
if ( cent->currentState.time2 & 1 << WP_PHASER ) { if ( cent->currentState.time2 & 1 << WP_5 ) {
CG_AttachHolsters( cent, &holsterTags, WP_PHASER ); CG_AttachHolsters( cent, &holsterTags, WP_5 );
} }
//if player has tricorder //if player has tricorder
if ( cent->currentState.time2 & 1 << WP_TRICORDER ) { if ( cent->currentState.time2 & 1 << WP_2 ) {
CG_AttachHolsters( cent, &holsterTags, WP_TRICORDER ); CG_AttachHolsters( cent, &holsterTags, WP_2 );
} }
//if player has medkit //if player has medkit
if ( cent->currentState.time2 & 1 << WP_MEDKIT ) { if ( cent->currentState.time2 & 1 << WP_11 ) {
CG_AttachTools( cent, &torso, WP_MEDKIT ); CG_AttachTools( cent, &torso, WP_11 );
} }
//if player has toolkit //if player has toolkit
if ( cent->currentState.time2 & 1 << WP_TOOLKIT ) { if ( cent->currentState.time2 & 1 << WP_14 ) {
CG_AttachTools( cent, &torso, WP_TOOLKIT ); CG_AttachTools( cent, &torso, WP_14 );
} }
/*switch ( ci->pClass ) { /*switch ( ci->pClass ) {
@ -5002,7 +5002,7 @@ void CG_Player( centity_t *cent ) {
case PC_SECURITY: case PC_SECURITY:
case PC_SCIENCE: case PC_SCIENCE:
case PC_ADMIN: case PC_ADMIN:
CG_AttachHolsters( cent, &holsterTags, WP_PHASER ); CG_AttachHolsters( cent, &holsterTags, WP_5 );
break; break;
} }
@ -5012,19 +5012,19 @@ void CG_Player( centity_t *cent ) {
case PC_SCIENCE: case PC_SCIENCE:
case PC_MEDICAL: case PC_MEDICAL:
case PC_ADMIN: case PC_ADMIN:
CG_AttachHolsters( cent, &holsterTags, WP_TRICORDER ); CG_AttachHolsters( cent, &holsterTags, WP_2 );
break; break;
} }
switch ( ci->pClass ) { switch ( ci->pClass ) {
case PC_ENGINEER: case PC_ENGINEER:
CG_AttachTools( cent, &torso, WP_TOOLKIT ); CG_AttachTools( cent, &torso, WP_14 );
break; break;
} }
switch ( ci->pClass ) { switch ( ci->pClass ) {
case PC_MEDICAL: case PC_MEDICAL:
CG_AttachTools( cent, &torso, WP_MEDKIT ); CG_AttachTools( cent, &torso, WP_11 );
break; break;
}*/ }*/
} }

View file

@ -37,16 +37,16 @@ void CG_CheckAmmo( void ) {
total = 0; total = 0;
//TiM //TiM
//for ( i = WP_PHASER ; i < WP_NUM_WEAPONS ; i++ ) { //for ( i = WP_5 ; i < WP_NUM_WEAPONS ; i++ ) {
for ( i = WP_NULL_HAND ; i < WP_NUM_WEAPONS ; i++ ) { for ( i = WP_1 ; i < WP_NUM_WEAPONS ; i++ ) {
if ( ! ( weapons & ( 1 << i ) ) ) { if ( ! ( weapons & ( 1 << i ) ) ) {
continue; continue;
} }
switch ( i ) { switch ( i ) {
case WP_DISRUPTOR: case WP_10:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_NULL_HAND: case WP_1:
case WP_COMPRESSION_RIFLE: case WP_6:
total += cg.snap->ps.ammo[i] * 1000; total += cg.snap->ps.ammo[i] * 1000;
break; break;
default: default:

View file

@ -333,7 +333,7 @@ static void CG_TouchItem( centity_t *cent ) {
// We don't predict touching our own flag // We don't predict touching our own flag
if (item->giType == IT_TEAM) if (item->giType == IT_TEAM)
{ // NOTE: This code used to JUST check giTag. The problem is that the giTag for PW_REDFLAG { // NOTE: This code used to JUST check giTag. The problem is that the giTag for PW_REDFLAG
// is the same as WP_QUANTUM_BURST. The giTag should be a SUBCHECK after giType. // is the same as WP_9. The giTag should be a SUBCHECK after giType.
/*if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED && /*if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED &&
item->giTag == PW_REDFLAG) item->giTag == PW_REDFLAG)
return;*/ return;*/

View file

@ -1104,7 +1104,7 @@ void CG_UpdateCameraShake( vec3_t origin, vec3_t angles )
void CG_ZoomDown_f( void ) void CG_ZoomDown_f( void )
{ {
//if we're not holding a rifle or TR-116, don't draw //if we're not holding a rifle or TR-116, don't draw
if ( !( cg.snap->ps.weapon == WP_COMPRESSION_RIFLE || cg.snap->ps.weapon == WP_TR116 ) ) { if ( !( cg.snap->ps.weapon == WP_6 || cg.snap->ps.weapon == WP_7 ) ) {
cg.zoomed = qfalse; cg.zoomed = qfalse;
cg.zoomLocked = qfalse; cg.zoomLocked = qfalse;
return; return;
@ -1127,7 +1127,7 @@ void CG_ZoomDown_f( void )
cg.zoomed = qtrue; cg.zoomed = qtrue;
cg_zoomFov.value = cg_fov.value; cg_zoomFov.value = cg_fov.value;
cg.zoomTime = cg.time; cg.zoomTime = cg.time;
if ( cg.snap->ps.weapon == WP_TR116 ) { if ( cg.snap->ps.weapon == WP_7 ) {
trap_S_StartSound( cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.zoomStart116 ); trap_S_StartSound( cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.zoomStart116 );
} }
else { else {
@ -1143,7 +1143,7 @@ void CG_ZoomDown_f( void )
cg.zoomed = qfalse; cg.zoomed = qfalse;
cg.zoomTime = cg.time; cg.zoomTime = cg.time;
if ( cg.snap->ps.weapon == WP_TR116 ) { if ( cg.snap->ps.weapon == WP_7 ) {
trap_S_StartSound( cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.zoomEnd116 ); trap_S_StartSound( cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.zoomEnd116 );
} }
else { else {

View file

@ -5,14 +5,14 @@
#include "fx_local.h" #include "fx_local.h"
//RPG-X : TiM - Weapons Arrays //RPG-X : TiM - Weapons Arrays
static int RAweapons[8] = { WP_PADD, static int RAweapons[8] = { WP_3,
WP_TRICORDER, WP_2,
WP_COMPRESSION_RIFLE, WP_6,
WP_TR116, WP_7,
WP_VOYAGER_HYPO, WP_12,
WP_DERMAL_REGEN, WP_13,
WP_MEDKIT, WP_11,
WP_COFFEE WP_4
}; };
static char *RAweapFileName[8] = { "padd", static char *RAweapFileName[8] = { "padd",
@ -44,52 +44,52 @@ typedef struct wpnBarrelInfo_s
wpnBarrelInfo_t wpnBarrelData[] = wpnBarrelInfo_t wpnBarrelData[] =
{ {
{WP_NULL_HAND, 0, 0}, {WP_1, 0, 0},
{WP_TRICORDER, 0, 0}, {WP_2, 0, 0},
{WP_PADD, 0, 0}, {WP_3, 0, 0},
{WP_COFFEE, 0, 0}, {WP_4, 0, 0},
{WP_PHASER, 0, 0}, {WP_5, 0, 0},
{WP_COMPRESSION_RIFLE, 0, 120}, {WP_6, 0, 120},
{WP_TR116, 1, 60}, {WP_7, 1, 60},
{WP_GRENADE_LAUNCHER, 2, 150}, {WP_8, 2, 150},
{WP_QUANTUM_BURST, 1, 200}, {WP_9, 1, 200},
{WP_DISRUPTOR, 1, 130}, {WP_10, 1, 130},
{WP_MEDKIT, 0, 0}, {WP_11, 0, 0},
{WP_VOYAGER_HYPO, 0, 0}, {WP_12, 0, 0},
{WP_DERMAL_REGEN, 0, 0}, {WP_13, 0, 0},
{WP_TOOLKIT, 0, 0}, {WP_14, 0, 0},
{WP_HYPERSPANNER, 0, 0}, {WP_15, 0, 0},
// make sure this is the last entry in this array, please // make sure this is the last entry in this array, please
{WP_NONE, 0, 0}, {WP_0, 0, 0},
}; };
//wpnBarrelInfo_t wpnBarrelData[] = //wpnBarrelInfo_t wpnBarrelData[] =
//{ //{
// {WP_PHASER, 0, 0}, // {WP_5, 0, 0},
// {WP_COMPRESSION_RIFLE, 0, 100}, // {WP_6, 0, 100},
// {WP_NULL_HAND, 0, 0}, // {WP_1, 0, 0},
// {WP_COFFEE, 0, 0}, // {WP_4, 0, 0},
// {WP_DISRUPTOR, 1, 80}, // {WP_10, 1, 80},
// {WP_GRENADE_LAUNCHER, 2, 140}, // {WP_8, 2, 140},
// {WP_TR116, 1, 120}, // {WP_7, 1, 120},
// {WP_QUANTUM_BURST, 1, 200}, // {WP_9, 1, 200},
// {WP_DERMAL_REGEN, 0, 0}, // {WP_13, 0, 0},
// {WP_VOYAGER_HYPO, 0, 0}, // {WP_12, 0, 0},
// {WP_TOOLKIT, 0, 0}, // {WP_14, 0, 0},
// {WP_MEDKIT, 0, 0}, // {WP_11, 0, 0},
// {WP_TRICORDER, 0, 0}, // {WP_2, 0, 0},
// {WP_PADD, 0, 0}, // {WP_3, 0, 0},
// {WP_NEUTRINO_PROBE, 0, 0}, // {WP_NEUTRINO_PROBE, 0, 0},
// {WP_TR116, 0, 90}, // {WP_7, 0, 90},
// //
// // make sure this is the last entry in this array, please // // make sure this is the last entry in this array, please
// {WP_NONE, 0}, // {WP_0, 0},
//}; //};
void CG_RegisterWeapon( int weaponNum ) { void CG_RegisterWeapon( int weaponNum ) {
@ -117,7 +117,7 @@ void CG_RegisterWeapon( int weaponNum ) {
for ( item = bg_itemlist + 1 ; item->classname ; item++ ) { for ( item = bg_itemlist + 1 ; item->classname ; item++ ) {
if ( item->giType == IT_WEAPON && item->giTag == weaponNum ) { if ( item->giType == IT_WEAPON && item->giTag == weaponNum ) {
/*if ( weaponNum == WP_DISRUPTOR ) { /*if ( weaponNum == WP_10 ) {
Com_Printf( S_COLOR_RED "Registering %s with pickup name of %s\n", bg_itemlist[10].classname, bg_itemlist[10].pickup_name ); Com_Printf( S_COLOR_RED "Registering %s with pickup name of %s\n", bg_itemlist[10].classname, bg_itemlist[10].pickup_name );
}*/ }*/
weaponInfo->item = item; weaponInfo->item = item;
@ -156,7 +156,7 @@ void CG_RegisterWeapon( int weaponNum ) {
strcat( path, "_flash.md3" ); strcat( path, "_flash.md3" );
weaponInfo->flashModel = trap_R_RegisterModel( path ); weaponInfo->flashModel = trap_R_RegisterModel( path );
for (barrelInfo = wpnBarrelData; barrelInfo->giTag != WP_NONE; barrelInfo++) for (barrelInfo = wpnBarrelData; barrelInfo->giTag != WP_0; barrelInfo++)
{ {
if (barrelInfo->giTag == weaponNum) if (barrelInfo->giTag == weaponNum)
{ {
@ -186,7 +186,7 @@ void CG_RegisterWeapon( int weaponNum ) {
} }
switch ( weaponNum ) { switch ( weaponNum ) {
case WP_PHASER: case WP_5:
MAKERGB( weaponInfo->flashDlightColor, 0, 0, 0 ); MAKERGB( weaponInfo->flashDlightColor, 0, 0, 0 );
weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "phaser/phaserfiring.wav" ); weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "phaser/phaserfiring.wav" );
@ -206,12 +206,12 @@ void CG_RegisterWeapon( int weaponNum ) {
break; break;
case WP_DERMAL_REGEN: case WP_13:
weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "dermal_regen/dm_1.wav" ); weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "dermal_regen/dm_1.wav" );
weaponInfo->altFiringSound = trap_S_RegisterSound( SOUND_DIR "dermal_regen/dm_2.wav" ); weaponInfo->altFiringSound = trap_S_RegisterSound( SOUND_DIR "dermal_regen/dm_2.wav" );
break; break;
case WP_DISRUPTOR: case WP_10:
//weaponInfo->missileTrailFunc = FX_StasisProjectileThink; //weaponInfo->missileTrailFunc = FX_StasisProjectileThink;
weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/alien_disruptor/disruptor_bolt.md3" ); weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/alien_disruptor/disruptor_bolt.md3" );
weaponInfo->missileDlight = 70; weaponInfo->missileDlight = 70;
@ -237,7 +237,7 @@ void CG_RegisterWeapon( int weaponNum ) {
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/launcher/projectile.md3" ); weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/launcher/projectile.md3" );
if(rpg_ctribgrenade.integer == 1)//RPG-X: - RedTechie Possible Hack! FIX | TiM: Heh, you're a possible hack :) if(rpg_ctribgrenade.integer == 1)//RPG-X: - RedTechie Possible Hack! FIX | TiM: Heh, you're a possible hack :)
{ {
@ -272,7 +272,7 @@ void CG_RegisterWeapon( int weaponNum ) {
cgs.media.borgEyeFlareShader = trap_R_RegisterShader( "gfx/misc/borgeyeflare" ); cgs.media.borgEyeFlareShader = trap_R_RegisterShader( "gfx/misc/borgeyeflare" );
break; break;
case WP_COFFEE: case WP_4:
//MAKERGB( weaponInfo->flashDlightColor, 1, 0.6, 0.6 ); //MAKERGB( weaponInfo->flashDlightColor, 1, 0.6, 0.6 );
/*weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "scavenger/fire.wav" ); /*weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "scavenger/fire.wav" );
@ -293,7 +293,7 @@ void CG_RegisterWeapon( int weaponNum ) {
cgs.media.compressionMarkShader = trap_R_RegisterShader( "gfx/damage/burnmark1" );*/ cgs.media.compressionMarkShader = trap_R_RegisterShader( "gfx/damage/burnmark1" );*/
break; break;
case WP_QUANTUM_BURST: case WP_9:
MAKERGB( weaponInfo->flashDlightColor, 0.6, 0.6, 1 ); //Bluish MAKERGB( weaponInfo->flashDlightColor, 0.6, 0.6, 1 ); //Bluish
weaponInfo->missileTrailFunc = FX_QuantumThink; weaponInfo->missileTrailFunc = FX_QuantumThink;
@ -321,7 +321,7 @@ void CG_RegisterWeapon( int weaponNum ) {
cgs.media.quantumBoom = trap_S_RegisterSound ( SOUND_DIR "explosions/explode5.wav" ); cgs.media.quantumBoom = trap_S_RegisterSound ( SOUND_DIR "explosions/explode5.wav" );
break; break;
case WP_NULL_HAND: case WP_1:
/*MAKERGB( weaponInfo->flashDlightColor, 0.6, 0.6, 1 ); /*MAKERGB( weaponInfo->flashDlightColor, 0.6, 0.6, 1 );
weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "IMOD/fire.wav" ); weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "IMOD/fire.wav" );
@ -334,7 +334,7 @@ void CG_RegisterWeapon( int weaponNum ) {
cgs.media.imodExplosionShader = trap_R_RegisterShader( "imodExplosion" );*/ cgs.media.imodExplosionShader = trap_R_RegisterShader( "imodExplosion" );*/
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
if(!grp_berp.integer) { if(!grp_berp.integer) {
MAKERGB( weaponInfo->flashDlightColor, 0.59, 0.24, 0.25 ); MAKERGB( weaponInfo->flashDlightColor, 0.59, 0.24, 0.25 );
MAKERGB( weaponInfo->missileDlightColor, 0.59, 0.24, 0.25 ); MAKERGB( weaponInfo->missileDlightColor, 0.59, 0.24, 0.25 );
@ -369,7 +369,7 @@ void CG_RegisterWeapon( int weaponNum ) {
break; break;
/* case WP_TR116: /* case WP_7:
MAKERGB( weaponInfo->flashDlightColor, 0.16, 0.16, 1 ); MAKERGB( weaponInfo->flashDlightColor, 0.16, 0.16, 1 );
weaponInfo->flashSound = trap_S_RegisterSound( "sound/weapons/hitonhead.wav" ); weaponInfo->flashSound = trap_S_RegisterSound( "sound/weapons/hitonhead.wav" );
weaponInfo->altFlashSnd = trap_S_RegisterSound( "sound/weapons/guncharge.wav" ); weaponInfo->altFlashSnd = trap_S_RegisterSound( "sound/weapons/guncharge.wav" );
@ -378,7 +378,7 @@ void CG_RegisterWeapon( int weaponNum ) {
weaponInfo->mainHitSound = trap_S_RegisterSound( SOUND_DIR "prifle/impact.wav" ); weaponInfo->mainHitSound = trap_S_RegisterSound( SOUND_DIR "prifle/impact.wav" );
break;*/ break;*/
/* /*
case WP_TR116: //OLD CODE (replaced for TR116) case WP_7: //OLD CODE (replaced for TR116)
MAKERGB( weaponInfo->flashDlightColor, 0.6, 0.6, 1 ); MAKERGB( weaponInfo->flashDlightColor, 0.6, 0.6, 1 );
weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "tetrion/fire.wav" ); weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "tetrion/fire.wav" );
@ -398,43 +398,43 @@ void CG_RegisterWeapon( int weaponNum ) {
cgs.media.bulletmarksShader = trap_R_RegisterShader( "textures/decals/bulletmark4" ); cgs.media.bulletmarksShader = trap_R_RegisterShader( "textures/decals/bulletmark4" );
break; break;
*/ */
case WP_VOYAGER_HYPO: case WP_12:
weaponInfo->flashSound = weaponInfo->altFlashSnd = trap_S_RegisterSound( "sound/items/jetpuffmed.wav" ); weaponInfo->flashSound = weaponInfo->altFlashSnd = trap_S_RegisterSound( "sound/items/jetpuffmed.wav" );
break; break;
case WP_TRICORDER: case WP_2:
weaponInfo->firingSound= trap_S_RegisterSound( "sound/items/tricorderscan.wav" ); //altFlashSnd weaponInfo->firingSound= trap_S_RegisterSound( "sound/items/tricorderscan.wav" ); //altFlashSnd
weaponInfo->altFiringSound = trap_S_RegisterSound( "sound/ambience/voyager/medictricorder.wav" ); //flashSound weaponInfo->altFiringSound = trap_S_RegisterSound( "sound/ambience/voyager/medictricorder.wav" ); //flashSound
//weaponInfo->isAnimSndBased = qtrue; //weaponInfo->isAnimSndBased = qtrue;
break; break;
case WP_PADD: case WP_3:
weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "padd/padd_1.wav" ); //flashSound weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "padd/padd_1.wav" ); //flashSound
weaponInfo->altFiringSound = trap_S_RegisterSound( SOUND_DIR "padd/padd_2.wav" ); //altFlashSnd weaponInfo->altFiringSound = trap_S_RegisterSound( SOUND_DIR "padd/padd_2.wav" ); //altFlashSnd
weaponInfo->isAnimSndBased = qtrue; weaponInfo->isAnimSndBased = qtrue;
break; break;
case WP_HYPERSPANNER: case WP_15:
weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "hyperspanner/spanner_1.wav" ); weaponInfo->firingSound = trap_S_RegisterSound( SOUND_DIR "hyperspanner/spanner_1.wav" );
weaponInfo->altFiringSound = trap_S_RegisterSound( SOUND_DIR "hyperspanner/spanner_2.wav" ); weaponInfo->altFiringSound = trap_S_RegisterSound( SOUND_DIR "hyperspanner/spanner_2.wav" );
break; break;
case WP_TR116: case WP_7:
weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "hitonhead.wav" ); weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "hitonhead.wav" );
weaponInfo->altFlashSnd = weaponInfo->flashSound; weaponInfo->altFlashSnd = weaponInfo->flashSound;
//weaponInfo->altFlashSnd = trap_S_RegisterSound( "sound/weapons/guncharge.wav" ); //weaponInfo->altFlashSnd = trap_S_RegisterSound( "sound/weapons/guncharge.wav" );
break; break;
//Toolkit //Toolkit
case WP_TOOLKIT: case WP_14:
weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "toolkit/toolkit_1.wav" ); weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "toolkit/toolkit_1.wav" );
weaponInfo->altFlashSnd = trap_S_RegisterSound( SOUND_DIR "toolkit/toolkit_2.wav" ); weaponInfo->altFlashSnd = trap_S_RegisterSound( SOUND_DIR "toolkit/toolkit_2.wav" );
break; break;
//Medkit //Medkit
case WP_MEDKIT: case WP_11:
weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "medkit/medkit_1.wav" ); weaponInfo->flashSound = trap_S_RegisterSound( SOUND_DIR "medkit/medkit_1.wav" );
weaponInfo->altFlashSnd = trap_S_RegisterSound( SOUND_DIR "medkit/medkit_2.wav" ); weaponInfo->altFlashSnd = trap_S_RegisterSound( SOUND_DIR "medkit/medkit_2.wav" );
break; break;
@ -478,7 +478,7 @@ void CG_RegisterItemVisuals( int itemNum ) {
// since the seeker uses the scavenger rifes sounds, we must precache the scavenger rifle stuff if we hit the item seeker // since the seeker uses the scavenger rifes sounds, we must precache the scavenger rifle stuff if we hit the item seeker
/* if ( item->giTag == PW_FLASHLIGHT) /* if ( item->giTag == PW_FLASHLIGHT)
{ {
CG_RegisterWeapon( WP_COFFEE ); CG_RegisterWeapon( WP_4 );
}*/ }*/
// hang onto the handles for holdable items in case they're useable (e.g. detpack) // hang onto the handles for holdable items in case they're useable (e.g. detpack)
@ -649,21 +649,21 @@ void CG_LightningBolt( centity_t *cent, vec3_t origin )
if ( cent->currentState.clientNum == cg.snap->ps.clientNum && !cg.renderingThirdPerson && !(cent->currentState.eFlags & EF_ITEMPLACEHOLDER ) ) //fuck decoys if ( cent->currentState.clientNum == cg.snap->ps.clientNum && !cg.renderingThirdPerson && !(cent->currentState.eFlags & EF_ITEMPLACEHOLDER ) ) //fuck decoys
{ {
// different checks for first person view // different checks for first person view
if ( cg.snap->ps.weapon == WP_HYPERSPANNER || if ( cg.snap->ps.weapon == WP_15 ||
cg.snap->ps.weapon == WP_PHASER || cg.snap->ps.weapon == WP_5 ||
cg.snap->ps.weapon == WP_DERMAL_REGEN || cg.snap->ps.weapon == WP_13 ||
(cg.snap->ps.eFlags & EF_ALT_FIRING && cg.snap->ps.weapon == WP_COMPRESSION_RIFLE ) (cg.snap->ps.eFlags & EF_ALT_FIRING && cg.snap->ps.weapon == WP_6 )
|| (!(cg.snap->ps.eFlags & EF_ALT_FIRING) && cg.snap->ps.weapon == WP_DISRUPTOR ) || (!(cg.snap->ps.eFlags & EF_ALT_FIRING) && cg.snap->ps.weapon == WP_10 )
) )
{ /*continue*/ } { /*continue*/ }
else else
return; return;
} else { } else {
if ( cent->currentState.weapon == WP_HYPERSPANNER || if ( cent->currentState.weapon == WP_15 ||
cent->currentState.weapon == WP_PHASER || cent->currentState.weapon == WP_5 ||
cent->currentState.weapon == WP_DERMAL_REGEN || cent->currentState.weapon == WP_13 ||
(cent->currentState.eFlags & EF_ALT_FIRING && (cent->currentState.weapon == WP_COMPRESSION_RIFLE) ) || (cent->currentState.eFlags & EF_ALT_FIRING && (cent->currentState.weapon == WP_6) ) ||
(!(cent->currentState.eFlags & EF_ALT_FIRING) && cent->currentState.weapon == WP_DISRUPTOR) (!(cent->currentState.eFlags & EF_ALT_FIRING) && cent->currentState.weapon == WP_10)
) )
{ /*continue*/ } { /*continue*/ }
else else
@ -731,7 +731,7 @@ void CG_LightningBolt( centity_t *cent, vec3_t origin )
// Add in the effect // Add in the effect
switch ( cent->currentState.weapon ) switch ( cent->currentState.weapon )
{ {
case WP_PHASER: case WP_5:
if (cg.snap->ps.rechargeTime == 0) if (cg.snap->ps.rechargeTime == 0)
{ {
if ( cent->currentState.eFlags & EF_ALT_FIRING ) if ( cent->currentState.eFlags & EF_ALT_FIRING )
@ -740,31 +740,31 @@ void CG_LightningBolt( centity_t *cent, vec3_t origin )
FX_PhaserFire( origin, trace.endpos, trace.plane.normal, spark, impact, cent->pe.empty ); FX_PhaserFire( origin, trace.endpos, trace.plane.normal, spark, impact, cent->pe.empty );
} }
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
if ( cent->currentState.eFlags & EF_ALT_FIRING ) if ( cent->currentState.eFlags & EF_ALT_FIRING )
{ {
FX_PrifleBeamFire( origin, trace.endpos, trace.plane.normal, spark, impact, cent->pe.empty ); FX_PrifleBeamFire( origin, trace.endpos, trace.plane.normal, spark, impact, cent->pe.empty );
} }
break; break;
case WP_HYPERSPANNER: case WP_15:
if ( cent->currentState.eFlags & EF_ALT_FIRING ) if ( cent->currentState.eFlags & EF_ALT_FIRING )
FX_ProbeBeam( origin, forward, cent->currentState.clientNum, qtrue ); FX_ProbeBeam( origin, forward, cent->currentState.clientNum, qtrue );
else else
FX_ProbeBeam( origin, forward, cent->currentState.clientNum, qfalse ); FX_ProbeBeam( origin, forward, cent->currentState.clientNum, qfalse );
break; break;
case WP_DERMAL_REGEN: case WP_13:
if ( cent->currentState.eFlags & EF_ALT_FIRING ) if ( cent->currentState.eFlags & EF_ALT_FIRING )
FX_RegenBeam( origin, forward, cent->currentState.clientNum, qtrue ); FX_RegenBeam( origin, forward, cent->currentState.clientNum, qtrue );
else else
FX_RegenBeam( origin, forward, cent->currentState.clientNum, qfalse ); FX_RegenBeam( origin, forward, cent->currentState.clientNum, qfalse );
break; break;
case WP_DISRUPTOR: case WP_10:
if ( cent->currentState.eFlags & EF_FIRING && !(cent->currentState.eFlags & EF_ALT_FIRING) ) if ( cent->currentState.eFlags & EF_FIRING && !(cent->currentState.eFlags & EF_ALT_FIRING) )
FX_DisruptorBeamFire( origin, trace.endpos, trace.plane.normal, spark, impact, cent->pe.empty ); FX_DisruptorBeamFire( origin, trace.endpos, trace.plane.normal, spark, impact, cent->pe.empty );
/* case WP_DERMAL_REGEN: /* case WP_13:
if (!(cent->currentState.eFlags & EF_ALT_FIRING)) if (!(cent->currentState.eFlags & EF_ALT_FIRING))
{ {
vec3_t org; vec3_t org;
@ -1095,7 +1095,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
// set custom shading for railgun refire rate // set custom shading for railgun refire rate
/*if ( ps ) { /*if ( ps ) {
if ( cg.predictedPlayerState.weapon == WP_NULL_HAND if ( cg.predictedPlayerState.weapon == WP_1
&& cg.predictedPlayerState.weaponstate == WEAPON_FIRING ) { && cg.predictedPlayerState.weaponstate == WEAPON_FIRING ) {
float f; float f;
@ -1164,7 +1164,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
if ( cent->currentState.eFlags & EF_ALT_FIRING ) if ( cent->currentState.eFlags & EF_ALT_FIRING )
{ {
// hark, I smell hackery afoot // hark, I smell hackery afoot
if ((weaponNum == WP_PHASER) && !(cg.predictedPlayerState.ammo[WP_PHASER])) if ((weaponNum == WP_5) && !(cg.predictedPlayerState.ammo[WP_5]))
{ {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.phaserEmptySound ); trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.phaserEmptySound );
cent->pe.lightningFiring = qtrue; cent->pe.lightningFiring = qtrue;
@ -1175,13 +1175,13 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
cent->pe.lightningFiring = qtrue; cent->pe.lightningFiring = qtrue;
} }
if ( weaponNum == WP_TOOLKIT || weaponNum == WP_MEDKIT ) { if ( weaponNum == WP_14 || weaponNum == WP_11 ) {
cent->pe.lightningFiring = qtrue; cent->pe.lightningFiring = qtrue;
} }
} }
else if ( cent->currentState.eFlags & EF_FIRING ) else if ( cent->currentState.eFlags & EF_FIRING )
{ {
if ((weaponNum == WP_PHASER) && !(cg.predictedPlayerState.ammo[WP_PHASER])) if ((weaponNum == WP_5) && !(cg.predictedPlayerState.ammo[WP_5]))
{ {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.phaserEmptySound ); trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.phaserEmptySound );
cent->pe.lightningFiring = qtrue; cent->pe.lightningFiring = qtrue;
@ -1193,7 +1193,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
} }
//TiM: Haxxor. I want the medkit + toolkit sounds to play only once when u hold them down //TiM: Haxxor. I want the medkit + toolkit sounds to play only once when u hold them down
if ( weaponNum == WP_TOOLKIT || weaponNum == WP_MEDKIT ) { if ( weaponNum == WP_14 || weaponNum == WP_11 ) {
cent->pe.lightningFiring = qtrue; cent->pe.lightningFiring = qtrue;
} }
} }
@ -1204,10 +1204,10 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
//RPG-X : TiM - A little variety here :) Toolkit gets attached to player model's left hand, medkit on waist :) //RPG-X : TiM - A little variety here :) Toolkit gets attached to player model's left hand, medkit on waist :)
//Hack: I dunno why, but unless I specified thirdperson (ie (!ps) ), the viewmodel went crazy. :P //Hack: I dunno why, but unless I specified thirdperson (ie (!ps) ), the viewmodel went crazy. :P
if (!ps) { if (!ps) {
if (( weaponNum == WP_TOOLKIT ) ) { //Toolkit //cg.predictedPlayerState.weapon if (( weaponNum == WP_14 ) ) { //Toolkit //cg.predictedPlayerState.weapon
CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_lhand"); CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_lhand");
} }
else if (( weaponNum == WP_MEDKIT ) ) { //Medkit else if (( weaponNum == WP_11 ) ) { //Medkit
CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_torso"); CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_torso");
} }
/*else { /*else {
@ -1217,7 +1217,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
gun.nonNormalizedAxes = qfalse; gun.nonNormalizedAxes = qfalse;
} }
if ( weaponNum == WP_COFFEE ) { if ( weaponNum == WP_4 ) {
if ( !ps ) { if ( !ps ) {
if ( !(!cg.renderingThirdPerson && cent->currentState.clientNum == cg.predictedPlayerState.clientNum) ) if ( !(!cg.renderingThirdPerson && cent->currentState.clientNum == cg.predictedPlayerState.clientNum) )
CG_CoffeeSteam( &gun, weapon, qtrue ); CG_CoffeeSteam( &gun, weapon, qtrue );
@ -1232,7 +1232,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
// add the spinning barrel // add the spinning barrel
// //
// //
for (barrelInfo = wpnBarrelData; barrelInfo->giTag != WP_NONE; barrelInfo++) for (barrelInfo = wpnBarrelData; barrelInfo->giTag != WP_0; barrelInfo++)
{ {
if (barrelInfo->giTag == weaponNum) if (barrelInfo->giTag == weaponNum)
{ {
@ -1254,7 +1254,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
barrel.hModel = weapon->barrelModel[i]; barrel.hModel = weapon->barrelModel[i];
angles[YAW] = 0; angles[YAW] = 0;
angles[PITCH] = 0; angles[PITCH] = 0;
if ( weaponNum == WP_TR116) { if ( weaponNum == WP_7) {
angles[ROLL] = CG_MachinegunSpinAngle( cent ); angles[ROLL] = CG_MachinegunSpinAngle( cent );
} else { } else {
angles[ROLL] = 0;//CG_MachinegunSpinAngle( cent ); angles[ROLL] = 0;//CG_MachinegunSpinAngle( cent );
@ -1282,7 +1282,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
} }
//Com_Printf("eType: %i, eventParm: %i, weaponNum: %i\n", cent->currentState.eType, cent->currentState.eventParm, weaponNum); //Com_Printf("eType: %i, eventParm: %i, weaponNum: %i\n", cent->currentState.eType, cent->currentState.eventParm, weaponNum);
if ( weaponNum == WP_COMPRESSION_RIFLE if ( weaponNum == WP_6
&& &&
cent->currentState.powerups & ( 1 << PW_FLASHLIGHT ) cent->currentState.powerups & ( 1 << PW_FLASHLIGHT )
&& &&
@ -1322,8 +1322,8 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
} }
// add the flash // add the flash
if ( ( weaponNum == WP_PHASER || if ( ( weaponNum == WP_5 ||
weaponNum == WP_DERMAL_REGEN) weaponNum == WP_13)
&& ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) && ( nonPredictedCent->currentState.eFlags & EF_FIRING ) )
{ {
// continuous flash // continuous flash
@ -1355,11 +1355,11 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
AnglesToAxis( angles, flash.axis ); AnglesToAxis( angles, flash.axis );
//TiM - Instead of briefly showing the flash, show it scaling down //TiM - Instead of briefly showing the flash, show it scaling down
if (weaponNum != WP_PHASER && if (weaponNum != WP_5 &&
weaponNum != WP_HYPERSPANNER && weaponNum != WP_15 &&
weaponNum != WP_DERMAL_REGEN && weaponNum != WP_13 &&
!(weaponNum == WP_COMPRESSION_RIFLE && (cent->currentState.eFlags & EF_ALT_FIRING) ) && !(weaponNum == WP_6 && (cent->currentState.eFlags & EF_ALT_FIRING) ) &&
!(weaponNum == WP_DISRUPTOR && !(cent->currentState.eFlags & EF_ALT_FIRING) ) !(weaponNum == WP_10 && !(cent->currentState.eFlags & EF_ALT_FIRING) )
) )
{ {
float scale; float scale;
@ -1373,13 +1373,13 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
//TiM - quick hack //TiM - quick hack
//jiggle the scale of the phaser rifle on alt fire around //jiggle the scale of the phaser rifle on alt fire around
if ( (weaponNum == WP_COMPRESSION_RIFLE && (cent->currentState.eFlags & EF_ALT_FIRING)) if ( (weaponNum == WP_6 && (cent->currentState.eFlags & EF_ALT_FIRING))
|| ||
( weaponNum == WP_DISRUPTOR && !(cent->currentState.eFlags & EF_ALT_FIRING)) ) ( weaponNum == WP_10 && !(cent->currentState.eFlags & EF_ALT_FIRING)) )
{ {
float min, max; float min, max;
if ( weaponNum == WP_COMPRESSION_RIFLE ) if ( weaponNum == WP_6 )
{ {
min = 1.3f; min = 1.3f;
max = 1.6f; max = 1.6f;
@ -1473,7 +1473,7 @@ void CG_AddViewWeapon( playerState_t *ps ) {
return; return;
} }
if ( (cg.zoomed) && (ps->weapon == WP_COMPRESSION_RIFLE) ) { //RPG-X : TiM - People were saying that being able to see the gunsight on the rifle thru the gunsight in zoom mode was weird :P if ( (cg.zoomed) && (ps->weapon == WP_6) ) { //RPG-X : TiM - People were saying that being able to see the gunsight on the rifle thru the gunsight in zoom mode was weird :P
return; return;
} }
@ -1607,12 +1607,12 @@ CG_DrawWeaponSelect
=================== ===================
*/ */
static int weaponRows[6][3] = { { WP_NULL_HAND, 0, 0 }, static int weaponRows[6][3] = { { WP_1, 0, 0 },
{ WP_TRICORDER, WP_PADD, WP_COFFEE }, { WP_2, WP_3, WP_4 },
{ WP_PHASER, WP_COMPRESSION_RIFLE, WP_TR116 }, { WP_5, WP_6, WP_7 },
{ WP_GRENADE_LAUNCHER, WP_QUANTUM_BURST, WP_DISRUPTOR }, { WP_8, WP_9, WP_10 },
{ WP_MEDKIT, WP_VOYAGER_HYPO, WP_DERMAL_REGEN }, { WP_11, WP_12, WP_13 },
{ WP_TOOLKIT, WP_HYPERSPANNER, 0 } }; { WP_14, WP_15, 0 } };
void CG_DrawWeaponSelect( void ) { void CG_DrawWeaponSelect( void ) {
int i, rowCount, cellCount; int i, rowCount, cellCount;
@ -1723,19 +1723,19 @@ static qboolean CG_WeaponSelectable( int i ) {
extern int altAmmoUsage[]; extern int altAmmoUsage[];
/* /*
{ {
0, //WP_NONE, 0, //WP_0,
2, //WP_PHASER, 2, //WP_5,
10, //WP_COMPRESSION_RIFLE, 10, //WP_6,
3, //WP_NULL_HAND, 3, //WP_1,
5, //WP_COFFEE, 5, //WP_4,
1, //WP_DISRUPTOR, 1, //WP_10,
1, //WP_GRENADE_LAUNCHER, 1, //WP_8,
2, //WP_TR116, 2, //WP_7,
2, //WP_QUANTUM_BURST, 2, //WP_9,
5 //WP_DERMAL_REGEN, 5 //WP_13,
20, //WP_VOYAGER_HYPO, 20, //WP_12,
##, //WP_TOOLKIT, ##, //WP_14,
##, //WP_MEDKIT, ##, //WP_11,
}; };
*/ */
@ -1798,7 +1798,7 @@ void CG_NextWeapon_f( void ) {
//TiM: Just for the record. Phenix. Enumerated value lists. Look them up. Use them! //TiM: Just for the record. Phenix. Enumerated value lists. Look them up. Use them!
//Reading this code was really tricky when it didn't have to be >.< //Reading this code was really tricky when it didn't have to be >.<
//ie 1 = WP_PHASER etc //ie 1 = WP_5 etc
} }
/* /*
@ -1846,12 +1846,12 @@ CG_Weapon_f
=============== ===============
*/ */
/*TiM : Here for reference /*TiM : Here for reference
static int weaponRows[6][3] = { WP_NULL_HAND, 0, 0, static int weaponRows[6][3] = { WP_1, 0, 0,
WP_TRICORDER, WP_PADD, WP_COFFEE, WP_2, WP_3, WP_4,
WP_PHASER, WP_COMPRESSION_RIFLE, WP_TR116, WP_5, WP_6, WP_7,
WP_GRENADE_LAUNCHER, WP_QUANTUM_BURST, WP_DISRUPTOR, WP_8, WP_9, WP_10,
WP_MEDKIT, WP_VOYAGER_HYPO, WP_DERMAL_REGEN, WP_11, WP_12, WP_13,
WP_TOOLKIT, WP_NEUTRINO_PROBE, 0 };*/ WP_14, WP_NEUTRINO_PROBE, 0 };*/
void CG_Weapon_f( void ) { void CG_Weapon_f( void ) {
int num; int num;
@ -1885,8 +1885,8 @@ void CG_Weapon_f( void ) {
//Hacky Override: 0 = Null hand no matter what. //Hacky Override: 0 = Null hand no matter what.
if (num == 0 ) { if (num == 0 ) {
if ( bits & ( 1 << WP_NULL_HAND ) ) { if ( bits & ( 1 << WP_1 ) ) {
cg.weaponSelect = WP_NULL_HAND; cg.weaponSelect = WP_1;
} }
return; return;
} }
@ -1966,7 +1966,7 @@ void CG_Weapon_f( void ) {
//weapons we have in sequential order, select the one that corresponds. //weapons we have in sequential order, select the one that corresponds.
//Start at number 2, skipping null hand. He owns us all //Start at number 2, skipping null hand. He owns us all
/*for ( i = WP_TRICORDER, weaponCount = 0; i < MAX_WEAPONS; i++ ) { /*for ( i = WP_2, weaponCount = 0; i < MAX_WEAPONS; i++ ) {
//if we have that weapon //if we have that weapon
if ( bits & ( 1 << i ) ) { if ( bits & ( 1 << i ) ) {
weaponCount++; weaponCount++;
@ -2039,7 +2039,7 @@ void CG_FireWeapon( centity_t *cent, qboolean alt_fire ) {
//const char *info2; //const char *info2;
ent = &cent->currentState; ent = &cent->currentState;
if ( ent->weapon == WP_NONE || ent->weapon == WP_NULL_HAND ) { if ( ent->weapon == WP_0 || ent->weapon == WP_1 ) {
return; return;
} }
if ( ent->weapon >= WP_NUM_WEAPONS ) { if ( ent->weapon >= WP_NUM_WEAPONS ) {
@ -2053,12 +2053,12 @@ void CG_FireWeapon( centity_t *cent, qboolean alt_fire ) {
cent->muzzleFlashTime = cg.time; cent->muzzleFlashTime = cg.time;
// lightning gun only does this this on initial press // lightning gun only does this this on initial press
if ( ent->weapon == WP_PHASER /*|| if ( ent->weapon == WP_5 /*||
ent->weapon == WP_DERMAL_REGEN*/ ent->weapon == WP_13*/
|| ent->weapon == WP_TOOLKIT || ent->weapon == WP_14
|| ent->weapon == WP_MEDKIT || ent->weapon == WP_11
|| (!(cent->currentState.eFlags & EF_ALT_FIRING) && ent->weapon == WP_DISRUPTOR ) || (!(cent->currentState.eFlags & EF_ALT_FIRING) && ent->weapon == WP_10 )
|| (cent->currentState.eFlags & EF_ALT_FIRING && ent->weapon == WP_COMPRESSION_RIFLE ) || (cent->currentState.eFlags & EF_ALT_FIRING && ent->weapon == WP_6 )
) )
{ {
if ( cent->pe.lightningFiring ) { if ( cent->pe.lightningFiring ) {
@ -2078,7 +2078,7 @@ void CG_FireWeapon( centity_t *cent, qboolean alt_fire ) {
if (alt_fire) if (alt_fire)
{ {
//RPG-X: RedTechie - Wrong place for show tris //RPG-X: RedTechie - Wrong place for show tris
/*if( ent->weapon == WP_TR116 ) /*if( ent->weapon == WP_7 )
{ {
if(tris_state == 1) if(tris_state == 1)
tris_state = 0; tris_state = 0;
@ -2093,11 +2093,11 @@ void CG_FireWeapon( centity_t *cent, qboolean alt_fire ) {
//admin alt hypos no fire coz it grinds my teeth //admin alt hypos no fire coz it grinds my teeth
if ( cgs.clientinfo[cg.snap->ps.clientNum].isAdmin/*cgs.clientinfo[cent->currentState.clientNum].pClass == PC_ADMIN*/ if ( cgs.clientinfo[cg.snap->ps.clientNum].isAdmin/*cgs.clientinfo[cent->currentState.clientNum].pClass == PC_ADMIN*/
&& &&
cent->currentState.weapon == WP_VOYAGER_HYPO ) { cent->currentState.weapon == WP_12 ) {
return; return;
} }
if(ent->weapon == WP_GRENADE_LAUNCHER){ if(ent->weapon == WP_8){
if(rpg_tripmines != 1){ if(rpg_tripmines != 1){
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSnd ); trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSnd );
} }
@ -2110,7 +2110,7 @@ void CG_FireWeapon( centity_t *cent, qboolean alt_fire ) {
{ {
if ( weap->flashSound ) if ( weap->flashSound )
{ {
if(ent->weapon == WP_GRENADE_LAUNCHER){ if(ent->weapon == WP_8){
if((rpg_effectsgun == 1) || (rpg_tripmines == 1)){ if((rpg_effectsgun == 1) || (rpg_tripmines == 1)){
return; return;
}else{ }else{
@ -2136,7 +2136,7 @@ void CG_FireSeeker( centity_t *cent )
weaponInfo_t *weap; weaponInfo_t *weap;
ent = &cent->currentState; ent = &cent->currentState;
weap = &cg_weapons[ WP_COFFEE ]; weap = &cg_weapons[ WP_4 ];
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->flashSound ); trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->flashSound );
} }
@ -2179,31 +2179,31 @@ void CG_MissileHitWall( centity_t *cent, int weapon, vec3_t origin, vec3_t dir )
switch ( weapon ) { switch ( weapon ) {
default: default:
case WP_PHASER: case WP_5:
// no explosion at LG impact, it is added with the beam // no explosion at LG impact, it is added with the beam
mark = cgs.media.holeMarkShader; mark = cgs.media.holeMarkShader;
radius = 12; radius = 12;
break; break;
case WP_DERMAL_REGEN: case WP_13:
// no explosion at LG impact, it is added with the beam // no explosion at LG impact, it is added with the beam
mark = cgs.media.holeMarkShader; mark = cgs.media.holeMarkShader;
radius = 12; radius = 12;
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
FX_GrenadeExplode( origin, dir ); FX_GrenadeExplode( origin, dir );
return; return;
break; break;
case WP_DISRUPTOR: case WP_10:
FX_DisruptorWeaponHitWall( origin, dir, 2 ); //cent->currentState.time2 FX_DisruptorWeaponHitWall( origin, dir, 2 ); //cent->currentState.time2
return; return;
break; break;
case WP_NULL_HAND: case WP_1:
/*mod = cgs.media.ringFlashModel; /*mod = cgs.media.ringFlashModel;
shader = cgs.media.imodExplosionShader; shader = cgs.media.imodExplosionShader;
mark = cgs.media.energyMarkShader; mark = cgs.media.energyMarkShader;
radius = 24;*/ radius = 24;*/
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
//mod = cgs.media.ringFlashModel; //mod = cgs.media.ringFlashModel;
//shader = cgs.media.imodExplosionShader; //shader = cgs.media.imodExplosionShader;
//mark = cgs.media.energyMarkShader; //mark = cgs.media.energyMarkShader;
@ -2211,11 +2211,11 @@ void CG_MissileHitWall( centity_t *cent, int weapon, vec3_t origin, vec3_t dir )
FX_CompressionExplosion( cent->lerpOrigin, origin, dir, qfalse ); FX_CompressionExplosion( cent->lerpOrigin, origin, dir, qfalse );
return; return;
break; break;
case WP_TR116: case WP_7:
//FX_TetrionAltHitWall( origin, dir ); //FX_TetrionAltHitWall( origin, dir );
return; return;
break; break;
/* case WP_COFFEE: /* case WP_4:
if (cent->currentState.eFlags & EF_ALT_FIRING) if (cent->currentState.eFlags & EF_ALT_FIRING)
{ {
FX_ScavengerAltExplode( origin, dir ); FX_ScavengerAltExplode( origin, dir );
@ -2226,7 +2226,7 @@ void CG_MissileHitWall( centity_t *cent, int weapon, vec3_t origin, vec3_t dir )
} }
return; return;
break;*/ break;*/
/* case WP_MEDKIT: /* case WP_11:
if ( !( cent->currentState.eFlags & EF_ALT_FIRING )) if ( !( cent->currentState.eFlags & EF_ALT_FIRING ))
{ {
FX_BorgWeaponHitWall( origin, dir ); FX_BorgWeaponHitWall( origin, dir );
@ -2234,7 +2234,7 @@ void CG_MissileHitWall( centity_t *cent, int weapon, vec3_t origin, vec3_t dir )
return; return;
break;*/ break;*/
case WP_QUANTUM_BURST: case WP_9:
if ( cent->currentState.eFlags & EF_ALT_FIRING ) if ( cent->currentState.eFlags & EF_ALT_FIRING )
{ {
FX_QuantumAltHitWall( origin, dir ); FX_QuantumAltHitWall( origin, dir );
@ -2303,7 +2303,7 @@ void CG_BounceEffect( centity_t *cent, int weapon, vec3_t origin, vec3_t normal
switch( weapon ) switch( weapon )
{ {
case WP_GRENADE_LAUNCHER: case WP_8:
info = CG_ConfigString( CS_SERVERINFO ); info = CG_ConfigString( CS_SERVERINFO );
rpg_tripmines = atoi( Info_ValueForKey( info, "rpg_invisibletripmines" ) ); rpg_tripmines = atoi( Info_ValueForKey( info, "rpg_invisibletripmines" ) );
if(rpg_tripmines != 1){ if(rpg_tripmines != 1){
@ -2315,7 +2315,7 @@ void CG_BounceEffect( centity_t *cent, int weapon, vec3_t origin, vec3_t normal
} }
break; break;
case WP_TR116: case WP_7:
//trap_S_StartSound( origin, ENTITYNUM_WORLD, CHAN_AUTO, trap_S_RegisterSound ( va(SOUND_DIR "tetrion/ricochet%d.wav", irandom(1, 3)) ) ); //trap_S_StartSound( origin, ENTITYNUM_WORLD, CHAN_AUTO, trap_S_RegisterSound ( va(SOUND_DIR "tetrion/ricochet%d.wav", irandom(1, 3)) ) );
//FX_TetrionRicochet( origin, normal ); //FX_TetrionRicochet( origin, normal );
break; break;
@ -2491,12 +2491,12 @@ void CG_PlayShooterSound(centity_t *cent) {
weap = &cg_weapons[cent->currentState.eventParm]; weap = &cg_weapons[cent->currentState.eventParm];
switch(cent->currentState.eventParm) { switch(cent->currentState.eventParm) {
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
trap_S_StartSound(cent->currentState.origin, cent->currentState.number, CHAN_VOICE, weap->flashSound); trap_S_StartSound(cent->currentState.origin, cent->currentState.number, CHAN_VOICE, weap->flashSound);
break; break;
case WP_DISRUPTOR: case WP_10:
trap_S_StartSound(cent->currentState.origin, cent->currentState.number, CHAN_VOICE, weap->altFlashSnd); trap_S_StartSound(cent->currentState.origin, cent->currentState.number, CHAN_VOICE, weap->altFlashSnd);
break; break;
} }

View file

@ -147,7 +147,7 @@ void FX_CompressionExplosion( vec3_t start, vec3_t origin, vec3_t normal, qboole
vec3_t hitpos; vec3_t hitpos;
float scale, dscale; float scale, dscale;
int i, j, numSparks; int i, j, numSparks;
weaponInfo_t *weaponInfo = &cg_weapons[WP_COMPRESSION_RIFLE]; weaponInfo_t *weaponInfo = &cg_weapons[WP_6];
float distance; float distance;
vec3_t color = {0.7, 0.43, 0.44}; vec3_t color = {0.7, 0.43, 0.44};

View file

@ -95,7 +95,7 @@ void FX_DisruptorWeaponHitWall( vec3_t origin, vec3_t dir, int size )
{ {
vec3_t vel, /*accel,*/ hitpos, direction, org; vec3_t vel, /*accel,*/ hitpos, direction, org;
//int i, t; //int i, t;
weaponInfo_t *weaponInfo = &cg_weapons[WP_DISRUPTOR]; weaponInfo_t *weaponInfo = &cg_weapons[WP_10];
CG_InitLensFlare( origin, CG_InitLensFlare( origin,
375, 375, 375, 375,

View file

@ -195,7 +195,7 @@ void FX_GrenadeShrapnelExplode( vec3_t origin, vec3_t norm )
qboolean GrenadeBeep(localEntity_t *le) qboolean GrenadeBeep(localEntity_t *le)
{ {
weaponInfo_t *weaponInfo = &cg_weapons[WP_GRENADE_LAUNCHER]; weaponInfo_t *weaponInfo = &cg_weapons[WP_8];
trap_S_StartSound(le->refEntity.origin, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->altHitSound); trap_S_StartSound(le->refEntity.origin, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->altHitSound);
return qtrue; return qtrue;
@ -254,7 +254,7 @@ void FX_fxfunc_Explosion( vec3_t start, vec3_t origin, vec3_t normal )
// trace_t trace; // trace_t trace;
float scale, dscale; float scale, dscale;
int i, j, numSparks; int i, j, numSparks;
//weaponInfo_t *weaponInfo = &cg_weapons[WP_COMPRESSION_RIFLE]; //weaponInfo_t *weaponInfo = &cg_weapons[WP_6];
//float scale, dscale; //float scale, dscale;
// int s; // int s;
// vec3_t new_org; // vec3_t new_org;

View file

@ -111,7 +111,7 @@ void FX_QuantumHitWall( vec3_t origin, vec3_t normal )
vec3_t vel; vec3_t vel;
float scale; float scale;
int i; int i;
weaponInfo_t *weaponInfo = &cg_weapons[WP_QUANTUM_BURST]; weaponInfo_t *weaponInfo = &cg_weapons[WP_9];
CG_InitLensFlare( origin, CG_InitLensFlare( origin,
400, 400, 400, 400,
@ -191,7 +191,7 @@ void FX_QuantumAltHitWall( vec3_t origin, vec3_t normal )
float scale; float scale;
int i; int i;
vec3_t RGB={1.0, 0.6, 0.3}, RGB2={1.0, 0.3, 0.0}; vec3_t RGB={1.0, 0.6, 0.3}, RGB2={1.0, 0.3, 0.0};
weaponInfo_t *weaponInfo = &cg_weapons[WP_QUANTUM_BURST]; weaponInfo_t *weaponInfo = &cg_weapons[WP_9];
CG_InitLensFlare( origin, CG_InitLensFlare( origin,
500, 500, 500, 500,

View file

@ -574,26 +574,26 @@ void BotUpdateInventory(bot_state_t *bs) {
bs->inventory[INVENTORY_ARMOR] = bs->cur_ps.stats[STAT_ARMOR]; bs->inventory[INVENTORY_ARMOR] = bs->cur_ps.stats[STAT_ARMOR];
//weapons //weapons
bs->inventory[INVENTORY_GRENADELAUNCHER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_GRENADE_LAUNCHER)) != 0; bs->inventory[INVENTORY_GRENADELAUNCHER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_8)) != 0;
bs->inventory[INVENTORY_STASIS] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_DISRUPTOR)) != 0; bs->inventory[INVENTORY_STASIS] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_10)) != 0;
bs->inventory[INVENTORY_PHASER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_PHASER)) != 0; bs->inventory[INVENTORY_PHASER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_5)) != 0;
bs->inventory[INVENTORY_DREADNOUGHT] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_DERMAL_REGEN)) != 0; bs->inventory[INVENTORY_DREADNOUGHT] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_13)) != 0;
bs->inventory[INVENTORY_IMOD] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_NULL_HAND)) != 0; bs->inventory[INVENTORY_IMOD] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_1)) != 0;
bs->inventory[INVENTORY_COMPRESSION] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_COMPRESSION_RIFLE)) != 0; bs->inventory[INVENTORY_COMPRESSION] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_6)) != 0;
bs->inventory[INVENTORY_TETRION] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_TR116)) != 0; bs->inventory[INVENTORY_TETRION] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_7)) != 0;
bs->inventory[INVENTORY_SCAVENGER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_COFFEE)) != 0; bs->inventory[INVENTORY_SCAVENGER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_4)) != 0;
bs->inventory[INVENTORY_QUANTUM] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_QUANTUM_BURST)) != 0; bs->inventory[INVENTORY_QUANTUM] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_9)) != 0;
//ammo //ammo
bs->inventory[INVENTORY_GRENADES] = bs->cur_ps.ammo[WP_GRENADE_LAUNCHER]; bs->inventory[INVENTORY_GRENADES] = bs->cur_ps.ammo[WP_8];
bs->inventory[INVENTORY_STASISAMMO] = bs->cur_ps.ammo[WP_DISRUPTOR]; bs->inventory[INVENTORY_STASISAMMO] = bs->cur_ps.ammo[WP_10];
bs->inventory[INVENTORY_PHASERAMMO] = bs->cur_ps.ammo[WP_PHASER]; bs->inventory[INVENTORY_PHASERAMMO] = bs->cur_ps.ammo[WP_5];
bs->inventory[INVENTORY_DREADNOUGHTAMMO] = bs->cur_ps.ammo[WP_DERMAL_REGEN]; bs->inventory[INVENTORY_DREADNOUGHTAMMO] = bs->cur_ps.ammo[WP_13];
bs->inventory[INVENTORY_IMODAMMO] = bs->cur_ps.ammo[WP_NULL_HAND]; bs->inventory[INVENTORY_IMODAMMO] = bs->cur_ps.ammo[WP_1];
bs->inventory[INVENTORY_COMPRESSIONAMMO] = bs->cur_ps.ammo[WP_COMPRESSION_RIFLE]; bs->inventory[INVENTORY_COMPRESSIONAMMO] = bs->cur_ps.ammo[WP_6];
bs->inventory[INVENTORY_TETRIONAMMO] = bs->cur_ps.ammo[WP_TR116]; bs->inventory[INVENTORY_TETRIONAMMO] = bs->cur_ps.ammo[WP_7];
bs->inventory[INVENTORY_SCAVENGERAMMO] = bs->cur_ps.ammo[WP_COFFEE]; bs->inventory[INVENTORY_SCAVENGERAMMO] = bs->cur_ps.ammo[WP_4];
bs->inventory[INVENTORY_QUANTUMAMMO] = bs->cur_ps.ammo[WP_QUANTUM_BURST]; bs->inventory[INVENTORY_QUANTUMAMMO] = bs->cur_ps.ammo[WP_9];
//powerups //powerups
bs->inventory[INVENTORY_HEALTH] = bs->cur_ps.stats[STAT_HEALTH]; bs->inventory[INVENTORY_HEALTH] = bs->cur_ps.stats[STAT_HEALTH];
@ -1248,7 +1248,7 @@ bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl) {
} }
//if using assimilator or alt-fire hypo... //if using assimilator or alt-fire hypo...
if ( bs->weaponnum == WP_TOOLKIT || bs->weaponnum == (WP_VOYAGER_HYPO+WP_NUM_WEAPONS) ) if ( bs->weaponnum == WP_14 || bs->weaponnum == (WP_12+WP_NUM_WEAPONS) )
{//get real close {//get real close
attack_dist = 16; attack_dist = 16;
attack_range = 16; attack_range = 16;
@ -1647,34 +1647,34 @@ void BotAimAtEnemy(bot_state_t *bs) {
trap_BotGetWeaponInfo(bs->ws, bs->weaponnum, &wi); trap_BotGetWeaponInfo(bs->ws, bs->weaponnum, &wi);
//get the weapon specific aim accuracy and or aim skill //get the weapon specific aim accuracy and or aim skill
if (wi.number == WP_GRENADE_LAUNCHER) { if (wi.number == WP_8) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_GRENADELAUNCHER, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_GRENADELAUNCHER, 0, 1);
aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_GRENADELAUNCHER, 0, 1); aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_GRENADELAUNCHER, 0, 1);
} }
if (wi.number == WP_DISRUPTOR) { if (wi.number == WP_10) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_STASIS, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_STASIS, 0, 1);
aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_STASIS, 0, 1); aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_STASIS, 0, 1);
} }
if (wi.number == WP_PHASER) { if (wi.number == WP_5) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_PHASER, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_PHASER, 0, 1);
} }
if (wi.number == WP_NULL_HAND) { if (wi.number == WP_1) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_IMOD, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_IMOD, 0, 1);
} }
if (wi.number == WP_COMPRESSION_RIFLE) { if (wi.number == WP_6) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_COMPRESSION, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_COMPRESSION, 0, 1);
} }
if (wi.number == WP_TR116) { if (wi.number == WP_7) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_TETRION, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_TETRION, 0, 1);
} }
if (wi.number == WP_DERMAL_REGEN) { if (wi.number == WP_13) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_DREADNOUGHT, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_DREADNOUGHT, 0, 1);
} }
if (wi.number == WP_QUANTUM_BURST) { if (wi.number == WP_9) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_QUANTUM, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_QUANTUM, 0, 1);
aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_QUANTUM, 0, 1); aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_QUANTUM, 0, 1);
} }
if (wi.number == WP_COFFEE) { if (wi.number == WP_4) {
aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_SCAVENGER, 0, 1); aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_SCAVENGER, 0, 1);
} }
@ -1822,8 +1822,8 @@ void BotAimAtEnemy(bot_state_t *bs) {
//if the bot is skilled anough //if the bot is skilled anough
if (aim_skill > 0.5) { if (aim_skill > 0.5) {
//do prediction shots around corners //do prediction shots around corners
if (wi.number == WP_DISRUPTOR || if (wi.number == WP_10 ||
wi.number == WP_GRENADE_LAUNCHER) wi.number == WP_8)
{ {
//create the chase goal //create the chase goal
goal.entitynum = bs->client; goal.entitynum = bs->client;
@ -1854,8 +1854,8 @@ void BotAimAtEnemy(bot_state_t *bs) {
//get aim direction //get aim direction
VectorSubtract(bestorigin, bs->eye, dir); VectorSubtract(bestorigin, bs->eye, dir);
// kef -- fixme. i'm guessing this is listing all of the instant-hit weapons? // kef -- fixme. i'm guessing this is listing all of the instant-hit weapons?
if (wi.number == WP_PHASER || if (wi.number == WP_5 ||
wi.number == WP_NULL_HAND) { wi.number == WP_1) {
//distance towards the enemy //distance towards the enemy
dist = VectorLength(dir); dist = VectorLength(dir);
if (dist > 150) dist = 150; if (dist > 150) dist = 150;

View file

@ -32,29 +32,29 @@ char races[256];
*/ */
int Max_Ammo[WP_NUM_WEAPONS] = int Max_Ammo[WP_NUM_WEAPONS] =
{ {
0, // WP_NONE, 0, // WP_0,
5, // WP_NULL_HAND 5, // WP_1
5, // WP_TRICORDER, 5, // WP_2,
5, // WP_PADD, 5, // WP_3,
5, // WP_COFFEE, 5, // WP_4,
5, // WP_PHASER, !! this should match PHASER_AMMO_MAX defined in bg_public 5, // WP_5, !! this should match PHASER_AMMO_MAX defined in bg_public
5, // WP_COMPRESSION_RIFLE, 5, // WP_6,
5, // WP_TR116, 5, // WP_7,
5, // WP_GRENADE_LAUNCHER, 5, // WP_8,
5, // WP_QUANTUM_BURST, 5, // WP_9,
5, // WP_DISRUPTOR, 5, // WP_10,
5, // WP_MEDKIT, 5, // WP_11,
5, // WP_VOYAGER_HYPO, 5, // WP_12,
5, // WP_DERMAL_REGEN 5, // WP_13
5, // WP_TOOLKIT, 5, // WP_14,
5, // WP_NEUTRINO_PROBE, 5, // WP_NEUTRINO_PROBE,
//64 // WP_TR116 //64 // WP_7
}; };
/*QUAKED item_***** ( 0 0 0 ) (-16 -16 -16) (16 16 16) suspended /*QUAKED item_***** ( 0 0 0 ) (-16 -16 -16) (16 16 16) suspended
@ -93,7 +93,7 @@ gitem_t bg_itemlist[] =
* WEAPONS * WEAPONS
*/ */
/* WP_NULL_HAND */ /* WP_1 */
/*QUAKED weapon_imod (.3 .3 1) (-16 -16 -16) (16 16 16) suspended /*QUAKED weapon_imod (.3 .3 1) (-16 -16 -16) (16 16 16) suspended
*/ */
{ {
@ -105,7 +105,7 @@ gitem_t bg_itemlist[] =
" ", /* pickup */ " ", /* pickup */
AMMO_IMOD_CLIP, AMMO_IMOD_CLIP,
IT_WEAPON, IT_WEAPON,
WP_NULL_HAND, WP_1,
"", /* precache */ "", /* precache */
"" /* sounds */ "" /* sounds */
}, },
@ -122,7 +122,7 @@ gitem_t bg_itemlist[] =
"Tricorder", /* pickup */ "Tricorder", /* pickup */
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_TRICORDER, WP_2,
"", /* precache */ "", /* precache */
"" /* sounds */ "" /* sounds */
}, },
@ -138,7 +138,7 @@ gitem_t bg_itemlist[] =
"Padd", /* pickup */ "Padd", /* pickup */
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_PADD, WP_3,
"", /* precache */ "", /* precache */
"", /* sounds */ "", /* sounds */
}, },
@ -154,7 +154,7 @@ gitem_t bg_itemlist[] =
"Coffee, Black", /* pickup */ "Coffee, Black", /* pickup */
AMMO_SCAVENGER_CLIP, AMMO_SCAVENGER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_COFFEE, WP_4,
"", /* precache */ "", /* precache */
"" /* sounds */ "" /* sounds */
}, },
@ -170,7 +170,7 @@ gitem_t bg_itemlist[] =
"Phaser", /* pickup */ "Phaser", /* pickup */
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_PHASER, WP_5,
"", /* precache */ "", /* precache */
"" /* sounds */ "" /* sounds */
}, },
@ -186,7 +186,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Phaser Compression Rifle", /* pickup */ "Phaser Compression Rifle",
AMMO_COMPRESSION_CLIP, AMMO_COMPRESSION_CLIP,
IT_WEAPON, IT_WEAPON,
WP_COMPRESSION_RIFLE, WP_6,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -202,7 +202,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "TR-116", /* pickup */ "TR-116",
AMMO_TETRION_CLIP, AMMO_TETRION_CLIP,
IT_WEAPON, IT_WEAPON,
WP_TR116, WP_7,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -218,7 +218,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Compound Grenade Launcher", /* pickup */ "Compound Grenade Launcher",
AMMO_GRENADE_CLIP, AMMO_GRENADE_CLIP,
IT_WEAPON, IT_WEAPON,
WP_GRENADE_LAUNCHER, WP_8,
/* precache */ "", /* precache */ "",
/* sounds */ "sound/weapons/glauncher/bounce1.wav sound/weapons/glauncher/bounce2.wav" /* sounds */ "sound/weapons/glauncher/bounce1.wav sound/weapons/glauncher/bounce2.wav"
}, },
@ -234,7 +234,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Photon Burst", /* pickup */ "Photon Burst",
AMMO_QUANTUM_CLIP, AMMO_QUANTUM_CLIP,
IT_WEAPON, IT_WEAPON,
WP_QUANTUM_BURST, WP_9,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -250,7 +250,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Disruptor", /* pickup */ "Disruptor",
AMMO_STASIS_CLIP, AMMO_STASIS_CLIP,
IT_WEAPON, IT_WEAPON,
WP_DISRUPTOR, WP_10,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -266,7 +266,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Medkit", /* pickup */ "Medkit",
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_MEDKIT, WP_11,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -282,7 +282,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Hypo", /* pickup */ "Hypo",
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_VOYAGER_HYPO, WP_12,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -298,7 +298,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Dermal Regenerator", /* pickup */ "Dermal Regenerator",
AMMO_DREADNOUGHT_CLIP, AMMO_DREADNOUGHT_CLIP,
IT_WEAPON, IT_WEAPON,
WP_DERMAL_REGEN, WP_13,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -314,7 +314,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Toolkit", /* pickup */ "Toolkit",
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_TOOLKIT, WP_14,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -330,7 +330,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Hyperspanner", /* pickup */ "Hyperspanner",
AMMO_PHASER_CLIP, AMMO_PHASER_CLIP,
IT_WEAPON, IT_WEAPON,
WP_HYPERSPANNER, WP_15,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -351,7 +351,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Phaser Compression Rifle Ammo", /* pickup */ "Phaser Compression Rifle Ammo",
AMMO_COMPRESSION_CLIP, AMMO_COMPRESSION_CLIP,
IT_AMMO, IT_AMMO,
WP_COMPRESSION_RIFLE, WP_6,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -368,7 +368,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "I-MOD Ammo", /* pickup */ "I-MOD Ammo",
AMMO_IMOD_CLIP, AMMO_IMOD_CLIP,
IT_AMMO, IT_AMMO,
WP_NULL_HAND, WP_1,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -385,7 +385,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Scavenger Weapon Ammo", /* pickup */ "Scavenger Weapon Ammo",
AMMO_SCAVENGER_CLIP, AMMO_SCAVENGER_CLIP,
IT_AMMO, IT_AMMO,
WP_COFFEE, WP_4,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -402,7 +402,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Stasis Weapon Ammo", /* pickup */ "Stasis Weapon Ammo",
AMMO_STASIS_CLIP, AMMO_STASIS_CLIP,
IT_AMMO, IT_AMMO,
WP_DISRUPTOR, WP_10,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -419,7 +419,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Compound Grenade Launcher Ammo", /* pickup */ "Compound Grenade Launcher Ammo",
AMMO_GRENADE_CLIP, AMMO_GRENADE_CLIP,
IT_AMMO, IT_AMMO,
WP_GRENADE_LAUNCHER, WP_8,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -436,7 +436,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Tetryon Pulse Disruptor Ammo", /* pickup */ "Tetryon Pulse Disruptor Ammo",
AMMO_TETRION_CLIP, AMMO_TETRION_CLIP,
IT_AMMO, IT_AMMO,
WP_TR116, WP_7,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -453,7 +453,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Photon Burst Ammo", /* pickup */ "Photon Burst Ammo",
AMMO_QUANTUM_CLIP, AMMO_QUANTUM_CLIP,
IT_AMMO, IT_AMMO,
WP_QUANTUM_BURST, WP_9,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -470,7 +470,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Dermal Regenerator Ammo", /* pickup */ "Dermal Regenerator Ammo",
AMMO_DREADNOUGHT_CLIP, AMMO_DREADNOUGHT_CLIP,
IT_AMMO, IT_AMMO,
WP_DERMAL_REGEN, WP_13,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -939,21 +939,21 @@ giveItem_t bg_giveItem[] = {
{ "ammo", TYPE_AMMO, 0 }, { "ammo", TYPE_AMMO, 0 },
{ "transporter", TYPE_HOLDABLE, HI_TRANSPORTER }, { "transporter", TYPE_HOLDABLE, HI_TRANSPORTER },
{ "forcefield", TYPE_HOLDABLE, HI_SHIELD }, { "forcefield", TYPE_HOLDABLE, HI_SHIELD },
{ "phaser", TYPE_WEAPON, WP_PHASER }, { "phaser", TYPE_WEAPON, WP_5 },
{ "phaser_rifle", TYPE_WEAPON, WP_COMPRESSION_RIFLE }, { "phaser_rifle", TYPE_WEAPON, WP_6 },
{ "coffee", TYPE_WEAPON, WP_COFFEE }, { "coffee", TYPE_WEAPON, WP_4 },
{ "disruptor", TYPE_WEAPON, WP_DISRUPTOR }, { "disruptor", TYPE_WEAPON, WP_10 },
{ "coffee", TYPE_WEAPON, WP_COFFEE }, { "coffee", TYPE_WEAPON, WP_4 },
{ "admin_gun", TYPE_WEAPON, WP_GRENADE_LAUNCHER }, { "admin_gun", TYPE_WEAPON, WP_8 },
{ "tr-116", TYPE_WEAPON, WP_TR116 }, { "tr-116", TYPE_WEAPON, WP_7 },
{ "photon_burst", TYPE_WEAPON, WP_QUANTUM_BURST }, { "photon_burst", TYPE_WEAPON, WP_9 },
{ "dermal_regen", TYPE_WEAPON, WP_DERMAL_REGEN }, { "dermal_regen", TYPE_WEAPON, WP_13 },
{ "hypospray", TYPE_WEAPON, WP_VOYAGER_HYPO }, { "hypospray", TYPE_WEAPON, WP_12 },
{ "toolkit", TYPE_WEAPON, WP_TOOLKIT }, { "toolkit", TYPE_WEAPON, WP_14 },
{ "medkit", TYPE_WEAPON, WP_MEDKIT }, { "medkit", TYPE_WEAPON, WP_11 },
{ "tricorder", TYPE_WEAPON, WP_TRICORDER }, { "tricorder", TYPE_WEAPON, WP_2 },
{ "padd", TYPE_WEAPON, WP_PADD }, { "padd", TYPE_WEAPON, WP_3 },
{ "hyperspanner", TYPE_WEAPON, WP_HYPERSPANNER }, { "hyperspanner", TYPE_WEAPON, WP_15 },
{ "cloak", TYPE_POWERUP, 0 }, { "cloak", TYPE_POWERUP, 0 },
{ "flight", TYPE_POWERUP, 0 }, { "flight", TYPE_POWERUP, 0 },
{ "god", TYPE_POWERUP, 0 } { "god", TYPE_POWERUP, 0 }

View file

@ -108,10 +108,10 @@ extern vmCvar_t rpg_altTricorderDelay;
*/ */
qboolean PM_Holding2HandedWeapon ( void ) { qboolean PM_Holding2HandedWeapon ( void ) {
switch (pm->ps->weapon) { switch (pm->ps->weapon) {
case WP_TR116: case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
return qtrue; return qtrue;
} }
return qfalse; return qfalse;
@ -178,11 +178,11 @@ qboolean PM_PlayerIdling ( int torsoAnim, int legsAnim ) {
*/ */
qboolean PM_HoldingLoopableWeapon ( void ) { qboolean PM_HoldingLoopableWeapon ( void ) {
switch (pm->ps->weapon) { switch (pm->ps->weapon) {
case WP_DERMAL_REGEN: case WP_13:
case WP_TRICORDER: case WP_2:
case WP_PADD: case WP_3:
case WP_MEDKIT: case WP_11:
case WP_COFFEE: case WP_4:
return qtrue; return qtrue;
} }
return qfalse; return qfalse;
@ -197,11 +197,11 @@ qboolean PM_HoldingLoopableWeapon ( void ) {
*/ */
qboolean PM_HoldingSpillableWeapon( void ) { qboolean PM_HoldingSpillableWeapon( void ) {
switch ( pm->ps->weapon ) { switch ( pm->ps->weapon ) {
case WP_COFFEE: case WP_4:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_QUANTUM_BURST: case WP_9:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_TR116: case WP_7:
return qtrue; return qtrue;
} }
return qfalse; return qfalse;
@ -274,9 +274,9 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_CROUCH: case ANIM_CROUCH:
//2 handed weapon - "heavy" //2 handed weapon - "heavy"
switch (weapon) { switch (weapon) {
case WP_TR116: case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
if ( ps->pm_flags & ANIM_ALERT2 && upper ) if ( ps->pm_flags & ANIM_ALERT2 && upper )
return TORSO_WEAPONREADY2; return TORSO_WEAPONREADY2;
else if (upper) else if (upper)
@ -285,8 +285,8 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
return LEGS_KNEEL1; return LEGS_KNEEL1;
break; break;
//2 handed weapon - "light" //2 handed weapon - "light"
case WP_COMPRESSION_RIFLE: case WP_6:
//case WP_TR116: //case WP_7:
if ( ps->pm_flags & ANIM_ALERT && upper ) if ( ps->pm_flags & ANIM_ALERT && upper )
return BOTH_STAND2; return BOTH_STAND2;
else if (upper) else if (upper)
@ -295,14 +295,14 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
return LEGS_KNEEL1; return LEGS_KNEEL1;
break; break;
//1 handed weapon - "phaser" //1 handed weapon - "phaser"
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if ( upper ) if ( upper )
return TORSO_WEAPONPOSE1; return TORSO_WEAPONPOSE1;
else else
return BOTH_CROUCH1IDLE; return BOTH_CROUCH1IDLE;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -317,10 +317,10 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_IDLE: case ANIM_IDLE:
//2 handed weapon - "heavy" //2 handed weapon - "heavy"
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_TR116: case WP_7:
if (injured) if (injured)
return BOTH_INJURED4; return BOTH_INJURED4;
else else
@ -339,7 +339,7 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
} }
break; break;
//2 handed weapon - "light" //2 handed weapon - "light"
case WP_COMPRESSION_RIFLE: case WP_6:
if (injured) if (injured)
return BOTH_INJURED4; return BOTH_INJURED4;
else else
@ -358,8 +358,8 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
} }
break; break;
//1 handed weapon - "phaser" //1 handed weapon - "phaser"
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if (injured) if (injured)
return BOTH_INJURED4; return BOTH_INJURED4;
else { else {
@ -372,7 +372,7 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
} }
break; break;
//Generic tools - "everything else" //Generic tools - "everything else"
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
else else
@ -391,17 +391,17 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_ATTACK: case ANIM_ATTACK:
//2 handed weapon - "heavy" //2 handed weapon - "heavy"
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_TR116: case WP_7:
if ( ps->pm_flags & ANIM_ALERT2 ) if ( ps->pm_flags & ANIM_ALERT2 )
return BOTH_ATTACK2; return BOTH_ATTACK2;
else else
return BOTH_ATTACK3; return BOTH_ATTACK3;
break; break;
//2 handed weapon - "light" //2 handed weapon - "light"
case WP_COMPRESSION_RIFLE: case WP_6:
if ( ps->pm_flags & ANIM_ALERT2 ) if ( ps->pm_flags & ANIM_ALERT2 )
return BOTH_ATTACK2; return BOTH_ATTACK2;
else else
@ -413,24 +413,24 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
} }
break; break;
//1 handed weapon - "phaser" //1 handed weapon - "phaser"
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
case WP_HYPERSPANNER: case WP_15:
case WP_DERMAL_REGEN: case WP_13:
if (upper) if (upper)
return TORSO_WEAPONREADY1; return TORSO_WEAPONREADY1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other Tools "padd" //Other Tools "padd"
case WP_PADD: case WP_3:
if (upper) if (upper)
return TORSO_PADD1; return TORSO_PADD1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other Tools "tricorder" //Other Tools "tricorder"
case WP_TRICORDER: case WP_2:
if (upper) if (upper)
{ {
if ( !pm->medic ) if ( !pm->medic )
@ -442,26 +442,26 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other: "Medkit" //Other: "Medkit"
case WP_MEDKIT: case WP_11:
if (upper) if (upper)
return TORSO_ACTIVATEMEDKIT1; return TORSO_ACTIVATEMEDKIT1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other: "Hypo //Other: "Hypo
case WP_VOYAGER_HYPO: case WP_12:
if (upper) if (upper)
//return TORSO_HYPOSPRAY1; //return TORSO_HYPOSPRAY1;
return TORSO_HYPO1; return TORSO_HYPO1;
else else
return BOTH_STAND1; return BOTH_STAND1;
//Other: "Toolkit" //Other: "Toolkit"
/*case WP_TOOLKIT: /*case WP_14:
//Return nothing. //Return nothing.
//A bit hacky, but the engine accepts it :P //A bit hacky, but the engine accepts it :P
break;*/ break;*/
//Other Tools "everything else" //Other Tools "everything else"
/*case WP_NULL_HAND: /*case WP_1:
switch(rand()%13) switch(rand()%13)
{ {
case 0: return TORSO_HANDGESTURE1; case 0: return TORSO_HANDGESTURE1;
@ -479,7 +479,7 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case 12: return TORSO_HANDGESTURE13; case 12: return TORSO_HANDGESTURE13;
} }
break;*/ break;*/
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -507,17 +507,17 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if (upper) if (upper)
return BOTH_RUN2; return BOTH_RUN2;
else else
return BOTH_RUN1; return BOTH_RUN1;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -531,11 +531,11 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_RUNB: case ANIM_RUNB:
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if (upper) if (upper)
return BOTH_WALK2; return BOTH_WALK2;
else else
@ -545,7 +545,7 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
return LEGS_RUNBACK2; return LEGS_RUNBACK2;
break; break;
//EVERYTHING ELSE //EVERYTHING ELSE
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -568,11 +568,11 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if ( ps->pm_flags & ANIM_ALERT ) if ( ps->pm_flags & ANIM_ALERT )
return BOTH_WALK2; return BOTH_WALK2;
else if ( ps->pm_flags & ANIM_ALERT2 ) else if ( ps->pm_flags & ANIM_ALERT2 )
@ -586,11 +586,11 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
return BOTH_WALK4; return BOTH_WALK4;
break; break;
//Other Tools "everything else" //Other Tools "everything else"
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if ( ps->pm_flags & ANIM_ALERT ) if ( ps->pm_flags & ANIM_ALERT )
{ {
if ( upper ) if ( upper )
@ -612,11 +612,11 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_WALKB: case ANIM_WALKB:
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if ( ps->pm_flags & ANIM_ALERT ) if ( ps->pm_flags & ANIM_ALERT )
{ {
if ( upper ) if ( upper )
@ -639,12 +639,12 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
return LEGS_WALKBACK1; return LEGS_WALKBACK1;
} }
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if ( ps->pm_flags & ANIM_ALERT && upper) if ( ps->pm_flags & ANIM_ALERT && upper)
return TORSO_WEAPONIDLE1; return TORSO_WEAPONIDLE1;
else if ( ps->pm_flags & ANIM_ALERT2 && upper ) else if ( ps->pm_flags & ANIM_ALERT2 && upper )
@ -664,16 +664,16 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_CROUCHWALK: case ANIM_CROUCHWALK:
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if ( upper ) if ( upper )
return TORSO_WEAPONREADY2; return TORSO_WEAPONREADY2;
else else
return BOTH_CROUCH1WALK; return BOTH_CROUCH1WALK;
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
if ( ps->pm_flags & ANIM_ALERT2 && upper ) if ( ps->pm_flags & ANIM_ALERT2 && upper )
return TORSO_WEAPONREADY2; return TORSO_WEAPONREADY2;
else if ( upper ) else if ( upper )
@ -681,12 +681,12 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
else else
return BOTH_CROUCH1WALK; return BOTH_CROUCH1WALK;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if ( ps->pm_flags & ANIM_ALERT && upper ) if ( ps->pm_flags & ANIM_ALERT && upper )
return TORSO_WEAPONIDLE1; return TORSO_WEAPONIDLE1;
else if ( ps->pm_flags & ANIM_ALERT2 && upper ) else if ( ps->pm_flags & ANIM_ALERT2 && upper )
@ -702,11 +702,11 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
case ANIM_CROUCHWALKB: case ANIM_CROUCHWALKB:
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if ( ps->pm_flags & ANIM_ALERT2 ) if ( ps->pm_flags & ANIM_ALERT2 )
return TORSO_WEAPONREADY2; return TORSO_WEAPONREADY2;
else if ( upper ) else if ( upper )
@ -714,12 +714,12 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
else else
return BOTH_CROUCH1WALK; return BOTH_CROUCH1WALK;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if ( ps->pm_flags & ANIM_ALERT && upper ) if ( ps->pm_flags & ANIM_ALERT && upper )
return TORSO_WEAPONIDLE1; return TORSO_WEAPONIDLE1;
else if ( ps->pm_flags & ANIM_ALERT2 && upper ) else if ( ps->pm_flags & ANIM_ALERT2 && upper )
@ -2816,7 +2816,7 @@ PM_BeginWeaponChange
static void PM_BeginWeaponChange( int weapon ) { static void PM_BeginWeaponChange( int weapon ) {
playerState_t *ps = pm->ps; playerState_t *ps = pm->ps;
if ( weapon <= WP_NONE || weapon >= WP_NUM_WEAPONS ) { if ( weapon <= WP_0 || weapon >= WP_NUM_WEAPONS ) {
return; return;
} }
@ -2848,12 +2848,12 @@ static void PM_FinishWeaponChange( void ) {
playerState_t *ps = pm->ps; playerState_t *ps = pm->ps;
weapon = pm->cmd.weapon; weapon = pm->cmd.weapon;
if ( weapon < WP_NONE || weapon >= WP_NUM_WEAPONS ) { if ( weapon < WP_0 || weapon >= WP_NUM_WEAPONS ) {
weapon = WP_NONE; weapon = WP_0;
} }
if ( !( ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) { if ( !( ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) {
weapon = WP_NONE; weapon = WP_0;
} }
ps->weapon = weapon; ps->weapon = weapon;
@ -2877,8 +2877,8 @@ static void PM_TorsoAnimation( void )
if ( pm->ps->weaponstate == WEAPON_READY ) if ( pm->ps->weaponstate == WEAPON_READY )
{ {
/*if ( pm->ps->weapon == WP_PHASER || //RPG-X - TiM: Making the default pose anim better /*if ( pm->ps->weapon == WP_5 || //RPG-X - TiM: Making the default pose anim better
pm->ps->weapon == WP_DISRUPTOR ) pm->ps->weapon == WP_10 )
{ {
PM_ContinueTorsoAnim( TORSO_WEAPONIDLE1 ); PM_ContinueTorsoAnim( TORSO_WEAPONIDLE1 );
} }
@ -2905,16 +2905,16 @@ static void PM_TorsoAnimation( void )
//! alt ammo usage //! alt ammo usage
int altAmmoUsage[WP_NUM_WEAPONS] = int altAmmoUsage[WP_NUM_WEAPONS] =
{ {
0, //!<WP_NONE, 0, //!<WP_0,
1, //!<WP_PHASER, 1, //!<WP_5,
8, //!<WP_COMPRESSION_RIFLE, 8, //!<WP_6,
3, //!<WP_NULL_HAND, 3, //!<WP_1,
5, //!<WP_COFFEE, 5, //!<WP_4,
1, //!<WP_DISRUPTOR, 1, //!<WP_10,
1, //!<WP_GRENADE_LAUNCHER, 1, //!<WP_8,
2, //!<WP_TR116, 2, //!<WP_7,
2, //!<WP_QUANTUM_BURST, 2, //!<WP_9,
5 //!<WP_DERMAL_REGEN, 5 //!<WP_13,
}; };
/* /*
@ -2942,10 +2942,10 @@ static void PM_Weapon( void ) {
//Check for phaser ammo recharge //Check for phaser ammo recharge
//RPG-X: Marcin: don't! - 30/12/2008 //RPG-X: Marcin: don't! - 30/12/2008
if ( 0 ) //( (ps->rechargeTime <= 0) && ( ps->ammo[WP_PHASER] < PHASER_AMMO_MAX) ) if ( 0 ) //( (ps->rechargeTime <= 0) && ( ps->ammo[WP_5] < PHASER_AMMO_MAX) )
{ {
ps->rechargeTime = PHASER_RECHARGE_TIME; ps->rechargeTime = PHASER_RECHARGE_TIME;
ps->ammo[WP_PHASER]++; ps->ammo[WP_5]++;
} }
else else
{ {
@ -2954,7 +2954,7 @@ static void PM_Weapon( void ) {
// check for dead player // check for dead player
if ( ps->stats[STAT_HEALTH] <= 0 ) { if ( ps->stats[STAT_HEALTH] <= 0 ) {
ps->weapon = WP_NONE; ps->weapon = WP_0;
return; return;
} }
@ -3032,8 +3032,8 @@ static void PM_Weapon( void ) {
if ( ps->weaponstate == WEAPON_RAISING ) if ( ps->weaponstate == WEAPON_RAISING )
{ {
ps->weaponstate = WEAPON_READY; ps->weaponstate = WEAPON_READY;
/*if ( ps->weapon == WP_PHASER || //RPG-X - TiM: Making the default pose anim better /*if ( ps->weapon == WP_5 || //RPG-X - TiM: Making the default pose anim better
ps->weapon == WP_DISRUPTOR ) ps->weapon == WP_10 )
{ {
PM_StartTorsoAnim( TORSO_WEAPONREADY2 ); PM_StartTorsoAnim( TORSO_WEAPONREADY2 );
} }
@ -3074,7 +3074,7 @@ static void PM_Weapon( void ) {
/* /*
RPG-X | Phenix | 27/02/2005 RPG-X | Phenix | 27/02/2005
if ( ps->weapon == WP_PHASER ) // phaser out of ammo is special case if ( ps->weapon == WP_5 ) // phaser out of ammo is special case
{ {
ps->ammo[ps->weapon] = 0; ps->ammo[ps->weapon] = 0;
} }
@ -3101,7 +3101,7 @@ static void PM_Weapon( void ) {
// check for out of ammo // check for out of ammo
if ( ! ps->ammo[ ps->weapon ] ) if ( ! ps->ammo[ ps->weapon ] )
{ {
if ( ps->weapon == WP_PHASER ) // phaser out of ammo is special case if ( ps->weapon == WP_5 ) // phaser out of ammo is special case
{ {
ps->ammo[ps->weapon] = 0; ps->ammo[ps->weapon] = 0;
} }
@ -3122,8 +3122,8 @@ static void PM_Weapon( void ) {
} }
// *don't* start the animation if out of ammo // *don't* start the animation if out of ammo
/*if ( ps->weapon == WP_PHASER || //RPG-X - TiM: Making the default pose anim better /*if ( ps->weapon == WP_5 || //RPG-X - TiM: Making the default pose anim better
ps->weapon == WP_DISRUPTOR ) ps->weapon == WP_10 )
{ {
PM_StartTorsoAnim( TORSO_ATTACK2 ); PM_StartTorsoAnim( TORSO_ATTACK2 );
} }
@ -3132,13 +3132,13 @@ static void PM_Weapon( void ) {
PM_StartTorsoAnim( BOTH_ATTACK1 ); PM_StartTorsoAnim( BOTH_ATTACK1 );
}*/ }*/
if ( ps->weapon != WP_TOOLKIT && ps->weapon != WP_COFFEE && ps->weapon != WP_NULL_HAND ) if ( ps->weapon != WP_14 && ps->weapon != WP_4 && ps->weapon != WP_1 )
{ {
//Little hack. I like the idle poses for these when it crouches :) //Little hack. I like the idle poses for these when it crouches :)
if ( ( ( ps->weapon == WP_PHASER ) if ( ( ( ps->weapon == WP_5 )
|| ( ps->weapon == WP_COMPRESSION_RIFLE ) || ( ps->weapon == WP_6 )
|| ( ps->weapon == WP_DISRUPTOR ) || ( ps->weapon == WP_10 )
|| ( ps->weapon == WP_TR116 ) ) || ( ps->weapon == WP_7 ) )
&& ( ps->pm_flags & PMF_DUCKED /*&& !pm->xyspeed*/ ) ) && ( ps->pm_flags & PMF_DUCKED /*&& !pm->xyspeed*/ ) )
{ {
PM_ForceTorsoAnim( PM_GetAnim( ANIM_CROUCH, ps->weapon, ( ps->stats[STAT_HEALTH] <= INJURED_MODE_HEALTH), qtrue ), qfalse ); PM_ForceTorsoAnim( PM_GetAnim( ANIM_CROUCH, ps->weapon, ( ps->stats[STAT_HEALTH] <= INJURED_MODE_HEALTH), qtrue ), qfalse );
@ -3183,36 +3183,36 @@ static void PM_Weapon( void ) {
} }
switch( ps->weapon ) { switch( ps->weapon ) {
default: default:
case WP_PHASER: case WP_5:
addTime = 100; addTime = 100;
//If the phaser has been fired, delay the next recharge time //If the phaser has been fired, delay the next recharge time
ps->rechargeTime = PHASER_RECHARGE_TIME; ps->rechargeTime = PHASER_RECHARGE_TIME;
break; break;
case WP_DERMAL_REGEN: case WP_13:
addTime = 0; //500 addTime = 0; //500
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
addTime = 600;//RPG-X: RedTechie use to be 700 addTime = 600;//RPG-X: RedTechie use to be 700
break; break;
case WP_DISRUPTOR: case WP_10:
addTime = DISRUPTOR_DELAY; addTime = DISRUPTOR_DELAY;
break; break;
case WP_COFFEE: case WP_4:
addTime = 0; //700 addTime = 0; //700
break; break;
case WP_QUANTUM_BURST: case WP_9:
addTime = ALT_PHOTON_DELAY; addTime = ALT_PHOTON_DELAY;
break; break;
case WP_NULL_HAND: case WP_1:
addTime = 460; //700 addTime = 460; //700
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
addTime = 100; addTime = 100;
break; break;
case WP_TR116: case WP_7:
addTime = 500; //RPG-X: RedTechie - Use to be 1200 addTime = 500; //RPG-X: RedTechie - Use to be 1200
break; break;
case WP_VOYAGER_HYPO: case WP_12:
//RPG-X: RedTechie - Admins get faster alt fire for steam effects //RPG-X: RedTechie - Admins get faster alt fire for steam effects
if(/*ps->persistant[PERS_CLASS] == PC_ADMIN*/ pm->admin){ if(/*ps->persistant[PERS_CLASS] == PC_ADMIN*/ pm->admin){
addTime = 80; addTime = 80;
@ -3220,26 +3220,26 @@ static void PM_Weapon( void ) {
addTime = 1000; addTime = 1000;
} }
break; break;
case WP_TOOLKIT: case WP_14:
addTime = 2000; addTime = 2000;
break; break;
case WP_MEDKIT: case WP_11:
addTime = 0; //1000 addTime = 0; //1000
break; break;
case WP_TRICORDER: case WP_2:
if(pm->admin /*ps->persistant[PERS_CLASS] == PC_ADMIN*/){ if(pm->admin /*ps->persistant[PERS_CLASS] == PC_ADMIN*/){
addTime = ALT_TRICORDER_DELAY; addTime = ALT_TRICORDER_DELAY;
}else{ }else{
addTime = 0; addTime = 0;
} }
break; break;
case WP_PADD: case WP_3:
addTime = 0; //500 addTime = 0; //500
break; break;
case WP_HYPERSPANNER: case WP_15:
addTime = 0; //1000 addTime = 0; //1000
break; break;
/* case WP_TR116: /* case WP_7:
addTime = 500; //RPG-X: RedTechie - Use to be 1200 addTime = 500; //RPG-X: RedTechie - Use to be 1200
break;*/ break;*/
} }
@ -3256,54 +3256,54 @@ static void PM_Weapon( void ) {
} }
switch( ps->weapon ) { switch( ps->weapon ) {
default: default:
case WP_PHASER: case WP_5:
addTime = 100; addTime = 100;
//If the phaser has been fired, delay the next recharge time //If the phaser has been fired, delay the next recharge time
ps->rechargeTime = PHASER_RECHARGE_TIME; ps->rechargeTime = PHASER_RECHARGE_TIME;
break; break;
case WP_DERMAL_REGEN: case WP_13:
addTime = 1000; //1000 addTime = 1000; //1000
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
addTime = 460;//RPG-X: RedTechie use to be 700 addTime = 460;//RPG-X: RedTechie use to be 700
break; break;
case WP_NULL_HAND: case WP_1:
addTime = 460; addTime = 460;
break; break;
case WP_DISRUPTOR: case WP_10:
addTime = 100; addTime = 100;
break; break;
case WP_COFFEE: case WP_4:
addTime = 0; //100 addTime = 0; //100
break; break;
case WP_QUANTUM_BURST: case WP_9:
addTime = PHOTON_DELAY; addTime = PHOTON_DELAY;
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
addTime = RIFLE_DELAY; addTime = RIFLE_DELAY;
break; break;
case WP_TR116: case WP_7:
addTime = TR116_DELAY; //RPG-X: RedTechie - Use to be 1200 addTime = TR116_DELAY; //RPG-X: RedTechie - Use to be 1200
break; break;
case WP_VOYAGER_HYPO: case WP_12:
addTime = 1000; addTime = 1000;
break; break;
case WP_TOOLKIT: case WP_14:
addTime = 2000; //1000 addTime = 2000; //1000
break; break;
case WP_MEDKIT: case WP_11:
addTime = 0; //1000 addTime = 0; //1000
break; break;
case WP_TRICORDER: case WP_2:
addTime = ALT_TRICORDER_DELAY; //1000 addTime = ALT_TRICORDER_DELAY; //1000
break; break;
case WP_PADD: case WP_3:
addTime = 0; //500 addTime = 0; //500
break; break;
case WP_HYPERSPANNER: case WP_15:
addTime = 0; //1000 addTime = 0; //1000
break; break;
/* case WP_TR116: /* case WP_7:
addTime = 500; //RPG-X: RedTechie - Use to be 1200 addTime = 500; //RPG-X: RedTechie - Use to be 1200
break;*/ break;*/
} }
@ -3560,9 +3560,9 @@ void PmoveSingle (pmove_t *pmove) {
ps->pm_type != PM_INTERMISSION && ps->pm_type != PM_INTERMISSION &&
ps->pm_type != PM_CCAM && ps->pm_type != PM_CCAM &&
( (pm->cmd.buttons & BUTTON_ATTACK) || (pm->cmd.buttons & BUTTON_ALT_ATTACK) ) && ( (pm->cmd.buttons & BUTTON_ATTACK) || (pm->cmd.buttons & BUTTON_ALT_ATTACK) ) &&
(ps->ammo[ ps->weapon ] || ps->weapon == WP_PHASER)) (ps->ammo[ ps->weapon ] || ps->weapon == WP_5))
{ {
if (((ps->weapon == WP_PHASER) && (!ps->ammo[ ps->weapon ])) || (!(pm->cmd.buttons & BUTTON_ALT_ATTACK))) if (((ps->weapon == WP_5) && (!ps->ammo[ ps->weapon ])) || (!(pm->cmd.buttons & BUTTON_ALT_ATTACK)))
{ {
ps->eFlags &= ~EF_ALT_FIRING; ps->eFlags &= ~EF_ALT_FIRING;
} }
@ -3571,7 +3571,7 @@ void PmoveSingle (pmove_t *pmove) {
ps->eFlags |= EF_ALT_FIRING; ps->eFlags |= EF_ALT_FIRING;
} }
/*if ( ps->weapon == WP_DISRUPTOR ) /*if ( ps->weapon == WP_10 )
{//tech can't use alt attack {//tech can't use alt attack
pm->cmd.buttons &=~BUTTON_ALT_ATTACK; pm->cmd.buttons &=~BUTTON_ALT_ATTACK;
pm->cmd.buttons |= BUTTON_ATTACK; pm->cmd.buttons |= BUTTON_ATTACK;

View file

@ -603,51 +603,51 @@ typedef enum {
//TiM: GAH! I've had it! I've gone through and renamed the weapons to what they're //TiM: GAH! I've had it! I've gone through and renamed the weapons to what they're
//called in RPG-X. Having to remember which is what is starting to wear out my sanity lol. :P //called in RPG-X. Having to remember which is what is starting to wear out my sanity lol. :P
typedef enum { typedef enum {
WP_NONE, // 1 WP_0, // WP_NULL // 1
WP_NULL_HAND, // 2 // 3/10/00 kef -- used to be WP_RAILGUN // 1/1/06 TiM: used to be WP_NULL_HAND WP_1, // WP_NULL_HAND // 2 // 3/10/00 kef -- used to be WP_RAILGUN // 1/1/06 TiM: used to be WP_1
WP_TRICORDER, // 4 WP_2, // WP_TRICORDER // 4
WP_PADD, // 8 WP_3, // WP_PADD // 8
WP_COFFEE, // 16 // 3/13/00 kef -- used to be WP_PLASMAGUN // 1/1/06 TiM: used to be WP_COFFEE WP_4, // WP_COFFEE // 16 // 3/13/00 kef -- used to be WP_PLASMAGUN // 1/1/06 TiM: used to be WP_4
WP_PHASER, // 32 // 3/13/00 kef -- used to be WP_LIGHTNING WP_5, // WP_PHASER // 32 // 3/13/00 kef -- used to be WP_LIGHTNING
WP_COMPRESSION_RIFLE, // 64 // 3/13/00 kef -- added WP_6, // WP_COMPRESSION_RIFLE // 64 // 3/13/00 kef -- added
WP_TR116, // 128 // 3/13/00 kef -- added // 1/1/06 TiM: used to be WP_TR116 WP_7, // WP_TR116 // 128 // 3/13/00 kef -- added // 1/1/06 TiM: used to be WP_7
WP_GRENADE_LAUNCHER, // 256 // 3/10/00 kef -- used to be...heh...WP_GRENADE_LAUNCHER // TiM: Hahaha I get it! hehe ;P WP_8, // WP_GRENADE_LAUNCHER // 256 // 3/10/00 kef -- used to be...heh...WP_8 // TiM: Hahaha I get it! hehe ;P
WP_QUANTUM_BURST, // 512 // 3/13/00 kef -- added WP_9, // WP_9 // 512 // 3/13/00 kef -- added
WP_DISRUPTOR, // 1024 // 3/13/00 kef -- used to be WP_ROCKET_LAUNCHER // 1/1/06 TiM: used to be WP_DISRUPTOR WP_10, // WP_DISRUPTOR // 1024 // 3/13/00 kef -- used to be WP_ROCKET_LAUNCHER // 1/1/06 TiM: used to be WP_10
WP_MEDKIT, // 2048 // 10/12/00 jtd -- added for MP patch/gold - merges single player projectile and taser // 1/1/06 TiM: used to be WP_MEDKIT WP_11, // WP_MEDKIT // 2048 // 10/12/00 jtd -- added for MP patch/gold - merges single player projectile and taser // 1/1/06 TiM: used to be WP_11
WP_VOYAGER_HYPO, // 4096 // 10/6/00 mcg -- added for MP patch/gold WP_12, // WP_VOYAGER_HYPO // 4096 // 10/6/00 mcg -- added for MP patch/gold
WP_DERMAL_REGEN, // 8192 // 3/13/00 kef -- added // 1/1/06 TiM: used to be WP_DERMAL_REGEN WP_13, // WP_DERMAL_REGEN // 8192 // 3/13/00 kef -- added // 1/1/06 TiM: used to be WP_13
WP_TOOLKIT, // 16384 // 10/12/00 jtd -- added for MP patch/gold // 1/1/06 TiM: used to be WP_TOOLKIT WP_14, // WP_TOOLKIT // 16384 // 10/12/00 jtd -- added for MP patch/gold // 1/1/06 TiM: used to be WP_14
WP_HYPERSPANNER, // 32768 // 1/1/06 TiM: used to be WP_NEUTRINO_PROBE WP_15, // WP_HYPERSPANNER // 32768 // 1/1/06 TiM: used to be WP_NEUTRINO_PROBE
WP_NUM_WEAPONS WP_NUM_WEAPONS
} weapon_t; } weapon_t;
/*typedef enum { /*typedef enum {
WP_NONE, WP_0,
WP_PHASER, // 3/13/00 kef -- used to be WP_LIGHTNING WP_5, // 3/13/00 kef -- used to be WP_LIGHTNING
WP_COMPRESSION_RIFLE, // 3/13/00 kef -- added WP_6, // 3/13/00 kef -- added
WP_NULL_HAND, // 3/10/00 kef -- used to be WP_RAILGUN WP_1, // 3/10/00 kef -- used to be WP_RAILGUN
WP_COFFEE, // 3/13/00 kef -- used to be WP_PLASMAGUN WP_4, // 3/13/00 kef -- used to be WP_PLASMAGUN
WP_DISRUPTOR, // 3/13/00 kef -- used to be WP_ROCKET_LAUNCHER WP_10, // 3/13/00 kef -- used to be WP_ROCKET_LAUNCHER
WP_GRENADE_LAUNCHER, // 3/10/00 kef -- used to be...heh...WP_GRENADE_LAUNCHER WP_8, // 3/10/00 kef -- used to be...heh...WP_8
WP_TR116, // 3/13/00 kef -- added WP_7, // 3/13/00 kef -- added
WP_QUANTUM_BURST, // 3/13/00 kef -- added WP_9, // 3/13/00 kef -- added
WP_DERMAL_REGEN, // 3/13/00 kef -- added WP_13, // 3/13/00 kef -- added
WP_VOYAGER_HYPO, // 10/6/00 mcg -- added for MP patch/gold WP_12, // 10/6/00 mcg -- added for MP patch/gold
WP_TOOLKIT, // 10/12/00 jtd -- added for MP patch/gold WP_14, // 10/12/00 jtd -- added for MP patch/gold
WP_MEDKIT, // 10/12/00 jtd -- added for MP patch/gold - merges single player projectile and taser WP_11, // 10/12/00 jtd -- added for MP patch/gold - merges single player projectile and taser
WP_TRICORDER, // WP_2, //
WP_PADD, // WP_3, //
WP_NEUTRINO_PROBE, // WP_NEUTRINO_PROBE, //
WP_TR116, // Phenix's Weapon ;) WP_7, // Phenix's Weapon ;)
WP_NUM_WEAPONS WP_NUM_WEAPONS
} weapon_t;*/ } weapon_t;*/

View file

@ -1464,7 +1464,7 @@ void ShieldTouch(gentity_t *self, gentity_t *other, trace_t *trace)
//RPG-X: RedTechie - Fixed free ent if medic revive on //RPG-X: RedTechie - Fixed free ent if medic revive on
if(rpg_medicsrevive.integer == 1){ if(rpg_medicsrevive.integer == 1){
if(other->health <= 1){ if(other->health <= 1){
other->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_NONE ); other->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_0 );
other->client->ps.stats[STAT_HOLDABLE_ITEM] = HI_NONE; other->client->ps.stats[STAT_HOLDABLE_ITEM] = HI_NONE;
other->client->ps.stats[STAT_HEALTH] = other->health = 1; other->client->ps.stats[STAT_HEALTH] = other->health = 1;
player_die (other, other, other, 1, MOD_FORCEFIELD); player_die (other, other, other, 1, MOD_FORCEFIELD);
@ -2252,8 +2252,8 @@ qboolean PlaceDecoy(gentity_t *ent)
decoy->timestamp = level.time; decoy->timestamp = level.time;
//--------------------------- WEAPON ADJUST //--------------------------- WEAPON ADJUST
//if (decoy->s.weapon==WP_PHASER /*|| decoy->s.weapon==WP_DERMAL_REGEN*/) //if (decoy->s.weapon==WP_5 /*|| decoy->s.weapon==WP_13*/)
// decoy->s.weapon = WP_NULL_HAND; // decoy->s.weapon = WP_1;
// The Phaser and Dreadnought (Arc Welder) weapons are rendered on the // The Phaser and Dreadnought (Arc Welder) weapons are rendered on the
// client side differently, and cannot be used by the decoy // client side differently, and cannot be used by the decoy
@ -2601,7 +2601,7 @@ void ThrowWeapon( gentity_t *ent, char *txt )
return; return;
} }
if ( ps->weapon == WP_NULL_HAND || ( ucmd->buttons & BUTTON_ATTACK )) { if ( ps->weapon == WP_1 || ( ucmd->buttons & BUTTON_ATTACK )) {
return; return;
} }
@ -2614,7 +2614,7 @@ void ThrowWeapon( gentity_t *ent, char *txt )
ps->ammo[ ps->weapon ] -= 1; ps->ammo[ ps->weapon ] -= 1;
if (ps->ammo[ ps->weapon ] <= 0) { if (ps->ammo[ ps->weapon ] <= 0) {
ps->stats[STAT_WEAPONS] &= ~( 1 << ps->weapon ); ps->stats[STAT_WEAPONS] &= ~( 1 << ps->weapon );
ps->weapon = WP_NULL_HAND; ps->weapon = WP_1;
for ( i = WP_NUM_WEAPONS - 1 ; i > 0 ; i-- ) { for ( i = WP_NUM_WEAPONS - 1 ; i > 0 ; i-- ) {
if ( ps->stats[STAT_WEAPONS] & ( 1 << i ) ) { if ( ps->stats[STAT_WEAPONS] & ( 1 << i ) ) {
ps->weapon = i; ps->weapon = i;

View file

@ -235,8 +235,8 @@ static gentity_t *SpawnModelOnVictoryPad( gentity_t *pad, vec3_t offset, gentity
eState->torsoAnim = BOTH_STAND1; eState->torsoAnim = BOTH_STAND1;
// fix up some weapon holding / shooting issues // fix up some weapon holding / shooting issues
if (eState->weapon==WP_PHASER || eState->weapon==WP_DERMAL_REGEN || eState->weapon == WP_NONE ) if (eState->weapon==WP_5 || eState->weapon==WP_13 || eState->weapon == WP_0 )
eState->weapon = WP_COMPRESSION_RIFLE; eState->weapon = WP_6;
eState->event = 0; eState->event = 0;
eShared->svFlags = ent->r.svFlags; eShared->svFlags = ent->r.svFlags;

View file

@ -76,7 +76,7 @@ void breakable_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker,
te = G_TempEntity( org, EV_MISSILE_MISS ); te = G_TempEntity( org, EV_MISSILE_MISS );
VectorSet( dir, 0, 0, 1 ); VectorSet( dir, 0, 0, 1 );
te->s.eventParm = DirToByte( dir ); te->s.eventParm = DirToByte( dir );
te->s.weapon = WP_GRENADE_LAUNCHER; te->s.weapon = WP_8;
//G_Sound( self, G_SoundIndex("sound/weapons/explosions/cargoexplode.wav") ); //G_Sound( self, G_SoundIndex("sound/weapons/explosions/cargoexplode.wav") );
} }

View file

@ -2675,13 +2675,13 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
int i; int i;
int Bits; int Bits;
Bits = ( 1 << WP_NULL_HAND); Bits = ( 1 << WP_1);
Bits |= g_classData[pclass].weaponsFlags; Bits |= g_classData[pclass].weaponsFlags;
for ( i = WP_NULL_HAND; i < MAX_WEAPONS; i++ ) { for ( i = WP_1; i < MAX_WEAPONS; i++ ) {
//if we want no weapons and aren't an admin, skip this particular weapon //if we want no weapons and aren't an admin, skip this particular weapon
if ( rpg_noweapons.integer != 0 && !g_classData[pclass].isAdmin/*pclass != PC_ADMIN*/ ) { if ( rpg_noweapons.integer != 0 && !g_classData[pclass].isAdmin/*pclass != PC_ADMIN*/ ) {
if ( i >= WP_PHASER && i <= WP_DISRUPTOR ) { if ( i >= WP_5 && i <= WP_10 ) {
continue; continue;
} }
} }
@ -2700,8 +2700,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
//case PC_DEMO: //case PC_DEMO:
//case PC_MEDIC: //case PC_MEDIC:
//case PC_TECH: //case PC_TECH:
// client->ps.stats[STAT_WEAPONS] = ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] = ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// break;*/ // break;*/
//case PC_ADMIN: //case PC_ADMIN:
//case PC_SECURITY: //case PC_SECURITY:
@ -2712,7 +2712,7 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
//case PC_SCIENCE: //case PC_SCIENCE:
//case PC_ALIEN: //case PC_ALIEN:
// //TiM: Hardcoded, regardless, no way out of this, all players get the null hand // //TiM: Hardcoded, regardless, no way out of this, all players get the null hand
// Bits = ( 1 << WP_NULL_HAND); //Null Hand // Bits = ( 1 << WP_1); //Null Hand
// switch ( pclass ) // switch ( pclass )
// { // {
@ -2746,10 +2746,10 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// } // }
// //
// //TiM - Totally re-uberhancified using programming's modern convieniences like for loops and bit shifts. :) // //TiM - Totally re-uberhancified using programming's modern convieniences like for loops and bit shifts. :)
// for ( i = WP_NULL_HAND; i < MAX_WEAPONS; i++ ) { // for ( i = WP_1; i < MAX_WEAPONS; i++ ) {
// //if we want no weapons and aren't an admin, skip this particular weapon // //if we want no weapons and aren't an admin, skip this particular weapon
// if ( rpg_noweapons.integer != 0 && pclass != PC_ADMIN ) { // if ( rpg_noweapons.integer != 0 && pclass != PC_ADMIN ) {
// if ( i >= WP_PHASER && i <= WP_DISRUPTOR ) { // if ( i >= WP_5 && i <= WP_10 ) {
// continue; // continue;
// } // }
// } // }
@ -2767,57 +2767,57 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// //Tricorder // //Tricorder
// if ( Bits & 1 ) // if ( Bits & 1 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// //
// //PADD // //PADD
// if ( Bits & 2 ) // if ( Bits & 2 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PADD ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_3 );
// client->ps.ammo[WP_PADD] = PHASER_AMMO_MAX; // client->ps.ammo[WP_3] = PHASER_AMMO_MAX;
// } // }
// //Phaser // //Phaser
// if ( Bits & 4 ) // if ( Bits & 4 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// } // }
// //Phaser Rifle // //Phaser Rifle
// if ( Bits & 8 ) // if ( Bits & 8 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6 );
// client->ps.ammo[WP_COMPRESSION_RIFLE] = PHASER_AMMO_MAX; // client->ps.ammo[WP_6] = PHASER_AMMO_MAX;
// } // }
// //Alien Disruptor // //Alien Disruptor
// if ( Bits & 16 ) // if ( Bits & 16 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DISRUPTOR ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_10 );
// client->ps.ammo[WP_DISRUPTOR] = PHASER_AMMO_MAX; // client->ps.ammo[WP_10] = PHASER_AMMO_MAX;
// } // }
// //Hypospray // //Hypospray
// if ( Bits & 32 ) // if ( Bits & 32 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12 );
// client->ps.ammo[WP_VOYAGER_HYPO] = PHASER_AMMO_MAX; // client->ps.ammo[WP_12] = PHASER_AMMO_MAX;
// } // }
// //Dermal Regenerator // //Dermal Regenerator
// if ( Bits & 64 ) // if ( Bits & 64 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DERMAL_REGEN ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_13 );
// client->ps.ammo[WP_DERMAL_REGEN] = PHASER_AMMO_MAX; // client->ps.ammo[WP_13] = PHASER_AMMO_MAX;
// } // }
// //Med Kit // //Med Kit
// if ( Bits & 128 ) // if ( Bits & 128 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MEDKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_11 );
// client->ps.ammo[WP_MEDKIT] = PHASER_AMMO_MAX; // client->ps.ammo[WP_11] = PHASER_AMMO_MAX;
// } // }
// //Neutrino Probe // //Neutrino Probe
@ -2830,43 +2830,43 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// //Engineering Tool Kit // //Engineering Tool Kit
// if ( Bits & 512 ) // if ( Bits & 512 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TOOLKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_14 );
// client->ps.ammo[WP_TOOLKIT] = PHASER_AMMO_MAX; // client->ps.ammo[WP_14] = PHASER_AMMO_MAX;
// } // }
// //IMOD // //IMOD
// if ( Bits & 1024 ) // if ( Bits & 1024 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NULL_HAND ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_1 );
// client->ps.ammo[WP_NULL_HAND] = PHASER_AMMO_MAX; // client->ps.ammo[WP_1] = PHASER_AMMO_MAX;
// } // }
// //Scavenger Rifle // //Scavenger Rifle
// if ( Bits & 2048 ) // if ( Bits & 2048 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COFFEE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_4 );
// client->ps.ammo[WP_COFFEE] = PHASER_AMMO_MAX; // client->ps.ammo[WP_4] = PHASER_AMMO_MAX;
// } // }
// //Photon Torpedo Launcher // //Photon Torpedo Launcher
// if ( Bits & 4096 ) // if ( Bits & 4096 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_QUANTUM_BURST ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_9 );
// client->ps.ammo[WP_QUANTUM_BURST] = PHASER_AMMO_MAX; // client->ps.ammo[WP_9] = PHASER_AMMO_MAX;
// } // }
// //TR-116 // //TR-116
// if ( Bits & 8192 ) // if ( Bits & 8192 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TR116 ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_7 );
// client->ps.ammo[WP_TR116] = PHASER_AMMO_MAX; // client->ps.ammo[WP_7] = PHASER_AMMO_MAX;
// } // }
// //Admin Gun // //Admin Gun
// if ( Bits & 16384 ) // if ( Bits & 16384 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRENADE_LAUNCHER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_8 );
// client->ps.ammo[WP_GRENADE_LAUNCHER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_8] = PHASER_AMMO_MAX;
// } // }
// //
// //
@ -2881,8 +2881,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 8 && pclass == PC_ADMIN // || rpg_adminflags.integer & 8 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 8 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 8 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 16 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 16 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 16 && pclass == PC_SECURITY // || rpg_securityflags.integer & 16 && pclass == PC_SECURITY
@ -2893,8 +2893,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 16 && pclass == PC_ADMIN // || rpg_adminflags.integer & 16 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 16 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 16 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6 );
// client->ps.ammo[WP_COMPRESSION_RIFLE] = PHASER_AMMO_MAX; // client->ps.ammo[WP_6] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 32 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 32 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 32 && pclass == PC_SECURITY // || rpg_securityflags.integer & 32 && pclass == PC_SECURITY
@ -2905,8 +2905,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 32 && pclass == PC_ADMIN // || rpg_adminflags.integer & 32 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 32 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 32 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NULL_HAND ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_1 );
// client->ps.ammo[WP_NULL_HAND] = PHASER_AMMO_MAX; // client->ps.ammo[WP_1] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 64 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 64 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 64 && pclass == PC_SECURITY // || rpg_securityflags.integer & 64 && pclass == PC_SECURITY
@ -2917,8 +2917,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 64 && pclass == PC_ADMIN // || rpg_adminflags.integer & 64 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 64 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 64 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DISRUPTOR ); //STASIS // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_10 ); //STASIS
// client->ps.ammo[WP_DISRUPTOR] = PHASER_AMMO_MAX; // client->ps.ammo[WP_10] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 128 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 128 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 128 && pclass == PC_SECURITY // || rpg_securityflags.integer & 128 && pclass == PC_SECURITY
@ -2929,8 +2929,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 128 && pclass == PC_ADMIN // || rpg_adminflags.integer & 128 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 128 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 128 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DERMAL_REGEN ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_13 );
// client->ps.ammo[WP_DERMAL_REGEN] = PHASER_AMMO_MAX; // client->ps.ammo[WP_13] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 256 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 256 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 256 && pclass == PC_SECURITY // || rpg_securityflags.integer & 256 && pclass == PC_SECURITY
@ -2941,8 +2941,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 256 && pclass == PC_ADMIN // || rpg_adminflags.integer & 256 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 256 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 256 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12 );
// client->ps.ammo[WP_VOYAGER_HYPO] = PHASER_AMMO_MAX; // client->ps.ammo[WP_12] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 512 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 512 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 512 && pclass == PC_SECURITY // || rpg_securityflags.integer & 512 && pclass == PC_SECURITY
@ -2953,8 +2953,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 512 && pclass == PC_ADMIN // || rpg_adminflags.integer & 512 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 512 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 512 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TOOLKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_14 );
// client->ps.ammo[WP_TOOLKIT] = PHASER_AMMO_MAX; // client->ps.ammo[WP_14] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 1024 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 1024 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 1024 && pclass == PC_SECURITY // || rpg_securityflags.integer & 1024 && pclass == PC_SECURITY
@ -2965,8 +2965,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 1024 && pclass == PC_ADMIN // || rpg_adminflags.integer & 1024 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 1024 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 1024 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MEDKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_11 );
// client->ps.ammo[WP_MEDKIT] = PHASER_AMMO_MAX; // client->ps.ammo[WP_11] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 2048 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 2048 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 2048 && pclass == PC_SECURITY // || rpg_securityflags.integer & 2048 && pclass == PC_SECURITY
@ -2977,8 +2977,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 2048 && pclass == PC_ADMIN // || rpg_adminflags.integer & 2048 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 2048 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 2048 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_alienflags.integer & 4096 && pclass == PC_ALIEN // if ( rpg_alienflags.integer & 4096 && pclass == PC_ALIEN
// || rpg_securityflags.integer & 4096 && pclass == PC_SECURITY // || rpg_securityflags.integer & 4096 && pclass == PC_SECURITY
@ -3001,8 +3001,8 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// || rpg_adminflags.integer & 8192 && pclass == PC_ADMIN // || rpg_adminflags.integer & 8192 && pclass == PC_ADMIN
// || rpg_scienceflags.integer & 8192 && pclass == PC_SCIENCE ) // || rpg_scienceflags.integer & 8192 && pclass == PC_SCIENCE )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TR116 ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_7 );
// client->ps.ammo[WP_TR116] = PHASER_AMMO_MAX; // client->ps.ammo[WP_7] = PHASER_AMMO_MAX;
// } // }
// //
@ -3012,57 +3012,57 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// //Tricorder // //Tricorder
// if ( Bits & 1 ) // if ( Bits & 1 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// //
// //PADD // //PADD
// if ( Bits & 2 ) // if ( Bits & 2 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PADD ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_3 );
// client->ps.ammo[WP_PADD] = PHASER_AMMO_MAX; // client->ps.ammo[WP_3] = PHASER_AMMO_MAX;
// } // }
// //Phaser // //Phaser
// if ( Bits & 4 && pclass == PC_ADMIN) // if ( Bits & 4 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// } // }
// //Phaser Rifle // //Phaser Rifle
// if ( Bits & 8 && pclass == PC_ADMIN) // if ( Bits & 8 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6 );
// client->ps.ammo[WP_COMPRESSION_RIFLE] = PHASER_AMMO_MAX; // client->ps.ammo[WP_6] = PHASER_AMMO_MAX;
// } // }
// //Alien Disruptor // //Alien Disruptor
// if ( Bits & 16 && pclass == PC_ADMIN) // if ( Bits & 16 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DISRUPTOR ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_10 );
// client->ps.ammo[WP_DISRUPTOR] = PHASER_AMMO_MAX; // client->ps.ammo[WP_10] = PHASER_AMMO_MAX;
// } // }
// //Hypospray // //Hypospray
// if ( Bits & 32 ) // if ( Bits & 32 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12 );
// client->ps.ammo[WP_VOYAGER_HYPO] = PHASER_AMMO_MAX; // client->ps.ammo[WP_12] = PHASER_AMMO_MAX;
// } // }
// //Dermal Regenerator // //Dermal Regenerator
// if ( Bits & 64 ) // if ( Bits & 64 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DERMAL_REGEN ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_13 );
// client->ps.ammo[WP_DERMAL_REGEN] = PHASER_AMMO_MAX; // client->ps.ammo[WP_13] = PHASER_AMMO_MAX;
// } // }
// //Med Kit // //Med Kit
// if ( Bits & 128 ) // if ( Bits & 128 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MEDKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_11 );
// client->ps.ammo[WP_MEDKIT] = PHASER_AMMO_MAX; // client->ps.ammo[WP_11] = PHASER_AMMO_MAX;
// } // }
// //Neutrino Probe // //Neutrino Probe
@ -3075,128 +3075,128 @@ void ClientWeaponsForClass ( gclient_t *client, pclass_t pclass )
// //Engineering Tool Kit // //Engineering Tool Kit
// if ( Bits & 512 ) // if ( Bits & 512 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TOOLKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_14 );
// client->ps.ammo[WP_TOOLKIT] = PHASER_AMMO_MAX; // client->ps.ammo[WP_14] = PHASER_AMMO_MAX;
// } // }
// //IMOD // //IMOD
// if ( Bits & 1024 && pclass == PC_ADMIN) // if ( Bits & 1024 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NULL_HAND ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_1 );
// client->ps.ammo[WP_NULL_HAND] = PHASER_AMMO_MAX; // client->ps.ammo[WP_1] = PHASER_AMMO_MAX;
// } // }
// //Scavenger Rifle // //Scavenger Rifle
// if ( Bits & 2048 && pclass == PC_ADMIN) // if ( Bits & 2048 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COFFEE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_4 );
// client->ps.ammo[WP_COFFEE] = PHASER_AMMO_MAX; // client->ps.ammo[WP_4] = PHASER_AMMO_MAX;
// } // }
// //Photon Torpedo Launcher // //Photon Torpedo Launcher
// if ( Bits & 4096 && pclass == PC_ADMIN) // if ( Bits & 4096 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_QUANTUM_BURST ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_9 );
// client->ps.ammo[WP_QUANTUM_BURST] = PHASER_AMMO_MAX; // client->ps.ammo[WP_9] = PHASER_AMMO_MAX;
// } // }
// //TR-116 // //TR-116
// if ( Bits & 8192 && pclass == PC_ADMIN) // if ( Bits & 8192 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TR116 ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_7 );
// client->ps.ammo[WP_TR116] = PHASER_AMMO_MAX; // client->ps.ammo[WP_7] = PHASER_AMMO_MAX;
// } // }
// //Admin Gun // //Admin Gun
// if ( Bits & 16384 && pclass == PC_ADMIN) // if ( Bits & 16384 && pclass == PC_ADMIN)
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRENADE_LAUNCHER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_8 );
// client->ps.ammo[WP_GRENADE_LAUNCHER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_8] = PHASER_AMMO_MAX;
// } // }
// } // }
// break; // break;
///*case PC_ACTIONHERO: ///*case PC_ACTIONHERO:
// client->ps.stats[STAT_WEAPONS] = ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] = ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6 );
// client->ps.ammo[WP_COMPRESSION_RIFLE] = Max_Ammo[WP_COMPRESSION_RIFLE]; // client->ps.ammo[WP_6] = Max_Ammo[WP_6];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NULL_HAND ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_1 );
// client->ps.ammo[WP_NULL_HAND] = Max_Ammo[WP_NULL_HAND]; // client->ps.ammo[WP_1] = Max_Ammo[WP_1];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COFFEE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_4 );
// client->ps.ammo[WP_COFFEE] = Max_Ammo[WP_COFFEE]; // client->ps.ammo[WP_4] = Max_Ammo[WP_4];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DISRUPTOR ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_10 );
// client->ps.ammo[WP_DISRUPTOR] = Max_Ammo[WP_DISRUPTOR]; // client->ps.ammo[WP_10] = Max_Ammo[WP_10];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRENADE_LAUNCHER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_8 );
// client->ps.ammo[WP_GRENADE_LAUNCHER] = Max_Ammo[WP_GRENADE_LAUNCHER]; // client->ps.ammo[WP_8] = Max_Ammo[WP_8];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TR116 ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_7 );
// client->ps.ammo[WP_TR116] = Max_Ammo[WP_TR116]; // client->ps.ammo[WP_7] = Max_Ammo[WP_7];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_QUANTUM_BURST ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_9 );
// client->ps.ammo[WP_QUANTUM_BURST] = Max_Ammo[WP_QUANTUM_BURST]; // client->ps.ammo[WP_9] = Max_Ammo[WP_9];
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DERMAL_REGEN ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_13 );
// client->ps.ammo[WP_DERMAL_REGEN] = Max_Ammo[WP_DERMAL_REGEN]; // client->ps.ammo[WP_13] = Max_Ammo[WP_13];
// break; // break;
//case PC_BORG: //case PC_BORG:
// // assimilator // // assimilator
// client->ps.stats[STAT_WEAPONS] = ( 1 << WP_TOOLKIT ); // client->ps.stats[STAT_WEAPONS] = ( 1 << WP_14 );
// client->ps.ammo[WP_TOOLKIT] = Max_Ammo[WP_TOOLKIT]; // client->ps.ammo[WP_14] = Max_Ammo[WP_14];
// if ( client->ps.clientNum != borgQueenClientNum ) // if ( client->ps.clientNum != borgQueenClientNum )
// { // {
// // projectile/shock weapon // // projectile/shock weapon
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MEDKIT ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_11 );
// client->ps.ammo[WP_MEDKIT] = Max_Ammo[WP_MEDKIT]; // client->ps.ammo[WP_11] = Max_Ammo[WP_11];
// } // }
// break;*/ // break;*/
//case PC_NOCLASS: //case PC_NOCLASS:
//default: //default:
// if ( rpg_rpg.integer != 0 ) // if ( rpg_rpg.integer != 0 )
// { // {
// //client->ps.stats[STAT_WEAPONS] = ( 1 << WP_PADD ); // //client->ps.stats[STAT_WEAPONS] = ( 1 << WP_3 );
// //client->ps.ammo[WP_PADD] = PHASER_AMMO_MAX; // //client->ps.ammo[WP_3] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] = ( 1 << WP_NULL_HAND ); // client->ps.stats[STAT_WEAPONS] = ( 1 << WP_1 );
// client->ps.ammo[WP_NULL_HAND] = PHASER_AMMO_MAX; // client->ps.ammo[WP_1] = PHASER_AMMO_MAX;
// if ( rpg_noweapons.integer == 0 ) // if ( rpg_noweapons.integer == 0 )
// { // {
// if ( rpg_rpg.integer == 2 ) // if ( rpg_rpg.integer == 2 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_rpg.integer == 3 ) // if ( rpg_rpg.integer == 3 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12 );
// client->ps.ammo[WP_VOYAGER_HYPO] = PHASER_AMMO_MAX; // client->ps.ammo[WP_12] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_rpg.integer == 4 ) // if ( rpg_rpg.integer == 4 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12 );
// client->ps.ammo[WP_VOYAGER_HYPO] = PHASER_AMMO_MAX; // client->ps.ammo[WP_12] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// if ( rpg_rpg.integer == 5 ) // if ( rpg_rpg.integer == 5 )
// { // {
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5 );
// client->ps.ammo[WP_PHASER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_5] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6 );
// client->ps.ammo[WP_COMPRESSION_RIFLE] = 200; // client->ps.ammo[WP_6] = 200;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12 );
// client->ps.ammo[WP_VOYAGER_HYPO] = PHASER_AMMO_MAX; // client->ps.ammo[WP_12] = PHASER_AMMO_MAX;
// client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; // client->ps.ammo[WP_2] = PHASER_AMMO_MAX;
// } // }
// } // }
// } // }
// else // else
// { //TiM: Tricorder... I think // { //TiM: Tricorder... I think
// client->ps.stats[STAT_WEAPONS] = ( 1 << WP_TRICORDER ); // client->ps.stats[STAT_WEAPONS] = ( 1 << WP_2 );
// client->ps.ammo[WP_TRICORDER] = PHASER_AMMO_MAX; //13 // client->ps.ammo[WP_2] = PHASER_AMMO_MAX; //13
// } // }
// break; // break;
//} //}
@ -3617,8 +3617,8 @@ void ClientSpawn(gentity_t *ent, int rpgx_spawn, qboolean fromDeath ) {
if ( g_pModDisintegration.integer != 0 ) if ( g_pModDisintegration.integer != 0 )
{//this is instagib {//this is instagib
client->ps.stats[STAT_WEAPONS] = ( 1 << WP_COMPRESSION_RIFLE ); client->ps.stats[STAT_WEAPONS] = ( 1 << WP_6 );
client->ps.ammo[WP_COMPRESSION_RIFLE] = Max_Ammo[WP_COMPRESSION_RIFLE]; client->ps.ammo[WP_6] = Max_Ammo[WP_6];
} }
else else
{ {
@ -3707,7 +3707,7 @@ void ClientSpawn(gentity_t *ent, int rpgx_spawn, qboolean fromDeath ) {
trap_LinkEntity (ent); trap_LinkEntity (ent);
// force the base weapon up // force the base weapon up
client->ps.weapon = WP_NULL_HAND; //TiM: WP_PHASER client->ps.weapon = WP_1; //TiM: WP_5
client->ps.weaponstate = WEAPON_READY; client->ps.weaponstate = WEAPON_READY;
} }
@ -3755,7 +3755,7 @@ void ClientSpawn(gentity_t *ent, int rpgx_spawn, qboolean fromDeath ) {
}*/ }*/
//TiM - Always default to the null hand //TiM - Always default to the null hand
client->ps.weapon = WP_NULL_HAND; client->ps.weapon = WP_1;
//} //}
} }
@ -3984,8 +3984,8 @@ void ClientSpawn(gentity_t *ent, int rpgx_spawn, qboolean fromDeath ) {
body->s.weapon = ent->s.weapon; body->s.weapon = ent->s.weapon;
// fix up some weapon holding / shooting issues // fix up some weapon holding / shooting issues
//if (body->s.weapon==WP_PHASER || body->s.weapon==WP_DERMAL_REGEN || body->s.weapon == WP_NONE ) //if (body->s.weapon==WP_5 || body->s.weapon==WP_13 || body->s.weapon == WP_0 )
// body->s.weapon = WP_COMPRESSION_RIFLE; // body->s.weapon = WP_6;
body->s.event = 0; body->s.event = 0;
body->r.svFlags = ent->r.svFlags; body->r.svFlags = ent->r.svFlags;
@ -4056,8 +4056,8 @@ gentity_t *SpawnBeamOutPlayer( gentity_t *ent ) {
body->s.torsoAnim= ent->client->ps.stats[TORSOANIM]; body->s.torsoAnim= ent->client->ps.stats[TORSOANIM];
//--------------------------- WEAPON ADJUST //--------------------------- WEAPON ADJUST
if (body->s.weapon==WP_PHASER || body->s.weapon==WP_DERMAL_REGEN) if (body->s.weapon==WP_5 || body->s.weapon==WP_13)
body->s.weapon = WP_COMPRESSION_RIFLE; body->s.weapon = WP_6;
return body; return body;
} }

View file

@ -520,7 +520,7 @@ static void Cmd_Give_f( gentity_t *ent ) {
case TYPE_ALL: case TYPE_ALL:
targEnt->health = ps->stats[STAT_MAX_HEALTH]; targEnt->health = ps->stats[STAT_MAX_HEALTH];
ps->stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_NONE ); ps->stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_0 );
//RPG-X: J2J - Added so you dont just get empty weapons //RPG-X: J2J - Added so you dont just get empty weapons
for ( i = MAX_WEAPONS - 1; i > -1; i-- ) { /* RPG-X | Marcin | 30/12/2008 */ // GSIO: Changed from i++ to i-- for ( i = MAX_WEAPONS - 1; i > -1; i-- ) { /* RPG-X | Marcin | 30/12/2008 */ // GSIO: Changed from i++ to i--
@ -534,7 +534,7 @@ static void Cmd_Give_f( gentity_t *ent ) {
targEnt->health = ps->stats[STAT_MAX_HEALTH]; targEnt->health = ps->stats[STAT_MAX_HEALTH];
break; break;
case TYPE_WEAPONS: case TYPE_WEAPONS:
ps->stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_NONE ); ps->stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_0 );
//RPG-X: J2J - Added so you dont just get empty weapons //RPG-X: J2J - Added so you dont just get empty weapons
for ( i = MAX_WEAPONS -1; i > -1 ; i-- ) { // GSIO: changed from i++ to i-- for ( i = MAX_WEAPONS -1; i > -1 ; i-- ) { // GSIO: changed from i++ to i--
@ -680,7 +680,7 @@ static void Cmd_Give_f( gentity_t *ent ) {
// //
// if (give_all || Q_stricmp(name, "weapons") == 0) // if (give_all || Q_stricmp(name, "weapons") == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_NONE ); // ent->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_0 );
// //RPG-X: J2J - Added so you dont just get empty weapons // //RPG-X: J2J - Added so you dont just get empty weapons
// for ( i = 0 ; i < MAX_WEAPONS ; i++ ) { // for ( i = 0 ; i < MAX_WEAPONS ; i++ ) {
// ent->client->ps.ammo[i] = 999; // ent->client->ps.ammo[i] = 999;
@ -731,96 +731,96 @@ static void Cmd_Give_f( gentity_t *ent ) {
// //
// if ( Q_stricmp(name, ItemNames[2]) == 0) // if ( Q_stricmp(name, ItemNames[2]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5);
// ent->client->ps.ammo[WP_PHASER] = 999; // ent->client->ps.ammo[WP_5] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[3]) == 0) // if (Q_stricmp(name, ItemNames[3]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6);
// ent->client->ps.ammo[WP_COMPRESSION_RIFLE] = 999; // ent->client->ps.ammo[WP_6] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[4]) == 0) // if (Q_stricmp(name, ItemNames[4]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NULL_HAND); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_1);
// ent->client->ps.ammo[WP_NULL_HAND] = 999; // ent->client->ps.ammo[WP_1] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[5]) == 0) // if (Q_stricmp(name, ItemNames[5]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COFFEE); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_4);
// ent->client->ps.ammo[WP_COFFEE] = 999; // ent->client->ps.ammo[WP_4] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[6]) == 0) // if (Q_stricmp(name, ItemNames[6]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DISRUPTOR); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_10);
// ent->client->ps.ammo[WP_DISRUPTOR] = 999; // ent->client->ps.ammo[WP_10] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[7]) == 0) // if (Q_stricmp(name, ItemNames[7]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRENADE_LAUNCHER); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_8);
// ent->client->ps.ammo[WP_GRENADE_LAUNCHER] = 999; // ent->client->ps.ammo[WP_8] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[8]) == 0) // if (Q_stricmp(name, ItemNames[8]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TR116); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_7);
// ent->client->ps.ammo[WP_TR116] = 999; // ent->client->ps.ammo[WP_7] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[9]) == 0) // if (Q_stricmp(name, ItemNames[9]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_QUANTUM_BURST); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_9);
// ent->client->ps.ammo[WP_QUANTUM_BURST] = 999; // ent->client->ps.ammo[WP_9] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[10]) == 0) // if (Q_stricmp(name, ItemNames[10]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DERMAL_REGEN); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_13);
// ent->client->ps.ammo[WP_DERMAL_REGEN] = 999; // ent->client->ps.ammo[WP_13] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[11]) == 0) // if (Q_stricmp(name, ItemNames[11]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12);
// ent->client->ps.ammo[WP_VOYAGER_HYPO] = 999; // ent->client->ps.ammo[WP_12] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[12]) == 0) // if (Q_stricmp(name, ItemNames[12]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TOOLKIT); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_14);
// ent->client->ps.ammo[WP_TOOLKIT] = 999; // ent->client->ps.ammo[WP_14] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[13]) == 0) // if (Q_stricmp(name, ItemNames[13]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MEDKIT); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_11);
// ent->client->ps.ammo[WP_MEDKIT] = 999; // ent->client->ps.ammo[WP_11] = 999;
// //
// if (!give_all) // if (!give_all)
// //
@ -828,16 +828,16 @@ static void Cmd_Give_f( gentity_t *ent ) {
// } // }
// if (Q_stricmp(name, ItemNames[14]) == 0) // if (Q_stricmp(name, ItemNames[14]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2);
// ent->client->ps.ammo[WP_TRICORDER] = 999; // ent->client->ps.ammo[WP_2] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (Q_stricmp(name, ItemNames[15]) == 0) // if (Q_stricmp(name, ItemNames[15]) == 0)
// { // {
// ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PADD); // ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_3);
// ent->client->ps.ammo[WP_PADD] = 999; // ent->client->ps.ammo[WP_3] = 999;
// //
// if (!give_all) // if (!give_all)
// return; // return;
@ -923,7 +923,7 @@ void Cmd_Give_f (gentity_t *ent)
if (give_all || Q_stricmp(name, "weapons") == 0) if (give_all || Q_stricmp(name, "weapons") == 0)
{ {
ent->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_NONE ); ent->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_0 );
if (!give_all) if (!give_all)
return; return;
} }
@ -1174,7 +1174,7 @@ static void Cmd_Kill_f( gentity_t *ent )
//RPG-X: Medics revive Support for suiciding //RPG-X: Medics revive Support for suiciding
if(rpg_medicsrevive.integer != 0 ){ if(rpg_medicsrevive.integer != 0 ){
ps->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); ps->stats[STAT_WEAPONS] = ( 1 << WP_0 );
ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE; ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
ps->stats[STAT_HEALTH] = ent->health = 1; ps->stats[STAT_HEALTH] = ent->health = 1;
player_die (ent, ent, ent, 1, meansOfDeath ); //MOD_SUICIDE player_die (ent, ent, ent, 1, meansOfDeath ); //MOD_SUICIDE
@ -1235,7 +1235,7 @@ in the RPG-X forum lol.
//RPG-X: Medics revive Support for suiciding //RPG-X: Medics revive Support for suiciding
if(rpg_medicsrevive.integer == 1){ if(rpg_medicsrevive.integer == 1){
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_NONE ); ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_0 );
ent->client->ps.stats[STAT_HOLDABLE_ITEM] = HI_NONE; ent->client->ps.stats[STAT_HOLDABLE_ITEM] = HI_NONE;
ent->client->ps.stats[STAT_HEALTH] = ent->health = 1; ent->client->ps.stats[STAT_HEALTH] = ent->health = 1;
player_die (ent, ent, ent, 1, MOD_CUSTOM_DIE ); player_die (ent, ent, ent, 1, MOD_CUSTOM_DIE );
@ -2014,7 +2014,7 @@ qboolean SetClass( gentity_t *ent, char *s, char *teamName, qboolean SaveToCvar
if(g_classData[pclass].isn00b/*pclass == PC_N00B*/){ if(g_classData[pclass].isn00b/*pclass == PC_N00B*/){
ClientSpawn(ent, 1, qfalse); ClientSpawn(ent, 1, qfalse);
ps->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); ps->stats[STAT_WEAPONS] = ( 1 << WP_0 );
ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE; ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
//Take some admin powerups away and give some n00b powerps ;) //Take some admin powerups away and give some n00b powerps ;)
@ -3385,7 +3385,7 @@ Give an item to any player on the sevrer using ID
// //
// if (give_all || Q_stricmp(name, "weapons") == 0) // if (give_all || Q_stricmp(name, "weapons") == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_NONE ); // target->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_0 );
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
@ -3416,96 +3416,96 @@ Give an item to any player on the sevrer using ID
// //
// if (give_all || Q_stricmp(name, ItemNames[2]) == 0) // if (give_all || Q_stricmp(name, ItemNames[2]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PHASER); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_5);
// target->client->ps.ammo[WP_PHASER] = -1; // target->client->ps.ammo[WP_5] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[3]) == 0) // if (give_all || Q_stricmp(name, ItemNames[3]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COMPRESSION_RIFLE); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_6);
// target->client->ps.ammo[WP_COMPRESSION_RIFLE] = -1; // target->client->ps.ammo[WP_6] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[4]) == 0) // if (give_all || Q_stricmp(name, ItemNames[4]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NULL_HAND); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_1);
// target->client->ps.ammo[WP_NULL_HAND] = -1; // target->client->ps.ammo[WP_1] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[5]) == 0) // if (give_all || Q_stricmp(name, ItemNames[5]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_COFFEE); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_4);
// target->client->ps.ammo[WP_COFFEE] = -1; // target->client->ps.ammo[WP_4] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[6]) == 0) // if (give_all || Q_stricmp(name, ItemNames[6]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DISRUPTOR); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_10);
// target->client->ps.ammo[WP_DISRUPTOR] = -1; // target->client->ps.ammo[WP_10] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[7]) == 0) // if (give_all || Q_stricmp(name, ItemNames[7]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRENADE_LAUNCHER); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_8);
// target->client->ps.ammo[WP_GRENADE_LAUNCHER] = -1; // target->client->ps.ammo[WP_8] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[8]) == 0) // if (give_all || Q_stricmp(name, ItemNames[8]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TR116); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_7);
// target->client->ps.ammo[WP_TR116] = -1; // target->client->ps.ammo[WP_7] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[9]) == 0) // if (give_all || Q_stricmp(name, ItemNames[9]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_QUANTUM_BURST); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_9);
// target->client->ps.ammo[WP_QUANTUM_BURST] = -1; // target->client->ps.ammo[WP_9] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[10]) == 0) // if (give_all || Q_stricmp(name, ItemNames[10]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_DERMAL_REGEN); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_13);
// target->client->ps.ammo[WP_DERMAL_REGEN] = -1; // target->client->ps.ammo[WP_13] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[11]) == 0) // if (give_all || Q_stricmp(name, ItemNames[11]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_VOYAGER_HYPO); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_12);
// target->client->ps.ammo[WP_VOYAGER_HYPO] = -1; // target->client->ps.ammo[WP_12] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[12]) == 0) // if (give_all || Q_stricmp(name, ItemNames[12]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TOOLKIT); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_14);
// target->client->ps.ammo[WP_TOOLKIT] = -1; // target->client->ps.ammo[WP_14] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[13]) == 0) // if (give_all || Q_stricmp(name, ItemNames[13]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MEDKIT); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_11);
// target->client->ps.ammo[WP_MEDKIT] = -1; // target->client->ps.ammo[WP_11] = -1;
// //
// if (!give_all) // if (!give_all)
// //
@ -3513,16 +3513,16 @@ Give an item to any player on the sevrer using ID
// } // }
// if (give_all || Q_stricmp(name, ItemNames[14]) == 0) // if (give_all || Q_stricmp(name, ItemNames[14]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_TRICORDER); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_2);
// target->client->ps.ammo[WP_TRICORDER] = -1; // target->client->ps.ammo[WP_2] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
// } // }
// if (give_all || Q_stricmp(name, ItemNames[15]) == 0) // if (give_all || Q_stricmp(name, ItemNames[15]) == 0)
// { // {
// target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PADD); // target->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_3);
// target->client->ps.ammo[WP_PADD] = -1; // target->client->ps.ammo[WP_3] = -1;
// //
// if (!give_all) // if (!give_all)
// return; // return;
@ -4288,7 +4288,7 @@ void Cmd_ForceKill_f( gentity_t *ent ) {
//RPG-X: Medics revive Support for suiciding //RPG-X: Medics revive Support for suiciding
if(rpg_medicsrevive.integer == 1){ if(rpg_medicsrevive.integer == 1){
ps->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); ps->stats[STAT_WEAPONS] = ( 1 << WP_0 );
ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE; ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
ps->stats[STAT_HEALTH] = target->health = 1; ps->stats[STAT_HEALTH] = target->health = 1;
player_die (target, target, target, 100000, MOD_FORCEDSUICIDE); player_die (target, target, target, 100000, MOD_FORCEDSUICIDE);
@ -4325,7 +4325,7 @@ void Cmd_ForceKill_f( gentity_t *ent ) {
//RPG-X: Medics revive Support for suiciding //RPG-X: Medics revive Support for suiciding
if(rpg_medicsrevive.integer == 1){ if(rpg_medicsrevive.integer == 1){
ps->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); ps->stats[STAT_WEAPONS] = ( 1 << WP_0 );
ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE; ps->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
ps->stats[STAT_HEALTH] = target->health = 1; ps->stats[STAT_HEALTH] = target->health = 1;
player_die (target, target, target, 100000, MOD_FORCEDSUICIDE); player_die (target, target, target, 100000, MOD_FORCEDSUICIDE);
@ -4459,7 +4459,7 @@ for(i = 0; i < level.numConnectedClients; i++)
OtherPlayer->flags &= ~FL_GODMODE; //Bypass godmode (?) OtherPlayer->flags &= ~FL_GODMODE; //Bypass godmode (?)
//RPG-X: Medics revive Support for suiciding //RPG-X: Medics revive Support for suiciding
if(rpg_medicsrevive.integer == 1){ if(rpg_medicsrevive.integer == 1){
oPs->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); oPs->stats[STAT_WEAPONS] = ( 1 << WP_0 );
oPs->stats[STAT_HOLDABLE_ITEM] = HI_NONE; oPs->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
oPs->stats[STAT_HEALTH] = OtherPlayer->health = 1; oPs->stats[STAT_HEALTH] = OtherPlayer->health = 1;
player_die(OtherPlayer,OtherPlayer,OtherPlayer,100000, MOD_FORCEDSUICIDE); player_die(OtherPlayer,OtherPlayer,OtherPlayer,100000, MOD_FORCEDSUICIDE);
@ -4479,7 +4479,7 @@ for(i = 0; i < level.numConnectedClients; i++)
ent->flags &= ~FL_GODMODE; //Bypass godmode (?) ent->flags &= ~FL_GODMODE; //Bypass godmode (?)
//RPG-X: Medics revive Support for suiciding //RPG-X: Medics revive Support for suiciding
if(rpg_medicsrevive.integer == 1){ if(rpg_medicsrevive.integer == 1){
ePs->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); ePs->stats[STAT_WEAPONS] = ( 1 << WP_0 );
ePs->stats[STAT_HOLDABLE_ITEM] = HI_NONE; ePs->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
ePs->stats[STAT_HEALTH] = ent->health = 1; ePs->stats[STAT_HEALTH] = ent->health = 1;
player_die(ent,ent,ent,100000, MOD_FORCEDSUICIDE); player_die(ent,ent,ent,100000, MOD_FORCEDSUICIDE);
@ -8550,15 +8550,15 @@ static void Cmd_remodulate_f(gentity_t *ent) {
switch(i) { switch(i) {
case 1: case 1:
level.borgAdaptHits[WP_PHASER] = 0; level.borgAdaptHits[WP_5] = 0;
trap_SendServerCommand(-1, va("print \"Phasers have been remodulated.\n\"")); trap_SendServerCommand(-1, va("print \"Phasers have been remodulated.\n\""));
break; break;
case 2: case 2:
level.borgAdaptHits[WP_COMPRESSION_RIFLE] = 0; level.borgAdaptHits[WP_6] = 0;
trap_SendServerCommand(-1, va("print \"Compression Rifles have been remodulated.\n\"")); trap_SendServerCommand(-1, va("print \"Compression Rifles have been remodulated.\n\""));
break; break;
case 3: case 3:
level.borgAdaptHits[WP_DISRUPTOR] = 0; level.borgAdaptHits[WP_10] = 0;
trap_SendServerCommand(-1, va("print \"Disruptors have been remodulated.\n\"")); trap_SendServerCommand(-1, va("print \"Disruptors have been remodulated.\n\""));
break; break;
default: default:
@ -9545,7 +9545,7 @@ static void Cmd_spawnTentity_f(gentity_t *ent) {
if(numArgs < 3) { if(numArgs < 3) {
G_FreeEntity(newEnt); G_FreeEntity(newEnt);
trap_SendServerCommand(clientNum, "print \"Insufficent number of arguments for target_give!\n\""); trap_SendServerCommand(clientNum, "print \"Insufficent number of arguments for target_give!\n\"");
trap_SendServerCommand(clientNum, "print \"Usage: spawnTEnt target_give targetname items (example for items: WP_PHASER | WP_TOOLKIT)\n\""); trap_SendServerCommand(clientNum, "print \"Usage: spawnTEnt target_give targetname items (example for items: WP_5 | WP_14)\n\"");
return; return;
} }
trap_Argv(2, arg, sizeof(arg)); trap_Argv(2, arg, sizeof(arg));

View file

@ -133,7 +133,7 @@ void TossClientItems( gentity_t *self, qboolean dis_con ) {
// weapon that isn't the mg or gauntlet. Without this, a client // weapon that isn't the mg or gauntlet. Without this, a client
// can pick up a weapon, be killed, and not drop the weapon because // can pick up a weapon, be killed, and not drop the weapon because
// their weapon change hasn't completed yet and they are still holding the MG. // their weapon change hasn't completed yet and they are still holding the MG.
if ( weapon == WP_MEDKIT || weapon == WP_TOOLKIT || weapon == WP_PHASER || weapon == WP_DERMAL_REGEN || weapon == WP_HYPERSPANNER || weapon == WP_PADD || weapon == WP_TRICORDER || weapon == WP_VOYAGER_HYPO ) if ( weapon == WP_11 || weapon == WP_14 || weapon == WP_5 || weapon == WP_13 || weapon == WP_15 || weapon == WP_3 || weapon == WP_2 || weapon == WP_12 )
{ {
if ( ps->weaponstate == WEAPON_DROPPING ) if ( ps->weaponstate == WEAPON_DROPPING )
{ {
@ -141,11 +141,11 @@ void TossClientItems( gentity_t *self, qboolean dis_con ) {
} }
if ( !( ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) if ( !( ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) )
{ {
weapon = WP_NONE; weapon = WP_0;
} }
} }
if ( weapon > WP_TOOLKIT && weapon > WP_MEDKIT && weapon > WP_PHASER && weapon != WP_DERMAL_REGEN && weapon != WP_HYPERSPANNER && weapon != WP_PADD && weapon != WP_TRICORDER && weapon != WP_VOYAGER_HYPO && ps->ammo[ weapon ] ) if ( weapon > WP_14 && weapon > WP_11 && weapon > WP_5 && weapon != WP_13 && weapon != WP_15 && weapon != WP_3 && weapon != WP_2 && weapon != WP_12 && ps->ammo[ weapon ] )
{ {
// find the item type for this weapon // find the item type for this weapon
item = BG_FindItemForWeapon( weapon ); item = BG_FindItemForWeapon( weapon );
@ -499,9 +499,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
self->takedamage = qfalse; self->takedamage = qfalse;
ps->weapon = WP_NONE; ps->weapon = WP_0;
ps->weaponstate = WEAPON_READY; ps->weaponstate = WEAPON_READY;
//self->s.weapon = WP_NONE; //self->s.weapon = WP_0;
//memset(ps->powerups, 0, sizeof(ps->powerups)); //TiM - BOOKMARK //memset(ps->powerups, 0, sizeof(ps->powerups)); //TiM - BOOKMARK
//self->s.powerups = 0; //self->s.powerups = 0;
self->r.contents = CONTENTS_CORPSE; self->r.contents = CONTENTS_CORPSE;
@ -930,7 +930,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
self->takedamage = qtrue; // can still be gibbed self->takedamage = qtrue; // can still be gibbed
self->s.weapon = WP_NONE; self->s.weapon = WP_0;
self->s.powerups = 0; self->s.powerups = 0;
self->r.contents = CONTENTS_CORPSE; self->r.contents = CONTENTS_CORPSE;
@ -1282,47 +1282,47 @@ qboolean G_CheckBorgAdaptation( gentity_t *targ, int mod )
// Trek weapons // Trek weapons
case MOD_PHASER: case MOD_PHASER:
case MOD_PHASER_ALT: case MOD_PHASER_ALT:
weapon = WP_PHASER; weapon = WP_5;
break; break;
case MOD_CRIFLE: case MOD_CRIFLE:
case MOD_CRIFLE_SPLASH: case MOD_CRIFLE_SPLASH:
case MOD_CRIFLE_ALT: case MOD_CRIFLE_ALT:
case MOD_CRIFLE_ALT_SPLASH: case MOD_CRIFLE_ALT_SPLASH:
weapon = WP_COMPRESSION_RIFLE; weapon = WP_6;
break; break;
case MOD_SCAVENGER: case MOD_SCAVENGER:
case MOD_SCAVENGER_ALT: case MOD_SCAVENGER_ALT:
case MOD_SCAVENGER_ALT_SPLASH: case MOD_SCAVENGER_ALT_SPLASH:
case MOD_SEEKER: case MOD_SEEKER:
weapon = WP_COFFEE; weapon = WP_4;
break; break;
case MOD_STASIS: case MOD_STASIS:
case MOD_STASIS_ALT: case MOD_STASIS_ALT:
weapon = WP_DISRUPTOR; weapon = WP_10;
break; break;
case MOD_GRENADE: case MOD_GRENADE:
case MOD_GRENADE_ALT: case MOD_GRENADE_ALT:
case MOD_GRENADE_SPLASH: case MOD_GRENADE_SPLASH:
case MOD_GRENADE_ALT_SPLASH: case MOD_GRENADE_ALT_SPLASH:
weapon = WP_GRENADE_LAUNCHER; weapon = WP_8;
break; break;
case MOD_TETRION: case MOD_TETRION:
case MOD_TETRION_ALT: case MOD_TETRION_ALT:
weapon = WP_TR116; weapon = WP_7;
break; break;
case MOD_DREADNOUGHT: case MOD_DREADNOUGHT:
case MOD_DREADNOUGHT_ALT: case MOD_DREADNOUGHT_ALT:
weapon = WP_DERMAL_REGEN; weapon = WP_13;
break; break;
case MOD_QUANTUM: case MOD_QUANTUM:
case MOD_QUANTUM_SPLASH: case MOD_QUANTUM_SPLASH:
case MOD_QUANTUM_ALT: case MOD_QUANTUM_ALT:
case MOD_QUANTUM_ALT_SPLASH: case MOD_QUANTUM_ALT_SPLASH:
weapon = WP_QUANTUM_BURST; weapon = WP_9;
break; break;
case MOD_IMOD: case MOD_IMOD:
case MOD_IMOD_ALT: case MOD_IMOD_ALT:
weapon = WP_PADD; weapon = WP_3;
break; break;
case MOD_ASSIMILATE: case MOD_ASSIMILATE:
case MOD_BORG: case MOD_BORG:
@ -1337,28 +1337,28 @@ qboolean G_CheckBorgAdaptation( gentity_t *targ, int mod )
return qtrue; return qtrue;
}*/ }*/
switch(weapon) { switch(weapon) {
case WP_PHASER: case WP_5:
if(level.borgAdaptHits[WP_PHASER] > rpg_adaptPhaserHits.integer) if(level.borgAdaptHits[WP_5] > rpg_adaptPhaserHits.integer)
return qtrue; return qtrue;
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
if(level.borgAdaptHits[WP_COMPRESSION_RIFLE] > rpg_adaptCrifleHits.integer) if(level.borgAdaptHits[WP_6] > rpg_adaptCrifleHits.integer)
return qtrue; return qtrue;
break; break;
case WP_DISRUPTOR: case WP_10:
if(level.borgAdaptHits[WP_DISRUPTOR] > rpg_adaptDisruptorHits.integer) if(level.borgAdaptHits[WP_10] > rpg_adaptDisruptorHits.integer)
return qtrue; return qtrue;
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
if(level.borgAdaptHits[WP_GRENADE_LAUNCHER] > rpg_adaptGrenadeLauncherHits.integer) if(level.borgAdaptHits[WP_8] > rpg_adaptGrenadeLauncherHits.integer)
return qtrue; return qtrue;
break; break;
case WP_TR116: case WP_7:
if(level.borgAdaptHits[WP_TR116] > rpg_adaptTR116Hits.integer) if(level.borgAdaptHits[WP_7] > rpg_adaptTR116Hits.integer)
return qtrue; return qtrue;
break; break;
case WP_QUANTUM_BURST: case WP_9:
if(level.borgAdaptHits[WP_QUANTUM_BURST] > rpg_adaptPhotonHits.integer) if(level.borgAdaptHits[WP_9] > rpg_adaptPhotonHits.integer)
return qtrue; return qtrue;
break; break;
default: default:
@ -1893,7 +1893,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
if(targ->health == 1 ){ //TiM : Added Client to try and fix this stupid crashy bug if(targ->health == 1 ){ //TiM : Added Client to try and fix this stupid crashy bug
//ClientSpawn(targ, 1); //ClientSpawn(targ, 1);
//if ( client ) { //if ( client ) {
client->ps.stats[STAT_WEAPONS] = ( 1 << WP_NONE ); //?!!!!! client->ps.stats[STAT_WEAPONS] = ( 1 << WP_0 ); //?!!!!!
client->ps.stats[STAT_HOLDABLE_ITEM] = HI_NONE; client->ps.stats[STAT_HOLDABLE_ITEM] = HI_NONE;
targ->health = 1; targ->health = 1;
player_die( targ, inflictor, attacker, take, mod ); player_die( targ, inflictor, attacker, take, mod );

View file

@ -435,7 +435,7 @@ int Pickup_Weapon (gentity_t *ent, gentity_t *other) {
// RPG-X: Marcin: print PADD message - 06/12/2008 // RPG-X: Marcin: print PADD message - 06/12/2008
if ( ent->item->giTag == WP_PADD ) { if ( ent->item->giTag == WP_3 ) {
msg = Padd_Get( ent, other ); msg = Padd_Get( ent, other );
if (msg) { if (msg) {
trap_SendServerCommand( other-g_entities, va("print \"" S_COLOR_CYAN "(padd)" S_COLOR_WHITE " %s\n\"", msg) ); trap_SendServerCommand( other-g_entities, va("print \"" S_COLOR_CYAN "(padd)" S_COLOR_WHITE " %s\n\"", msg) );
@ -649,7 +649,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) {
return; return;
} }
if ( ent->item->giTag == WP_PADD ) { if ( ent->item->giTag == WP_3 ) {
Padd_Remove( ent ); Padd_Remove( ent );
} }
@ -750,7 +750,7 @@ gentity_t *LaunchItem( gitem_t *item, gentity_t *who, vec3_t origin, vec3_t velo
// if the item has been droped, and if so, make it pick-up-able // if the item has been droped, and if so, make it pick-up-able
// cdr // cdr
if ( item->giTag == WP_PADD ) { if ( item->giTag == WP_3 ) {
//Q_strncpyz(item->paddMsg, txt, sizeof(item->paddMsg)); //Q_strncpyz(item->paddMsg, txt, sizeof(item->paddMsg));
Padd_Add(dropped, who, txt); Padd_Add(dropped, who, txt);
} }
@ -1111,24 +1111,24 @@ ClearRegisteredItems
void ClearRegisteredItems( void ) { void ClearRegisteredItems( void ) {
memset( itemRegistered, 0, sizeof( itemRegistered ) ); memset( itemRegistered, 0, sizeof( itemRegistered ) );
// players always start with the base weapon // players always start with the base weapon
RegisterItem( BG_FindItemForWeapon( WP_PHASER ) ); RegisterItem( BG_FindItemForWeapon( WP_5 ) );
RegisterItem( BG_FindItemForWeapon( WP_COMPRESSION_RIFLE ) ); //this is for the podium at the end, make sure we have the model RegisterItem( BG_FindItemForWeapon( WP_6 ) ); //this is for the podium at the end, make sure we have the model
RegisterItem( BG_FindItemForWeapon( WP_NULL_HAND ) ); RegisterItem( BG_FindItemForWeapon( WP_1 ) );
// RegisterItem( BG_FindItemForWeapon( WP_COFFEE ) ); // RegisterItem( BG_FindItemForWeapon( WP_4 ) );
RegisterItem( BG_FindItemForWeapon( WP_DISRUPTOR ) ); RegisterItem( BG_FindItemForWeapon( WP_10 ) );
// RegisterItem( BG_FindItemForWeapon( WP_GRENADE_LAUNCHER ) ); // RegisterItem( BG_FindItemForWeapon( WP_8 ) );
// RegisterItem( BG_FindItemForWeapon( WP_TR116 ) ); // RegisterItem( BG_FindItemForWeapon( WP_7 ) );
// RegisterItem( BG_FindItemForWeapon( WP_QUANTUM_BURST ) ); // RegisterItem( BG_FindItemForWeapon( WP_9 ) );
RegisterItem( BG_FindItemForWeapon( WP_DERMAL_REGEN ) ); RegisterItem( BG_FindItemForWeapon( WP_13 ) );
RegisterItem( BG_FindItemForWeapon( WP_VOYAGER_HYPO ) ); RegisterItem( BG_FindItemForWeapon( WP_12 ) );
RegisterItem( BG_FindItemForWeapon( WP_TOOLKIT ) ); RegisterItem( BG_FindItemForWeapon( WP_14 ) );
RegisterItem( BG_FindItemForWeapon( WP_MEDKIT ) ); RegisterItem( BG_FindItemForWeapon( WP_11 ) );
RegisterItem( BG_FindItemForWeapon( WP_TRICORDER ) ); RegisterItem( BG_FindItemForWeapon( WP_2 ) );
RegisterItem( BG_FindItemForWeapon( WP_PADD ) ); RegisterItem( BG_FindItemForWeapon( WP_3 ) );
RegisterItem( BG_FindItemForWeapon( WP_HYPERSPANNER ) ); RegisterItem( BG_FindItemForWeapon( WP_15 ) );
RegisterItem( BG_FindItemForWeapon( WP_TR116 ) ); RegisterItem( BG_FindItemForWeapon( WP_7 ) );
// okay! Now, based on what game mods we have one, we need to register even more stuff by default: // okay! Now, based on what game mods we have one, we need to register even more stuff by default:
if ( g_pModSpecialties.integer ) if ( g_pModSpecialties.integer )
@ -1279,16 +1279,16 @@ gitem_t *G_CheckReplaceItem( gentity_t *ent, gitem_t *item )
{//replace tetryon and scav rifles with I-Mods {//replace tetryon and scav rifles with I-Mods
switch ( item->giTag ) switch ( item->giTag )
{ {
case WP_COFFEE: case WP_4:
case WP_TR116: case WP_7:
switch( item->giType ) switch( item->giType )
{ {
case IT_WEAPON: case IT_WEAPON:
newitem = BG_FindItemForWeapon( WP_NULL_HAND ); newitem = BG_FindItemForWeapon( WP_1 );
ent->classname = "weapon_imod"; ent->classname = "weapon_imod";
break; break;
case IT_AMMO: case IT_AMMO:
newitem = BG_FindItemForAmmo( WP_NULL_HAND ); newitem = BG_FindItemForAmmo( WP_1 );
ent->classname = "ammo_imod"; ent->classname = "ammo_imod";
break; break;
default: default:

View file

@ -121,43 +121,43 @@ int G_WeaponLogItems[MAX_CLIENTS][PW_NUM_POWERUPS];
// MOD-weapon mapping array. // MOD-weapon mapping array.
int weaponFromMOD[MOD_MAX] = int weaponFromMOD[MOD_MAX] =
{ {
WP_NONE, // MOD_UNKNOWN, WP_0, // MOD_UNKNOWN,
WP_NONE, // MOD_WATER, WP_0, // MOD_WATER,
WP_NONE, // MOD_SLIME, WP_0, // MOD_SLIME,
WP_NONE, // MOD_LAVA, WP_0, // MOD_LAVA,
WP_NONE, // MOD_CRUSH, WP_0, // MOD_CRUSH,
WP_NONE, // MOD_TELEFRAG, WP_0, // MOD_TELEFRAG,
WP_NONE, // MOD_FALLING, WP_0, // MOD_FALLING,
WP_NONE, // MOD_SUICIDE, WP_0, // MOD_SUICIDE,
WP_NONE, // MOD_TARGET_LASER, WP_0, // MOD_TARGET_LASER,
WP_NONE, // MOD_TRIGGER_HURT, WP_0, // MOD_TRIGGER_HURT,
WP_PHASER, // MOD_PHASER, WP_5, // MOD_PHASER,
WP_PHASER, // MOD_PHASER_ALT, WP_5, // MOD_PHASER_ALT,
WP_COMPRESSION_RIFLE, // MOD_CRIFLE, WP_6, // MOD_CRIFLE,
WP_COMPRESSION_RIFLE, // MOD_CRIFLE_SPLASH, WP_6, // MOD_CRIFLE_SPLASH,
WP_COMPRESSION_RIFLE, // MOD_CRIFLE_ALT, WP_6, // MOD_CRIFLE_ALT,
WP_COMPRESSION_RIFLE, // MOD_CRIFLE_ALT_SPLASH, WP_6, // MOD_CRIFLE_ALT_SPLASH,
WP_NULL_HAND, // MOD_IMOD, WP_1, // MOD_IMOD,
WP_NULL_HAND, // MOD_IMOD_ALT, WP_1, // MOD_IMOD_ALT,
WP_COFFEE, // MOD_SCAVENGER, WP_4, // MOD_SCAVENGER,
WP_COFFEE, // MOD_SCAVENGER_ALT, WP_4, // MOD_SCAVENGER_ALT,
WP_COFFEE, // MOD_SCAVENGER_ALT_SPLASH, WP_4, // MOD_SCAVENGER_ALT_SPLASH,
WP_DISRUPTOR, // MOD_STASIS, WP_10, // MOD_STASIS,
WP_DISRUPTOR, // MOD_STASIS_ALT, WP_10, // MOD_STASIS_ALT,
WP_GRENADE_LAUNCHER, // MOD_GRENADE, WP_8, // MOD_GRENADE,
WP_GRENADE_LAUNCHER, // MOD_GRENADE_ALT, WP_8, // MOD_GRENADE_ALT,
WP_GRENADE_LAUNCHER, // MOD_GRENADE_SPLASH, WP_8, // MOD_GRENADE_SPLASH,
WP_GRENADE_LAUNCHER, // MOD_GRENADE_ALT_SPLASH, WP_8, // MOD_GRENADE_ALT_SPLASH,
WP_TR116, // MOD_TETRION, WP_7, // MOD_TETRION,
WP_TR116, // MOD_TETRION_ALT, WP_7, // MOD_TETRION_ALT,
WP_DERMAL_REGEN, // MOD_DREADNOUGHT, WP_13, // MOD_DREADNOUGHT,
WP_DERMAL_REGEN, // MOD_DREADNOUGHT_ALT, WP_13, // MOD_DREADNOUGHT_ALT,
WP_QUANTUM_BURST, // MOD_QUANTUM, WP_9, // MOD_QUANTUM,
WP_QUANTUM_BURST, // MOD_QUANTUM_SPLASH, WP_9, // MOD_QUANTUM_SPLASH,
WP_QUANTUM_BURST, // MOD_QUANTUM_ALT, WP_9, // MOD_QUANTUM_ALT,
WP_QUANTUM_BURST, // MOD_QUANTUM_ALT_SPLASH, WP_9, // MOD_QUANTUM_ALT_SPLASH,
// careful!! don't assume that any given map entry refers to a weapon index. see // careful!! don't assume that any given map entry refers to a weapon index. see
//GetFavoriteWeaponForClient() as an example of what can go wrong. //GetFavoriteWeaponForClient() as an example of what can go wrong.
@ -166,15 +166,15 @@ int weaponFromMOD[MOD_MAX] =
PW_FLASHLIGHT, // MOD_SEEKER PW_FLASHLIGHT, // MOD_SEEKER
//expansion pack //expansion pack
WP_VOYAGER_HYPO, // MOD_KNOCKOUT, WP_12, // MOD_KNOCKOUT,
WP_TOOLKIT, // MOD_ASSIMILATE, WP_14, // MOD_ASSIMILATE,
WP_MEDKIT, // MOD_BORG, WP_11, // MOD_BORG,
WP_MEDKIT, // MOD_BORG_ALT WP_11, // MOD_BORG_ALT
WP_NONE, // MOD_RESPAWN, WP_0, // MOD_RESPAWN,
WP_NONE, // MOD_EXPLOSION, WP_0, // MOD_EXPLOSION,
WP_NONE, // MOD_FORCEFIELD WP_0, // MOD_FORCEFIELD
WP_NONE, // MOD_FORCEDSUICIDE WP_0, // MOD_FORCEDSUICIDE
}; };
char *weaponNameFromIndex[WP_NUM_WEAPONS] = char *weaponNameFromIndex[WP_NUM_WEAPONS] =
@ -1170,7 +1170,7 @@ qboolean CalculateTactician(gentity_t *ent, int *kills)
killsWithWeapon[weapon] += G_WeaponLogKills[person][i]; // Store Num Kills With Weapon killsWithWeapon[weapon] += G_WeaponLogKills[person][i]; // Store Num Kills With Weapon
} }
weapon=WP_PHASER; // Start At Phaser weapon=WP_5; // Start At Phaser
// keep looking through weapons if weapon is not on map, or if it is and we used it // keep looking through weapons if weapon is not on map, or if it is and we used it
while( weapon<WP_NUM_WEAPONS && (!wasPickedUpBySomeone[weapon] || killsWithWeapon[weapon]>0) ) while( weapon<WP_NUM_WEAPONS && (!wasPickedUpBySomeone[weapon] || killsWithWeapon[weapon]>0) )
{ {
@ -1746,7 +1746,7 @@ int GetWorstEnemyForClient(int nClient)
int GetFavoriteWeaponForClient(int nClient) int GetFavoriteWeaponForClient(int nClient)
{ {
int i = 0, nMostKills = 0, fav=0, weapon=WP_PHASER; int i = 0, nMostKills = 0, fav=0, weapon=WP_5;
int killsWithWeapon[WP_NUM_WEAPONS]; int killsWithWeapon[WP_NUM_WEAPONS];
@ -1765,7 +1765,7 @@ int GetFavoriteWeaponForClient(int nClient)
// now look through our list of kills per weapon and pick the biggest // now look through our list of kills per weapon and pick the biggest
//---------------------------------------------------------------- //----------------------------------------------------------------
nMostKills=0; nMostKills=0;
for (weapon=WP_PHASER; weapon<WP_NUM_WEAPONS; weapon++) for (weapon=WP_5; weapon<WP_NUM_WEAPONS; weapon++)
{ {
if (killsWithWeapon[weapon]>nMostKills) if (killsWithWeapon[weapon]>nMostKills)
{ {

View file

@ -750,24 +750,24 @@ void QDECL G_Error( const char *fmt, ... ) {
stringID_table_t WeaponTable[] = { stringID_table_t WeaponTable[] = {
{ ENUM2STRING(WP_TRICORDER) }, { ENUM2STRING(WP_2) },
{ ENUM2STRING(WP_PADD) }, { ENUM2STRING(WP_3) },
{ ENUM2STRING(WP_COFFEE) }, { ENUM2STRING(WP_4) },
{ ENUM2STRING(WP_PHASER) }, { ENUM2STRING(WP_5) },
{ ENUM2STRING(WP_COMPRESSION_RIFLE) }, { ENUM2STRING(WP_6) },
{ ENUM2STRING(WP_TR116) }, { ENUM2STRING(WP_7) },
{ ENUM2STRING(WP_GRENADE_LAUNCHER) }, { ENUM2STRING(WP_8) },
{ ENUM2STRING(WP_QUANTUM_BURST) }, { ENUM2STRING(WP_9) },
{ ENUM2STRING(WP_DISRUPTOR) }, { ENUM2STRING(WP_10) },
{ ENUM2STRING(WP_MEDKIT) }, { ENUM2STRING(WP_11) },
{ ENUM2STRING(WP_VOYAGER_HYPO) }, { ENUM2STRING(WP_12) },
{ ENUM2STRING(WP_DERMAL_REGEN) }, { ENUM2STRING(WP_13) },
{ ENUM2STRING(WP_TOOLKIT) }, { ENUM2STRING(WP_14) },
{ ENUM2STRING(WP_HYPERSPANNER) }, { ENUM2STRING(WP_15) },
{ NULL, -1 } { NULL, -1 }
}; };
@ -2653,11 +2653,11 @@ void G_InitModRules( void )
if ( g_pModDisintegration.integer != 0 ) if ( g_pModDisintegration.integer != 0 )
{//don't use up ammo in disintegration mode {//don't use up ammo in disintegration mode
altAmmoUsage[WP_COMPRESSION_RIFLE] = 0; altAmmoUsage[WP_6] = 0;
} }
if ( g_pModSpecialties.integer != 0 ) if ( g_pModSpecialties.integer != 0 )
{//tripwires use more ammo {//tripwires use more ammo
altAmmoUsage[WP_GRENADE_LAUNCHER] = 3; altAmmoUsage[WP_8] = 3;
} }
if ( g_pModAssimilation.integer != 0 ) if ( g_pModAssimilation.integer != 0 )
{ {

View file

@ -473,19 +473,19 @@ void Use_Shooter( gentity_t *ent, gentity_t *other, gentity_t *activator ) {
VectorNormalize( dir ); VectorNormalize( dir );
switch ( ent->s.weapon ) { switch ( ent->s.weapon ) {
case WP_GRENADE_LAUNCHER: case WP_8:
fire_grenade( ent, ent->s.origin, dir ); fire_grenade( ent, ent->s.origin, dir );
break; break;
case WP_DISRUPTOR: case WP_10:
fire_rocket( ent, ent->s.origin, dir ); fire_rocket( ent, ent->s.origin, dir );
break; break;
case WP_COFFEE: case WP_4:
fire_plasma( ent, ent->s.origin, dir ); fire_plasma( ent, ent->s.origin, dir );
break; break;
case WP_QUANTUM_BURST: case WP_9:
fire_quantum( ent, ent->s.origin, dir ); fire_quantum( ent, ent->s.origin, dir );
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
fire_comprifle( ent, ent->s.origin, dir ); fire_comprifle( ent, ent->s.origin, dir );
break; break;
} }
@ -526,7 +526,7 @@ Fires at either the target or the current direction.
"random" the number of degrees of deviance from the taget. (1.0 default) "random" the number of degrees of deviance from the taget. (1.0 default)
*/ */
void SP_shooter_rocket( gentity_t *ent ) { void SP_shooter_rocket( gentity_t *ent ) {
InitShooter( ent, WP_DISRUPTOR ); InitShooter( ent, WP_10 );
} }
/*QUAKED shooter_plasma (1 0 0) (-16 -16 -16) (16 16 16) /*QUAKED shooter_plasma (1 0 0) (-16 -16 -16) (16 16 16)
@ -534,7 +534,7 @@ Fires at either the target or the current direction.
"random" is the number of degrees of deviance from the taget. (1.0 default) "random" is the number of degrees of deviance from the taget. (1.0 default)
*/ */
void SP_shooter_plasma( gentity_t *ent ) { void SP_shooter_plasma( gentity_t *ent ) {
InitShooter( ent, WP_COMPRESSION_RIFLE ); //TiM : WP_COFFEE InitShooter( ent, WP_6 ); //TiM : WP_4
} }
/*QUAKED shooter_grenade (1 0 0) (-16 -16 -16) (16 16 16) /*QUAKED shooter_grenade (1 0 0) (-16 -16 -16) (16 16 16)
@ -542,7 +542,7 @@ Fires at either the target or the current direction.
"random" is the number of degrees of deviance from the taget. (1.0 default) "random" is the number of degrees of deviance from the taget. (1.0 default)
*/ */
void SP_shooter_grenade( gentity_t *ent ) { void SP_shooter_grenade( gentity_t *ent ) {
InitShooter( ent, WP_GRENADE_LAUNCHER); InitShooter( ent, WP_8);
} }
/*QUAKED shooter_torpedo (1 0 0) (-16 -16 -16) (16 16 16) /*QUAKED shooter_torpedo (1 0 0) (-16 -16 -16) (16 16 16)
@ -550,5 +550,5 @@ Fires at either the target or the current direction.
"random" is the number of degrees of deviance from the taget. (1.0 default) "random" is the number of degrees of deviance from the taget. (1.0 default)
*/ */
void SP_shooter_torpedo( gentity_t *ent ) { void SP_shooter_torpedo( gentity_t *ent ) {
InitShooter( ent, WP_QUANTUM_BURST ); InitShooter( ent, WP_9 );
} }

View file

@ -489,7 +489,7 @@ gentity_t *fire_plasma (gentity_t *self, vec3_t start, vec3_t dir) {
bolt->think = G_ExplodeMissile; bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_COFFEE; bolt->s.weapon = WP_4;
bolt->r.ownerNum = self->s.number; bolt->r.ownerNum = self->s.number;
bolt->parent = self; bolt->parent = self;
bolt->damage = 20; bolt->damage = 20;
@ -522,7 +522,7 @@ gentity_t *fire_comprifle(gentity_t *self, vec3_t start, vec3_t dir) {
bolt->think = G_ExplodeMissile; bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_COMPRESSION_RIFLE; bolt->s.weapon = WP_6;
bolt->r.ownerNum = self->s.number; bolt->r.ownerNum = self->s.number;
bolt->parent = self; bolt->parent = self;
bolt->damage = 20; bolt->damage = 20;
@ -541,7 +541,7 @@ gentity_t *fire_comprifle(gentity_t *self, vec3_t start, vec3_t dir) {
VectorCopy (start, bolt->r.currentOrigin); VectorCopy (start, bolt->r.currentOrigin);
G_AddEvent(self, EV_SHOOTER_SOUND, WP_COMPRESSION_RIFLE); G_AddEvent(self, EV_SHOOTER_SOUND, WP_6);
return bolt; return bolt;
} }
@ -566,7 +566,7 @@ gentity_t *fire_quantum (gentity_t *self, vec3_t start, vec3_t dir) {
bolt->think = G_ExplodeMissile; bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_QUANTUM_BURST; bolt->s.weapon = WP_9;
bolt->r.ownerNum = self->s.number; bolt->r.ownerNum = self->s.number;
bolt->parent = self; bolt->parent = self;
bolt->damage = 20; bolt->damage = 20;
@ -585,7 +585,7 @@ gentity_t *fire_quantum (gentity_t *self, vec3_t start, vec3_t dir) {
VectorCopy (start, bolt->r.currentOrigin); VectorCopy (start, bolt->r.currentOrigin);
G_AddEvent(self, EV_SHOOTER_SOUND, WP_QUANTUM_BURST); G_AddEvent(self, EV_SHOOTER_SOUND, WP_9);
return bolt; return bolt;
} }
@ -608,7 +608,7 @@ gentity_t *fire_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
bolt->think = G_ExplodeMissile; bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_GRENADE_LAUNCHER; bolt->s.weapon = WP_8;
bolt->s.eFlags = EF_BOUNCE_HALF; bolt->s.eFlags = EF_BOUNCE_HALF;
bolt->r.ownerNum = self->s.number; bolt->r.ownerNum = self->s.number;
bolt->parent = self; bolt->parent = self;
@ -628,7 +628,7 @@ gentity_t *fire_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
VectorCopy (start, bolt->r.currentOrigin); VectorCopy (start, bolt->r.currentOrigin);
G_AddEvent(self, EV_SHOOTER_SOUND, WP_GRENADE_LAUNCHER); G_AddEvent(self, EV_SHOOTER_SOUND, WP_8);
return bolt; return bolt;
} }
@ -653,7 +653,7 @@ gentity_t *fire_rocket (gentity_t *self, vec3_t start, vec3_t dir) {
bolt->think = G_ExplodeMissile; bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_DISRUPTOR; bolt->s.weapon = WP_10;
bolt->r.ownerNum = self->s.number; bolt->r.ownerNum = self->s.number;
bolt->parent = self; bolt->parent = self;
bolt->damage = 100; bolt->damage = 100;
@ -671,7 +671,7 @@ gentity_t *fire_rocket (gentity_t *self, vec3_t start, vec3_t dir) {
SnapVector( bolt->s.pos.trDelta ); // save net bandwidth SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
VectorCopy (start, bolt->r.currentOrigin); VectorCopy (start, bolt->r.currentOrigin);
G_AddEvent(self, EV_SHOOTER_SOUND, WP_DISRUPTOR); G_AddEvent(self, EV_SHOOTER_SOUND, WP_10);
return bolt; return bolt;
} }

View file

@ -9,7 +9,7 @@
Gives all the weapons specified here in the list. Gives all the weapons specified here in the list.
"items" - separated by ' | ', specify the items "items" - separated by ' | ', specify the items
EG "WP_PHASER | WP_TOOLKIT" etc EG "WP_5 | WP_14" etc
(Don't forget the spaces!) (Don't forget the spaces!)
*/ */
void Use_Target_Give( gentity_t *ent, gentity_t *other, gentity_t *activator ) { void Use_Target_Give( gentity_t *ent, gentity_t *other, gentity_t *activator ) {

View file

@ -64,7 +64,7 @@ void turret_die ( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, in
te = G_TempEntity( self->r.currentOrigin, EV_MISSILE_MISS ); te = G_TempEntity( self->r.currentOrigin, EV_MISSILE_MISS );
VectorSet( dir, 0, 0, 1 ); VectorSet( dir, 0, 0, 1 );
te->s.eventParm = DirToByte( dir ); te->s.eventParm = DirToByte( dir );
te->s.weapon = WP_GRENADE_LAUNCHER; te->s.weapon = WP_8;
//G_Sound(activator, G_SoundIndex("sound/weapons/explosions/explode11.wav")); //G_Sound(activator, G_SoundIndex("sound/weapons/explosions/explode11.wav"));
} }
@ -91,7 +91,7 @@ void turret_fire ( gentity_t *ent, vec3_t start, vec3_t dir )
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_DISRUPTOR; bolt->s.weapon = WP_10;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
bolt->damage = ent->damage; bolt->damage = ent->damage;
@ -131,7 +131,7 @@ void fturret_fire ( gentity_t *ent, vec3_t start, vec3_t dir )
bolt->nextthink = level.time + 10000; bolt->nextthink = level.time + 10000;
bolt->think = G_FreeEntity; bolt->think = G_FreeEntity;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->s.weapon = WP_COFFEE; bolt->s.weapon = WP_4;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->damage = ent->damage; bolt->damage = ent->damage;
bolt->methodOfDeath = MOD_SCAVENGER; // ? bolt->methodOfDeath = MOD_SCAVENGER; // ?
@ -789,17 +789,17 @@ void SP_misc_turret (gentity_t *base)
if ( atoi( base->team ) == TEAM_BLUE ) if ( atoi( base->team ) == TEAM_BLUE )
{ {
//temp gfx and sounds //temp gfx and sounds
RegisterItem( BG_FindItemForWeapon( WP_DISRUPTOR ) ); //precache the weapon RegisterItem( BG_FindItemForWeapon( WP_10 ) ); //precache the weapon
} }
else else
{ {
//temp gfx and sounds //temp gfx and sounds
RegisterItem( BG_FindItemForWeapon( WP_COFFEE ) ); //precache the weapon RegisterItem( BG_FindItemForWeapon( WP_4 ) ); //precache the weapon
} }
} }
else else
{ {
RegisterItem( BG_FindItemForWeapon( WP_COFFEE ) ); //precache the weapon RegisterItem( BG_FindItemForWeapon( WP_4 ) ); //precache the weapon
} }
} }

View file

@ -172,7 +172,7 @@ void WP_FirePhaser( gentity_t *ent, qboolean alt_fire )
trEnts[0] = tr.entityNum; trEnts[0] = tr.entityNum;
trEntFraction[0] = tr.fraction; trEntFraction[0] = tr.fraction;
} }
if ( alt_fire && ent->client->ps.ammo[WP_PHASER]) if ( alt_fire && ent->client->ps.ammo[WP_5])
{ // Use the ending point of the thin trace to do two more traces, one on either side, for actual damaging effect. { // Use the ending point of the thin trace to do two more traces, one on either side, for actual damaging effect.
vec3_t vUp = {0,0,1}, vRight, start2, end2; vec3_t vUp = {0,0,1}, vRight, start2, end2;
float halfBeamWidth = PHASER_ALT_RADIUS; float halfBeamWidth = PHASER_ALT_RADIUS;
@ -223,14 +223,14 @@ void WP_FirePhaser( gentity_t *ent, qboolean alt_fire )
damage -= (int)(trEntFraction[i]*5.0); damage -= (int)(trEntFraction[i]*5.0);
} }
if (!ent->client->ps.ammo[WP_PHASER]) if (!ent->client->ps.ammo[WP_5])
{ {
damage *= .35; // weak out-of-ammo phaser damage *= .35; // weak out-of-ammo phaser
} }
if (damage > 0) if (damage > 0)
{ {
if ( alt_fire /*|| ent->client->ps.ammo[WP_PHASER]*/) //RPG-X: RedTechie - Im stupid i dident see this this is why it kept doing alt fire if ( alt_fire /*|| ent->client->ps.ammo[WP_5]*/) //RPG-X: RedTechie - Im stupid i dident see this this is why it kept doing alt fire
{ {
G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage,
DAMAGE_NO_KNOCKBACK | DAMAGE_NOT_ARMOR_PIERCING, MOD_PHASER_ALT ); DAMAGE_NO_KNOCKBACK | DAMAGE_NOT_ARMOR_PIERCING, MOD_PHASER_ALT );
@ -271,7 +271,7 @@ void FirePrifleBullet( gentity_t *ent, vec3_t start, vec3_t dir )
bolt->think = G_FreeEntity; bolt->think = G_FreeEntity;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_COMPRESSION_RIFLE; bolt->s.weapon = WP_6;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
@ -330,7 +330,7 @@ void WP_FireCompressionRifle ( gentity_t *ent, qboolean alt_fire )
VectorMA( temp_org, offset, up, temp_org ); VectorMA( temp_org, offset, up, temp_org );
FirePrifleBullet( ent, temp_org, dir ); //temp_org FirePrifleBullet( ent, temp_org, dir ); //temp_org
G_LogWeaponFire(ent->s.number, WP_COMPRESSION_RIFLE); G_LogWeaponFire(ent->s.number, WP_6);
} }
else else
{ {
@ -553,8 +553,8 @@ void IMODHit(qboolean alt_fire, gentity_t *traceEnt, gentity_t *ent, vec3_t d_di
tent->s.weapon = ent->s.weapon; tent->s.weapon = ent->s.weapon;
} }
G_LogWeaponFire(ent->s.number, WP_NULL_HAND); G_LogWeaponFire(ent->s.number, WP_1);
//G_LogWeaponFire(ent->s.number, WP_NULL_HAND); //G_LogWeaponFire(ent->s.number, WP_1);
}*/ }*/
/* /*
@ -585,8 +585,8 @@ void FireScavengerBullet( gentity_t *ent, vec3_t start, vec3_t dir )
bolt->think = G_FreeEntity; bolt->think = G_FreeEntity;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
//bolt->s.weapon = WP_COFFEE; //bolt->s.weapon = WP_4;
bolt->s.weapon = WP_DISRUPTOR; //TiM bolt->s.weapon = WP_10; //TiM
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
@ -629,7 +629,7 @@ void FireScavengerBullet( gentity_t *ent, vec3_t start, vec3_t dir )
grenade->nextthink = level.time + 9000; grenade->nextthink = level.time + 9000;
grenade->think = G_FreeEntity; grenade->think = G_FreeEntity;
grenade->s.eType = ET_ALT_MISSILE; grenade->s.eType = ET_ALT_MISSILE;
grenade->s.weapon = WP_COFFEE; grenade->s.weapon = WP_4;
grenade->r.ownerNum = ent->s.number; grenade->r.ownerNum = ent->s.number;
grenade->parent = ent; grenade->parent = ent;
grenade->damage = SCAV_ALT_DAMAGE*DMG_VAR*s_quadFactor; grenade->damage = SCAV_ALT_DAMAGE*DMG_VAR*s_quadFactor;
@ -695,7 +695,7 @@ void FireScavengerBullet( gentity_t *ent, vec3_t start, vec3_t dir )
FireScavengerBullet( ent, temp_org, dir ); FireScavengerBullet( ent, temp_org, dir );
} }
G_LogWeaponFire(ent->s.number, WP_COFFEE); G_LogWeaponFire(ent->s.number, WP_4);
}*/ }*/
/* /*
@ -734,7 +734,7 @@ void FireDisruptorMissile( gentity_t *ent, vec3_t origin, vec3_t dir, int size )
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_DISRUPTOR; bolt->s.weapon = WP_10;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
if ( rpg_stasisdmg.integer != 0 ) if ( rpg_stasisdmg.integer != 0 )
@ -962,7 +962,7 @@ void WP_FireDisruptor( gentity_t *ent, qboolean alt_fire )
WP_FireDisruptorMain( ent ); WP_FireDisruptorMain( ent );
} }
G_LogWeaponFire(ent->s.number, WP_DISRUPTOR); G_LogWeaponFire(ent->s.number, WP_10);
} }
/* /*
@ -1202,7 +1202,7 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
//RPG-X: RedTechie - Moved here to stop entities from being sucked up //RPG-X: RedTechie - Moved here to stop entities from being sucked up
grenade->r.svFlags = SVF_USE_CURRENT_ORIGIN; grenade->r.svFlags = SVF_USE_CURRENT_ORIGIN;
grenade->s.weapon = WP_GRENADE_LAUNCHER; grenade->s.weapon = WP_8;
grenade->r.ownerNum = ent->s.number; grenade->r.ownerNum = ent->s.number;
grenade->parent = ent; grenade->parent = ent;
@ -1362,7 +1362,7 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
//RPG-X: RedTechie - Moved here to stop entities from being sucked up //RPG-X: RedTechie - Moved here to stop entities from being sucked up
grenade->r.svFlags = SVF_USE_CURRENT_ORIGIN; grenade->r.svFlags = SVF_USE_CURRENT_ORIGIN;
grenade->s.weapon = WP_GRENADE_LAUNCHER; grenade->s.weapon = WP_8;
grenade->r.ownerNum = ent->s.number; grenade->r.ownerNum = ent->s.number;
grenade->parent = ent; grenade->parent = ent;
@ -1382,7 +1382,7 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
} }
} }
G_LogWeaponFire(ent->s.number, WP_GRENADE_LAUNCHER); G_LogWeaponFire(ent->s.number, WP_8);
}else{ }else{
G_LogPrintf("RPG-X WARNING: Max entities about to be hit! Restart the server ASAP or suffer a server crash!\n"); G_LogPrintf("RPG-X WARNING: Max entities about to be hit! Restart the server ASAP or suffer a server crash!\n");
trap_SendServerCommand( -1, va("print \"^1RPG-X WARNING: Max entities about to be hit! Restart the server ASAP or suffer a server crash!\n\"")); trap_SendServerCommand( -1, va("print \"^1RPG-X WARNING: Max entities about to be hit! Restart the server ASAP or suffer a server crash!\n\""));
@ -1534,7 +1534,7 @@ void FireTetrionProjectile( gentity_t *ent, vec3_t start, vec3_t dir )
VectorSet(bolt->r.mins, -TETRION_ALT_SIZE, -TETRION_ALT_SIZE, -TETRION_ALT_SIZE); VectorSet(bolt->r.mins, -TETRION_ALT_SIZE, -TETRION_ALT_SIZE, -TETRION_ALT_SIZE);
VectorSet(bolt->r.maxs, TETRION_ALT_SIZE, TETRION_ALT_SIZE, TETRION_ALT_SIZE); VectorSet(bolt->r.maxs, TETRION_ALT_SIZE, TETRION_ALT_SIZE, TETRION_ALT_SIZE);
bolt->s.weapon = WP_TR116; bolt->s.weapon = WP_7;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
bolt->damage = 300; //RPG-X: RedTechie - Use to be TETRION_ALT_DAMAGE*DMG_VAR*s_quadFactor; bolt->damage = 300; //RPG-X: RedTechie - Use to be TETRION_ALT_DAMAGE*DMG_VAR*s_quadFactor;
@ -1643,7 +1643,7 @@ void WP_FireTetrionDisruptor( gentity_t *ent, qboolean alt_fire )
//FireTetrionProjectile( ent, start, dir ); //FireTetrionProjectile( ent, start, dir );
} }
G_LogWeaponFire(ent->s.number, WP_TR116); G_LogWeaponFire(ent->s.number, WP_7);
//ent->last_tr116_fire = level.time; //RPG-X: J2J update last fire time //ent->last_tr116_fire = level.time; //RPG-X: J2J update last fire time
} }
@ -1676,7 +1676,7 @@ void FireQuantumBurst( gentity_t *ent, vec3_t start, vec3_t dir )
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_QUANTUM_BURST; bolt->s.weapon = WP_9;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
@ -1851,7 +1851,7 @@ void FireQuantumBurstAlt( gentity_t *ent, vec3_t start, vec3_t dir )
bolt->s.eType = ET_ALT_MISSILE; bolt->s.eType = ET_ALT_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_QUANTUM_BURST; bolt->s.weapon = WP_9;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
bolt->s.eFlags |= EF_ALT_FIRING; bolt->s.eFlags |= EF_ALT_FIRING;
@ -1897,7 +1897,7 @@ void WP_FireQuantumBurst( gentity_t *ent, qboolean alt_fire )
FireQuantumBurst( ent, start, dir ); FireQuantumBurst( ent, start, dir );
} }
G_LogWeaponFire(ent->s.number, WP_QUANTUM_BURST); G_LogWeaponFire(ent->s.number, WP_9);
} }
@ -2242,7 +2242,7 @@ void WP_FireDreadnoughtBurst( gentity_t *ent )
bolt->s.eType = ET_ALT_MISSILE; bolt->s.eType = ET_ALT_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_DERMAL_REGEN; bolt->s.weapon = WP_13;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
bolt->damage = DREADNOUGHT_ALTDAMAGE*DMG_VAR*s_quadFactor; bolt->damage = DREADNOUGHT_ALTDAMAGE*DMG_VAR*s_quadFactor;
@ -2282,7 +2282,7 @@ void WP_FireDreadnought( gentity_t *ent, qboolean alt_fire )
WP_FireDreadnoughtBeam( ent ); WP_FireDreadnoughtBeam( ent );
} }
G_LogWeaponFire(ent->s.number, WP_DERMAL_REGEN); G_LogWeaponFire(ent->s.number, WP_13);
} }
@ -2341,7 +2341,7 @@ void WP_FireBorgProjectile( gentity_t *ent, vec3_t start )
bolt->think = G_FreeEntity; bolt->think = G_FreeEntity;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_MEDKIT; bolt->s.weapon = WP_11;
bolt->r.ownerNum = ent->s.number; bolt->r.ownerNum = ent->s.number;
bolt->parent = ent; bolt->parent = ent;
@ -2376,7 +2376,7 @@ void WP_FireBorgWeapon( gentity_t *ent, qboolean alt_fire )
WP_FireBorgProjectile( ent, muzzle ); WP_FireBorgProjectile( ent, muzzle );
} }
G_LogWeaponFire( ent->s.number, WP_MEDKIT ); G_LogWeaponFire( ent->s.number, WP_11 );
} }
@ -2466,66 +2466,66 @@ set muzzle location relative to pivoting eye
// Muzzle point table... // Muzzle point table...
vec3_t WP_MuzzlePoint[WP_NUM_WEAPONS] = vec3_t WP_MuzzlePoint[WP_NUM_WEAPONS] =
{// Fwd, right, up. {// Fwd, right, up.
{0, 0, 0 }, // WP_NONE, {0, 0, 0 }, // WP_0,
{29, 2, -4 }, // WP_PHASER, {29, 2, -4 }, // WP_5,
{25, 7, -10 }, // WP_COMPRESSION_RIFLE, {25, 7, -10 }, // WP_6,
{25, 4, -5 }, // WP_NULL_HAND, {25, 4, -5 }, // WP_1,
{10, 14, -8 }, // WP_COFFEE, {10, 14, -8 }, // WP_4,
{25, 5, -8 }, // WP_DISRUPTOR, {25, 5, -8 }, // WP_10,
{25, 5, -10 }, // WP_GRENADE_LAUNCHER, {25, 5, -10 }, // WP_8,
{0, 0, 0 }, // WP_TR116, //{22, 4.5, -8 }, //TiM : Visual FX aren't necessary now, so just screw it {0, 0, 0 }, // WP_7, //{22, 4.5, -8 }, //TiM : Visual FX aren't necessary now, so just screw it
{5, 6, -6 }, // WP_QUANTUM_BURST, {5, 6, -6 }, // WP_9,
{29, 2, -4 }, // WP_DERMAL_REGEN, {29, 2, -4 }, // WP_13,
{29, 2, -4 }, // WP_VOYAGER_HYPO, {29, 2, -4 }, // WP_12,
{29, 2, -4 }, // WP_TOOLKIT {29, 2, -4 }, // WP_14
{27, 8, -10 }, // WP_MEDKIT {27, 8, -10 }, // WP_11
{29, 2, -4 }, // WP_TRICORDER, {29, 2, -4 }, // WP_2,
{29, 2, -4 }, // WP_PADD, {29, 2, -4 }, // WP_3,
{29, 2, -4 }, // WP_NEUTRINO_PROBE, {29, 2, -4 }, // WP_NEUTRINO_PROBE,
// {25, 7, -10 }, // WP_TR116 // {25, 7, -10 }, // WP_7
}; };
float WP_ShotSize[WP_NUM_WEAPONS] = float WP_ShotSize[WP_NUM_WEAPONS] =
{ {
0, // WP_NONE, 0, // WP_0,
0, // WP_PHASER, 0, // WP_5,
0, // WP_COMPRESSION_RIFLE, 0, // WP_6,
0, // WP_NULL_HAND, 0, // WP_1,
SCAV_SIZE, // WP_COFFEE, SCAV_SIZE, // WP_4,
STASIS_MAIN_MISSILE_BIG*3, // WP_DISRUPTOR, STASIS_MAIN_MISSILE_BIG*3, // WP_10,
GRENADE_SIZE, // WP_GRENADE_LAUNCHER, GRENADE_SIZE, // WP_8,
6, // WP_TR116, 6, // WP_7,
QUANTUM_SIZE, // WP_QUANTUM_BURST, QUANTUM_SIZE, // WP_9,
0, // WP_DERMAL_REGEN, 0, // WP_13,
0, // WP_VOYAGER_HYPO, 0, // WP_12,
0, // WP_TOOLKIT 0, // WP_14
0, // WP_MEDKIT 0, // WP_11
0, // WP_TRICORDER, 0, // WP_2,
0, // WP_PADD, 0, // WP_3,
0, // WP_NEUTRINO_PROBE, 0, // WP_NEUTRINO_PROBE,
// 0, // WP_TR116 // 0, // WP_7
}; };
float WP_ShotAltSize[WP_NUM_WEAPONS] = float WP_ShotAltSize[WP_NUM_WEAPONS] =
{ {
0, // WP_NONE, 0, // WP_0,
PHASER_ALT_RADIUS, // WP_PHASER, PHASER_ALT_RADIUS, // WP_5,
0, // WP_COMPRESSION_RIFLE, 0, // WP_6,
0, // WP_NULL_HAND, 0, // WP_1,
SCAV_ALT_SIZE, // WP_COFFEE, SCAV_ALT_SIZE, // WP_4,
STASIS_MAIN_MISSILE_BIG*3, // WP_DISRUPTOR, STASIS_MAIN_MISSILE_BIG*3, // WP_10,
GRENADE_SIZE, // WP_GRENADE_LAUNCHER, GRENADE_SIZE, // WP_8,
TETRION_ALT_SIZE, // WP_TR116, TETRION_ALT_SIZE, // WP_7,
QUANTUM_SIZE, // WP_QUANTUM_BURST, QUANTUM_SIZE, // WP_9,
0, // WP_DERMAL_REGEN, 0, // WP_13,
0, // WP_VOYAGER_HYPO, 0, // WP_12,
0, // WP_TOOLKIT 0, // WP_14
0, // WP_MEDKIT 0, // WP_11
0, // WP_TRICORDER 0, // WP_2
0, // WP_PADD, 0, // WP_3,
0, // WP_NEUTRINO_PROBE, 0, // WP_NEUTRINO_PROBE,
// 0, // WP_TR116 // 0, // WP_7
}; };
@ -2540,7 +2540,7 @@ void CalcMuzzlePoint ( gentity_t *ent, vec3_t fwd, vec3_t rt, vec3_t vup, vec3_t
VectorCopy( ent->s.pos.trBase, muzzlePoint ); VectorCopy( ent->s.pos.trBase, muzzlePoint );
#if 1 #if 1
if (weapontype > WP_NONE && weapontype < WP_NUM_WEAPONS) if (weapontype > WP_0 && weapontype < WP_NUM_WEAPONS)
{ // Use the table to generate the muzzlepoint; { // Use the table to generate the muzzlepoint;
{ // Crouching. Use the add-to-Z method to adjust vertically. { // Crouching. Use the add-to-Z method to adjust vertically.
VectorMA(muzzlePoint, WP_MuzzlePoint[weapontype][0], fwd, muzzlePoint); VectorMA(muzzlePoint, WP_MuzzlePoint[weapontype][0], fwd, muzzlePoint);
@ -2714,7 +2714,7 @@ void WP_SprayVoyagerHypo( gentity_t *ent, qboolean alt_fire )
trap_Trace ( &tr, muzzle, mins, maxs, end, ent->s.number, MASK_OPAQUE|CONTENTS_BODY|CONTENTS_ITEM|CONTENTS_CORPSE );//MASK_SHOT trap_Trace ( &tr, muzzle, mins, maxs, end, ent->s.number, MASK_OPAQUE|CONTENTS_BODY|CONTENTS_ITEM|CONTENTS_CORPSE );//MASK_SHOT
if(rpg_effectsgun.integer == 1 && IsAdmin(ent) && alt_fire == qtrue && ent->s.weapon == WP_VOYAGER_HYPO){ if(rpg_effectsgun.integer == 1 && IsAdmin(ent) && alt_fire == qtrue && ent->s.weapon == WP_12){
if(RPGEntityCount != ENTITYNUM_MAX_NORMAL-20){ if(RPGEntityCount != ENTITYNUM_MAX_NORMAL-20){
//if ( tr.entityNum >= ENTITYNUM_WORLD ) TiM - Meh. NOTHING stops t3h l33tzor spray //if ( tr.entityNum >= ENTITYNUM_WORLD ) TiM - Meh. NOTHING stops t3h l33tzor spray
//{ //{
@ -2753,7 +2753,7 @@ void WP_SprayVoyagerHypo( gentity_t *ent, qboolean alt_fire )
tr_entPs->torsoTimer = 0; tr_entPs->torsoTimer = 0;
tr_entPs->legsTimer = 0; tr_entPs->legsTimer = 0;
//tr_entPs->stats[STAT_WEAPONS] = ( 1 << WP_NONE ); //tr_entPs->stats[STAT_WEAPONS] = ( 1 << WP_0 );
//tr_entPs->stats[STAT_HOLDABLE_ITEM] = HI_NONE; //tr_entPs->stats[STAT_HOLDABLE_ITEM] = HI_NONE;
} }
//RPG-X: RedTechie - Regular functions still work //RPG-X: RedTechie - Regular functions still work
@ -2773,7 +2773,7 @@ void WP_SprayVoyagerHypo( gentity_t *ent, qboolean alt_fire )
{ {
tr_ent->health = 0; tr_ent->health = 0;
player_die( tr_ent, ent, ent, 100, MOD_KNOCKOUT ); player_die( tr_ent, ent, ent, 100, MOD_KNOCKOUT );
G_LogWeaponFire( ent->s.number, WP_VOYAGER_HYPO ); G_LogWeaponFire( ent->s.number, WP_12 );
} }
else if ( OnSameTeam(tr_ent, ent) ) else if ( OnSameTeam(tr_ent, ent) )
{ {
@ -2899,8 +2899,8 @@ void FireWeapon( gentity_t *ent, qboolean alt_fire )
qboolean bFastWeapon = qfalse; qboolean bFastWeapon = qfalse;
weapon_t fastWeapons[NUM_FAST_WEAPONS] = weapon_t fastWeapons[NUM_FAST_WEAPONS] =
{ {
WP_PHASER, WP_5,
//WP_TR116 //WP_7
}; };
/*if (ent->client->ps.powerups[PW_QUAD] ) { /*if (ent->client->ps.powerups[PW_QUAD] ) {
@ -2951,59 +2951,59 @@ void FireWeapon( gentity_t *ent, qboolean alt_fire )
{ {
// Player weapons // Player weapons
//----------------- //-----------------
case WP_PHASER: case WP_5:
WP_FirePhaser( ent, alt_fire ); WP_FirePhaser( ent, alt_fire );
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
WP_FireCompressionRifle( ent, alt_fire ); WP_FireCompressionRifle( ent, alt_fire );
break; break;
case WP_NULL_HAND: case WP_1:
//WP_FireIMOD(ent, alt_fire); //WP_FireIMOD(ent, alt_fire);
//G_Printf( "BANG!\n" ); //G_Printf( "BANG!\n" );
if ( IsAdmin( ent ) && alt_fire ) if ( IsAdmin( ent ) && alt_fire )
WP_FireGrenade( ent, qfalse ); WP_FireGrenade( ent, qfalse );
break; break;
case WP_COFFEE: case WP_4:
//WP_FireScavenger( ent, alt_fire ); //WP_FireScavenger( ent, alt_fire );
break; break;
case WP_DISRUPTOR: case WP_10:
WP_FireDisruptor( ent, alt_fire ); WP_FireDisruptor( ent, alt_fire );
break; break;
case WP_GRENADE_LAUNCHER: case WP_8:
WP_FireGrenade( ent, alt_fire ); WP_FireGrenade( ent, alt_fire );
break; break;
case WP_TR116: case WP_7:
WP_FireTetrionDisruptor( ent, alt_fire ); WP_FireTetrionDisruptor( ent, alt_fire );
break; break;
case WP_DERMAL_REGEN: case WP_13:
WP_SprayVoyagerHypo( ent, alt_fire ); WP_SprayVoyagerHypo( ent, alt_fire );
// WP_FireDreadnought( ent, alt_fire ); // WP_FireDreadnought( ent, alt_fire );
break; break;
case WP_QUANTUM_BURST: case WP_9:
WP_FireQuantumBurst( ent, alt_fire ); WP_FireQuantumBurst( ent, alt_fire );
break; break;
case WP_TRICORDER: case WP_2:
WP_TricorderScan( ent, alt_fire ); WP_TricorderScan( ent, alt_fire );
break; break;
case WP_PADD: case WP_3:
break; break;
case WP_HYPERSPANNER: case WP_15:
//RPG-X:RedTechie - TODO make the thing do something! //RPG-X:RedTechie - TODO make the thing do something!
//WP_FxGun( ent, alt_fire ); //WP_FxGun( ent, alt_fire );
//WP_NEUTRINO_PROBE( ent, alt_fire ); //WP_NEUTRINO_PROBE( ent, alt_fire );
WP_FireHyperspanner(ent, alt_fire); WP_FireHyperspanner(ent, alt_fire);
break; break;
// case WP_TR116: // case WP_7:
// WP_FireCompressionRifle( ent, alt_fire ); // WP_FireCompressionRifle( ent, alt_fire );
// WP_FireTR116( ent, alt_fire ); // WP_FireTR116( ent, alt_fire );
break; break;
case WP_VOYAGER_HYPO: case WP_12:
WP_SprayVoyagerHypo( ent, alt_fire ); WP_SprayVoyagerHypo( ent, alt_fire );
break; break;
case WP_TOOLKIT: case WP_14:
// WP_Assimilate( ent, alt_fire ); // WP_Assimilate( ent, alt_fire );
break; break;
case WP_MEDKIT: case WP_11:
// WP_FireBorgWeapon( ent, alt_fire ); // WP_FireBorgWeapon( ent, alt_fire );
break; break;

Binary file not shown.

View file

@ -865,43 +865,43 @@ static void Controls_UpdateModel( int anim )
break; break;
case ANIM_WEAPON1: case ANIM_WEAPON1:
s_controls.playerWeapon = WP_TRICORDER; s_controls.playerWeapon = WP_2;
break; break;
case ANIM_WEAPON2: case ANIM_WEAPON2:
s_controls.playerWeapon = WP_PHASER; s_controls.playerWeapon = WP_5;
break; break;
case ANIM_WEAPON3: case ANIM_WEAPON3:
s_controls.playerWeapon = WP_GRENADE_LAUNCHER; s_controls.playerWeapon = WP_8;
break; break;
case ANIM_WEAPON4: case ANIM_WEAPON4:
s_controls.playerWeapon = WP_VOYAGER_HYPO; s_controls.playerWeapon = WP_12;
break; break;
case ANIM_WEAPON5: case ANIM_WEAPON5:
s_controls.playerWeapon = WP_HYPERSPANNER; s_controls.playerWeapon = WP_15;
break; break;
/*case ANIM_WEAPON6: /*case ANIM_WEAPON6:
s_controls.playerWeapon = WP_GRENADE_LAUNCHER; s_controls.playerWeapon = WP_8;
break; break;
case ANIM_WEAPON7: case ANIM_WEAPON7:
s_controls.playerWeapon = WP_TR116; s_controls.playerWeapon = WP_7;
break; break;
case ANIM_WEAPON8: case ANIM_WEAPON8:
s_controls.playerWeapon = WP_VOYAGER_HYPO; s_controls.playerWeapon = WP_12;
break; break;
case ANIM_WEAPON9: case ANIM_WEAPON9:
s_controls.playerWeapon = WP_DERMAL_REGEN; s_controls.playerWeapon = WP_13;
break;*/ break;*/
case ANIM_WEAPON10: case ANIM_WEAPON10:
s_controls.playerWeapon = WP_NULL_HAND; s_controls.playerWeapon = WP_1;
break; break;
case ANIM_ATTACK: case ANIM_ATTACK:
@ -916,7 +916,7 @@ static void Controls_UpdateModel( int anim )
case ANIM_DIE: case ANIM_DIE:
s_controls.playerLegs = BOTH_DEATH1; s_controls.playerLegs = BOTH_DEATH1;
s_controls.playerTorso = BOTH_DEATH1; s_controls.playerTorso = BOTH_DEATH1;
s_controls.playerWeapon = WP_NONE; s_controls.playerWeapon = WP_0;
break; break;
case ANIM_CHAT: case ANIM_CHAT:

View file

@ -188,7 +188,7 @@ static void PlayerEmotes_InitModel( void )
BOTH_STAND1, BOTH_STAND1,
s_playerEmotes.viewAngles, s_playerEmotes.viewAngles,
s_playerEmotes.moveAngles, s_playerEmotes.moveAngles,
WP_NONE, WP_0,
trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "height" ),
trap_Cvar_VariableValue( "weight" ), trap_Cvar_VariableValue( "weight" ),
qfalse ); qfalse );
@ -217,7 +217,7 @@ static void PlayerEmotes_DrawPlayer( void ) //*self )
s_playerEmotes.viewAngles[YAW] = uis.lastYaw; //yaw s_playerEmotes.viewAngles[YAW] = uis.lastYaw; //yaw
UI_PlayerInfo_SetInfo( &s_playerEmotes.playerInfo, BOTH_STAND1, BOTH_STAND1, s_playerEmotes.viewAngles, vec3_origin, WP_NONE, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse ); UI_PlayerInfo_SetInfo( &s_playerEmotes.playerInfo, BOTH_STAND1, BOTH_STAND1, s_playerEmotes.viewAngles, vec3_origin, WP_0, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse );
//reload the menu just in case //reload the menu just in case
PlayerEmotes_FillEmotesArray( s_playerEmotes.currentMenu ); PlayerEmotes_FillEmotesArray( s_playerEmotes.currentMenu );
@ -282,7 +282,7 @@ static void Player_DoEmote( int emoteNum ) {
s_playerEmotes.playerInfo.torsoAnimationTimer = torsoTimer; s_playerEmotes.playerInfo.torsoAnimationTimer = torsoTimer;
s_playerEmotes.viewAngles[YAW] = uis.lastYaw; s_playerEmotes.viewAngles[YAW] = uis.lastYaw;
UI_PlayerInfo_SetInfo( &s_playerEmotes.playerInfo, legsAnim, torsoAnim, s_playerEmotes.viewAngles, vec3_origin, WP_NONE, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse ); UI_PlayerInfo_SetInfo( &s_playerEmotes.playerInfo, legsAnim, torsoAnim, s_playerEmotes.viewAngles, vec3_origin, WP_0, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse );
} }
/* /*

View file

@ -151,7 +151,7 @@ static void IngamePlayer_DrawPlayer( void *self )
s_ingame.playerinfo.randomEmote = qtrue; s_ingame.playerinfo.randomEmote = qtrue;
UI_PlayerInfo_SetInfo( &s_ingame.playerinfo, BOTH_STAND1, BOTH_STAND1, viewangles, origin, WP_NONE, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse ); UI_PlayerInfo_SetInfo( &s_ingame.playerinfo, BOTH_STAND1, BOTH_STAND1, viewangles, origin, WP_0, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse );
} }
b = &s_ingame.playermdl; b = &s_ingame.playermdl;

View file

@ -521,31 +521,31 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
case ANIM_CROUCH: case ANIM_CROUCH:
//2 handed weapon - "heavy" //2 handed weapon - "heavy"
switch (weapon) { switch (weapon) {
case WP_TR116: case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
if (upper) if (upper)
return BOTH_STAND2; return BOTH_STAND2;
else else
return LEGS_KNEEL1; return LEGS_KNEEL1;
break; break;
//2 handed weapon - "light" //2 handed weapon - "light"
case WP_COMPRESSION_RIFLE: case WP_6:
//case WP_TR116: //case WP_7:
if (upper) if (upper)
return TORSO_WEAPONREADY2; return TORSO_WEAPONREADY2;
else else
return LEGS_KNEEL1; return LEGS_KNEEL1;
break; break;
//1 handed weapon - "phaser" //1 handed weapon - "phaser"
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if ( upper ) if ( upper )
return TORSO_WEAPONPOSE1; return TORSO_WEAPONPOSE1;
else else
return BOTH_CROUCH1IDLE; return BOTH_CROUCH1IDLE;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -560,26 +560,26 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
case ANIM_IDLE: case ANIM_IDLE:
//2 handed weapon - "heavy" //2 handed weapon - "heavy"
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_TR116: case WP_7:
return BOTH_STAND4; return BOTH_STAND4;
break; break;
//2 handed weapon - "light" //2 handed weapon - "light"
case WP_COMPRESSION_RIFLE: case WP_6:
return BOTH_STAND4; return BOTH_STAND4;
break; break;
//1 handed weapon - "phaser" //1 handed weapon - "phaser"
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if (upper) if (upper)
return BOTH_STAND1; //TORSO_WEAPONIDLE1 return BOTH_STAND1; //TORSO_WEAPONIDLE1
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Generic tools - "everything else" //Generic tools - "everything else"
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
else else
@ -595,61 +595,61 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
case ANIM_ATTACK: case ANIM_ATTACK:
//2 handed weapon - "heavy" //2 handed weapon - "heavy"
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_TR116: case WP_7:
return BOTH_ATTACK3; return BOTH_ATTACK3;
break; break;
//2 handed weapon - "light" //2 handed weapon - "light"
case WP_COMPRESSION_RIFLE: case WP_6:
if (upper) if (upper)
return BOTH_ATTACK2; return BOTH_ATTACK2;
else else
return BOTH_ATTACK3; return BOTH_ATTACK3;
break; break;
//1 handed weapon - "phaser" //1 handed weapon - "phaser"
case WP_PHASER: case WP_5:
case WP_DISRUPTOR: case WP_10:
if (upper) if (upper)
return TORSO_WEAPONREADY1; return TORSO_WEAPONREADY1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other Tools "padd" //Other Tools "padd"
case WP_PADD: case WP_3:
if (upper) if (upper)
return TORSO_PADD1; return TORSO_PADD1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other Tools "tricorder" //Other Tools "tricorder"
case WP_TRICORDER: case WP_2:
if (upper) if (upper)
return TORSO_TRICORDER1; return TORSO_TRICORDER1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other: "Medkit" //Other: "Medkit"
case WP_MEDKIT: case WP_11:
if (upper) if (upper)
return TORSO_ACTIVATEMEDKIT1; return TORSO_ACTIVATEMEDKIT1;
else else
return BOTH_STAND1; return BOTH_STAND1;
break; break;
//Other: "Hypo //Other: "Hypo
case WP_VOYAGER_HYPO: case WP_12:
if (upper) if (upper)
return TORSO_HYPOSPRAY1; return TORSO_HYPOSPRAY1;
else else
return BOTH_STAND1; return BOTH_STAND1;
//Other: "Toolkit" //Other: "Toolkit"
/*case WP_TOOLKIT: /*case WP_14:
//Return nothing. //Return nothing.
//A bit hacky, but the engine accepts it :P //A bit hacky, but the engine accepts it :P
break;*/ break;*/
//Other Tools "everything else" //Other Tools "everything else"
/*case WP_NULL_HAND: /*case WP_1:
switch(rand()%13) switch(rand()%13)
{ {
case 0: return TORSO_HANDGESTURE1; case 0: return TORSO_HANDGESTURE1;
@ -667,7 +667,7 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
case 12: return TORSO_HANDGESTURE13; case 12: return TORSO_HANDGESTURE13;
} }
break;*/ break;*/
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -688,17 +688,17 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
case ANIM_RUN: case ANIM_RUN:
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if (upper) if (upper)
return BOTH_RUN2; return BOTH_RUN2;
else else
return BOTH_RUN1; return BOTH_RUN1;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -712,15 +712,15 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
case ANIM_WALK: case ANIM_WALK:
//2 handed weapons //2 handed weapons
switch (weapon) { switch (weapon) {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
return BOTH_WALK4; return BOTH_WALK4;
break; break;
//Other Tools "everything else" //Other Tools "everything else"
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;
@ -735,17 +735,17 @@ int UI_GetAnim ( int anim, int weapon, qboolean upper )
//2 handed weapons //2 handed weapons
switch (weapon) switch (weapon)
{ {
//case WP_TR116: //case WP_7:
case WP_GRENADE_LAUNCHER: case WP_8:
case WP_QUANTUM_BURST: case WP_9:
case WP_COMPRESSION_RIFLE: case WP_6:
case WP_TR116: case WP_7:
if ( upper ) if ( upper )
return BOTH_WALK4; return BOTH_WALK4;
else else
return LEGS_WALKBACK1; return LEGS_WALKBACK1;
break; break;
case WP_COFFEE: case WP_4:
if (upper) if (upper)
return TORSO_COFFEE; return TORSO_COFFEE;
//break; //break;

View file

@ -1762,7 +1762,7 @@ static void Player_DrawPlayer( void ) //*self )
viewangles[PITCH] = 0; viewangles[PITCH] = 0;
viewangles[ROLL] = 0; viewangles[ROLL] = 0;
UI_PlayerInfo_SetInfo( &s_main.playerinfo, BOTH_STAND1, BOTH_STAND1, viewangles, vec3_origin, WP_NULL_HAND, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse ); UI_PlayerInfo_SetInfo( &s_main.playerinfo, BOTH_STAND1, BOTH_STAND1, viewangles, vec3_origin, WP_1, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse );
//Player_UpdateModel( ANIM_IDLE ); //ADDDED //Player_UpdateModel( ANIM_IDLE ); //ADDDED
//UI_PlayerInfo_SetInfo( &s_main.playerinfo, LEGS_IDLE, TORSO_STAND2, viewangles, vec3_origin, s_main.playerWeapon, qfalse ); //UI_PlayerInfo_SetInfo( &s_main.playerinfo, LEGS_IDLE, TORSO_STAND2, viewangles, vec3_origin, s_main.playerWeapon, qfalse );
@ -1815,7 +1815,7 @@ static void Player_InitModel( void )
s_main.playerViewangles[ROLL] = 0; s_main.playerViewangles[ROLL] = 0;
s_main.playerMoveangles[YAW] = 0; //s_main.playerViewangles[YAW]; s_main.playerMoveangles[YAW] = 0; //s_main.playerViewangles[YAW];
s_main.playerLegs = BOTH_STAND1; s_main.playerLegs = BOTH_STAND1;
s_main.playerWeapon = WP_NONE; s_main.playerWeapon = WP_0;
s_main.playerTorso = BOTH_STAND1; //TORSO_STAND2 s_main.playerTorso = BOTH_STAND1; //TORSO_STAND2
s_main.playerinfo.randomEmote = qtrue; //play some random anims hehe s_main.playerinfo.randomEmote = qtrue; //play some random anims hehe
@ -1839,12 +1839,12 @@ END MOFICIATION
static weapongraphics_s weapon_graphics[UI_NUM_WEAPONS] = //was WP_NUM_WEAPONS, but we added some more for vv static weapongraphics_s weapon_graphics[UI_NUM_WEAPONS] = //was WP_NUM_WEAPONS, but we added some more for vv
{ {
{ 0, -15, -25 }, // WP_PHASER { 0, -15, -25 }, // WP_5
{ 0, 7, -20 }, // WP_COMPRESSION_RIFLE { 0, 7, -20 }, // WP_6
{ 0, 15, -10 }, // WP_NULL_HAND { 0, 15, -10 }, // WP_1
{ 0, 8, -15 }, // WP_COFFEE { 0, 8, -15 }, // WP_4
{ 0, 25, 0 }, // WP_DISRUPTOR { 0, 25, 0 }, // WP_10
{ 0, 18, -17 }, // WP_GRENADE_LAUNCHER { 0, 18, -17 }, // WP_8
{ 0, 5, -25 }, // WP_TETRYON_DISRUPTOR { 0, 5, -25 }, // WP_TETRYON_DISRUPTOR
{ 0, 20, -10 }, // WP_PHOTON_BURST { 0, 20, -10 }, // WP_PHOTON_BURST
{ 0, 5, -19 } // WP_ARCWELDER { 0, 5, -19 } // WP_ARCWELDER

View file

@ -812,7 +812,7 @@ static void PlayerModel_UpdateModel( void )
VectorClear( moveangles ); VectorClear( moveangles );
UI_PlayerInfo_SetModel( &s_playermodel.playerinfo, s_playermodel.modelData ); UI_PlayerInfo_SetModel( &s_playermodel.playerinfo, s_playermodel.modelData );
UI_PlayerInfo_SetInfo( &s_playermodel.playerinfo, BOTH_WALK1, BOTH_WALK1, viewangles, moveangles, WP_NONE, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse ); UI_PlayerInfo_SetInfo( &s_playermodel.playerinfo, BOTH_WALK1, BOTH_WALK1, viewangles, moveangles, WP_0, trap_Cvar_VariableValue( "height" ), trap_Cvar_VariableValue( "weight" ), qfalse );
} }

View file

@ -49,7 +49,7 @@ tryagain:
pi->barrelModel = 0; pi->barrelModel = 0;
pi->flashModel = 0; pi->flashModel = 0;
if ( weaponNum == WP_NONE ) { if ( weaponNum == WP_0 ) {
return; return;
} }
@ -68,13 +68,13 @@ tryagain:
if( pi->weaponModel == 0 ) if( pi->weaponModel == 0 )
{ {
if( weaponNum == WP_PHASER ) if( weaponNum == WP_5 )
{ {
weaponNum = WP_NONE; weaponNum = WP_0;
goto tryagain; goto tryagain;
} }
weaponNum = WP_PHASER; weaponNum = WP_5;
goto tryagain; goto tryagain;
} }
@ -84,39 +84,39 @@ tryagain:
pi->flashModel = trap_R_RegisterModel( path ); pi->flashModel = trap_R_RegisterModel( path );
switch( weaponNum ) { switch( weaponNum ) {
case WP_GRENADE_LAUNCHER: case WP_8:
MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 ); MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 );
break; break;
case WP_DISRUPTOR: case WP_10:
MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 ); MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 );
break; break;
case WP_PHASER: case WP_5:
MAKERGB( pi->flashDlightColor, 0, 0, 0 ); MAKERGB( pi->flashDlightColor, 0, 0, 0 );
break; break;
case WP_DERMAL_REGEN: case WP_13:
MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 ); MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 );
break; break;
case WP_NULL_HAND: case WP_1:
//MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 ); //MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 );
break; break;
case WP_COMPRESSION_RIFLE: case WP_6:
MAKERGB( pi->flashDlightColor, 0.16, 0.16, 1 ); MAKERGB( pi->flashDlightColor, 0.16, 0.16, 1 );
break; break;
case WP_TR116: case WP_7:
MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 ); MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 );
break; break;
case WP_COFFEE: case WP_4:
MAKERGB( pi->flashDlightColor, 1, 0.6, 0.6 ); MAKERGB( pi->flashDlightColor, 1, 0.6, 0.6 );
break; break;
case WP_QUANTUM_BURST: case WP_9:
MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 ); MAKERGB( pi->flashDlightColor, 0.6, 0.6, 1 );
break; break;
@ -215,11 +215,11 @@ static void UI_TorsoSequencing( playerInfo_t *pi ) {
}*/ }*/
if( currentAnim == UI_GetAnim( ANIM_ATTACK, pi->currentWeapon, qtrue ) ) { //BOTH_ATTACK1 22 = ANIM_ATTACK if( currentAnim == UI_GetAnim( ANIM_ATTACK, pi->currentWeapon, qtrue ) ) { //BOTH_ATTACK1 22 = ANIM_ATTACK
//if ( pi->currentWeapon == WP_NONE || pi->currentWeapon == WP_PHASER ) //if ( pi->currentWeapon == WP_0 || pi->currentWeapon == WP_5 )
if ( pi->currentWeapon != WP_COMPRESSION_RIFLE if ( pi->currentWeapon != WP_6
&& pi->currentWeapon != WP_TR116 && pi->currentWeapon != WP_7
&& pi->currentWeapon != WP_GRENADE_LAUNCHER && pi->currentWeapon != WP_8
&& pi->currentWeapon != WP_QUANTUM_BURST ) && pi->currentWeapon != WP_9 )
{ {
UI_SetTorsoAnim( pi, BOTH_STAND1 ); //TORSO_STAND UI_SetTorsoAnim( pi, BOTH_STAND1 ); //TORSO_STAND
} }
@ -905,7 +905,7 @@ void UI_DrawPlayer( float x, float y, float w, float h, vec3_t pOrigin, playerIn
// //
// add the gun // add the gun
// //
if ( pi->currentWeapon != WP_NONE ) { if ( pi->currentWeapon != WP_0 ) {
memset( &gun, 0, sizeof(gun) ); memset( &gun, 0, sizeof(gun) );
gun.hModel = pi->weaponModel; gun.hModel = pi->weaponModel;
VectorCopy( origin, gun.lightingOrigin ); VectorCopy( origin, gun.lightingOrigin );
@ -1862,7 +1862,7 @@ void UI_PlayerInfo_SetModel( playerInfo_t *pi, const char *model ) {
memset( pi, 0, sizeof(*pi) ); memset( pi, 0, sizeof(*pi) );
UI_RegisterClientModelname( pi, model ); UI_RegisterClientModelname( pi, model );
Q_strncpyz( pi->modelName, model, sizeof( pi->modelName ) ); Q_strncpyz( pi->modelName, model, sizeof( pi->modelName ) );
pi->weapon = WP_NONE; pi->weapon = WP_0;
pi->currentWeapon = pi->weapon; pi->currentWeapon = pi->weapon;
pi->lastWeapon = pi->weapon; pi->lastWeapon = pi->weapon;
pi->pendingWeapon = -1; pi->pendingWeapon = -1;
@ -1933,7 +1933,7 @@ void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_
pi->pendingWeapon = -1; pi->pendingWeapon = -1;
pi->weaponTimer = 0; pi->weaponTimer = 0;
} }
else if ( weaponNumber != WP_NONE ) { else if ( weaponNumber != WP_0 ) {
pi->pendingWeapon = weaponNumber; pi->pendingWeapon = weaponNumber;
pi->weaponTimer = dp_realtime + UI_TIMER_WEAPON_DELAY; pi->weaponTimer = dp_realtime + UI_TIMER_WEAPON_DELAY;
} }
@ -1942,7 +1942,7 @@ void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_
if ( torsoAnim == BOTH_DEATH1 || legsAnim == BOTH_DEATH1 ) { if ( torsoAnim == BOTH_DEATH1 || legsAnim == BOTH_DEATH1 ) {
torsoAnim = legsAnim = BOTH_DEATH1; torsoAnim = legsAnim = BOTH_DEATH1;
pi->weapon = pi->currentWeapon = WP_NONE; pi->weapon = pi->currentWeapon = WP_0;
UI_PlayerInfo_SetWeapon( pi, pi->weapon ); UI_PlayerInfo_SetWeapon( pi, pi->weapon );
jumpHeight = 0; jumpHeight = 0;
@ -1970,7 +1970,7 @@ void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_
//if ( torsoAnim == TORSO_STAND || torsoAnim == TORSO_STAND2) //TiM: TORSO_STAND2 //if ( torsoAnim == TORSO_STAND || torsoAnim == TORSO_STAND2) //TiM: TORSO_STAND2
if ( torsoAnim == UI_GetAnim( ANIM_IDLE, pi->currentWeapon, qtrue ) ) if ( torsoAnim == UI_GetAnim( ANIM_IDLE, pi->currentWeapon, qtrue ) )
{ {
/*if ( weaponNum == WP_NONE || weaponNum == WP_PHASER ) /*if ( weaponNum == WP_0 || weaponNum == WP_5 )
{ {
torsoAnim = TORSO_STAND2; torsoAnim = TORSO_STAND2;
} }
@ -1979,7 +1979,7 @@ void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_
torsoAnim = TORSO_STAND2; torsoAnim = TORSO_STAND2;
}*/ }*/
/*if ( weaponNum == WP_COMPRESSION_RIFLE || weaponNum == WP_TR116 ) /*if ( weaponNum == WP_6 || weaponNum == WP_7 )
{ {
torsoAnim = TORSO_STAND; torsoAnim = TORSO_STAND;
} }
@ -1994,7 +1994,7 @@ void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_
//if ( torsoAnim == TORSO_ATTACK || torsoAnim == TORSO_ATTACK2 ) //if ( torsoAnim == TORSO_ATTACK || torsoAnim == TORSO_ATTACK2 )
if ( torsoAnim == UI_GetAnim( ANIM_ATTACK, pi->currentWeapon, qtrue ) ) if ( torsoAnim == UI_GetAnim( ANIM_ATTACK, pi->currentWeapon, qtrue ) )
{ {
/*if ( weaponNum == WP_NONE || weaponNum == WP_PHASER ) /*if ( weaponNum == WP_0 || weaponNum == WP_5 )
{ {
torsoAnim = TORSO_ATTACK2; torsoAnim = TORSO_ATTACK2;
} }
@ -2003,7 +2003,7 @@ void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_
torsoAnim = TORSO_ATTACK; torsoAnim = TORSO_ATTACK;
}*/ }*/
/*if ( weaponNum == WP_COMPRESSION_RIFLE || weaponNum == WP_TR116 ) /*if ( weaponNum == WP_6 || weaponNum == WP_7 )
{ {
torsoAnim = TORSO_ATTACK; torsoAnim = TORSO_ATTACK;
} }

View file

@ -464,7 +464,7 @@ static void PlayerSettings_DrawPlayer( void *self )
/*s_playersettings.playerinfo.height = s_playersettings.height.curvalue; /*s_playersettings.playerinfo.height = s_playersettings.height.curvalue;
s_playersettings.playerinfo.weight = s_playersettings.weight.curvalue;*/ s_playersettings.playerinfo.weight = s_playersettings.weight.curvalue;*/
UI_PlayerInfo_SetInfo( &s_playersettings.playerinfo, BOTH_WALK1, BOTH_WALK1, viewangles, vec3_origin, WP_NONE, s_playersettings.height.curvalue, s_playersettings.weight.curvalue, qfalse ); UI_PlayerInfo_SetInfo( &s_playersettings.playerinfo, BOTH_WALK1, BOTH_WALK1, viewangles, vec3_origin, WP_0, s_playersettings.height.curvalue, s_playersettings.weight.curvalue, qfalse );
b = (menubitmap_s*) self; b = (menubitmap_s*) self;
UI_DrawPlayer( (float)b->generic.x, (float)b->generic.y, (float)b->width, (float)b->height, origin, &s_playersettings.playerinfo, (int)(uis.realtime/1.5) ); UI_DrawPlayer( (float)b->generic.x, (float)b->generic.y, (float)b->width, (float)b->height, origin, &s_playersettings.playerinfo, (int)(uis.realtime/1.5) );
@ -699,7 +699,7 @@ static void PlayerSettings_SetMenuItems( void )
viewangles[ROLL] = 0; viewangles[ROLL] = 0;
UI_PlayerInfo_SetModel( &s_playersettings.playerinfo, UI_Cvar_VariableString( "model" ) ); UI_PlayerInfo_SetModel( &s_playersettings.playerinfo, UI_Cvar_VariableString( "model" ) );
UI_PlayerInfo_SetInfo( &s_playersettings.playerinfo, LEGS_IDLE, TORSO_STAND2, viewangles, vec3_origin, WP_COMPRESSION_RIFLE, qfalse ); UI_PlayerInfo_SetInfo( &s_playersettings.playerinfo, LEGS_IDLE, TORSO_STAND2, viewangles, vec3_origin, WP_6, qfalse );
// handicap // handicap
h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") ); h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") );