Removed the MISSIONPACK ifdefs and missionpack only code.

This commit is contained in:
Richard Allen 2002-06-16 19:12:52 +00:00
parent f3db6be4d2
commit bb54294ab3
14 changed files with 46 additions and 3437 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.51 2002/06/16 19:12:51 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.50 2002/06/02 22:23:57 makro
// no message
//
@ -104,13 +107,6 @@
#include "cg_local.h"
#ifdef MISSIONPACK
#include "../ui/ui_shared.h"
extern menuDef_t *menuScoreboard;
#endif
void CG_TargetCommand_f( void ) {
int targetNum;
char test[4];
@ -297,9 +293,6 @@ static void CG_PlayerOrigin_f (void) {
/*
static void CG_ScoresDown_f( void ) {
#ifdef MISSIONPACK
CG_BuildSpectatorString();
#endif
if ( cg.time - cg.scoreFadeTime < 500 && !cg.showScores)
cg.scoreTPMode = (cg.scoreTPMode == 0) ? 1 : 0; // Toggle
@ -409,72 +402,6 @@ static void CG_WeaponStatsDown_f(void)
}
}
#ifdef MISSIONPACK
extern menuDef_t *menuScoreboard;
void Menu_Reset(); // FIXME: add to right include file
static void CG_LoadHud_f( void) {
char buff[1024];
const char *hudSet;
memset(buff, 0, sizeof(buff));
String_Init();
Menu_Reset();
trap_Cvar_VariableStringBuffer("cg_hudFiles", buff, sizeof(buff));
hudSet = buff;
if (hudSet[0] == '\0') {
hudSet = "ui/hud.txt";
}
CG_LoadMenus(hudSet);
menuScoreboard = NULL;
}
static void CG_scrollScoresDown_f( void) {
if (menuScoreboard && cg.scoreBoardShowing) {
Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qtrue);
Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qtrue);
Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qtrue);
}
}
static void CG_scrollScoresUp_f( void) {
if (menuScoreboard && cg.scoreBoardShowing) {
Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qfalse);
Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qfalse);
Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qfalse);
}
}
static void CG_spWin_f( void) {
trap_Cvar_Set("cg_cameraOrbit", "2");
trap_Cvar_Set("cg_cameraOrbitDelay", "35");
trap_Cvar_Set("cg_thirdPerson", "1");
trap_Cvar_Set("cg_thirdPersonAngle", "0");
trap_Cvar_Set("cg_thirdPersonRange", "100");
CG_AddBufferedSound(cgs.media.winnerSound);
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound(cgs.media.winnerSound, CHAN_ANNOUNCER);
CG_CenterPrint("YOU WIN!", SCREEN_HEIGHT * .30, 0);
}
static void CG_spLose_f( void) {
trap_Cvar_Set("cg_cameraOrbit", "2");
trap_Cvar_Set("cg_cameraOrbitDelay", "35");
trap_Cvar_Set("cg_thirdPerson", "1");
trap_Cvar_Set("cg_thirdPersonAngle", "0");
trap_Cvar_Set("cg_thirdPersonRange", "100");
CG_AddBufferedSound(cgs.media.loserSound);
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound(cgs.media.loserSound, CHAN_ANNOUNCER);
CG_CenterPrint("YOU LOSE...", SCREEN_HEIGHT * .30, 0);
}
#endif
static void CG_TellTarget_f( void ) {
int clientNum;
char command[128];
@ -535,171 +462,6 @@ static void CG_VoiceTellAttacker_f( void ) {
trap_SendClientCommand( command );
}
#ifdef MISSIONPACK
static void CG_NextTeamMember_f( void ) {
CG_SelectNextPlayer();
}
static void CG_PrevTeamMember_f( void ) {
CG_SelectPrevPlayer();
}
// ASS U ME's enumeration order as far as task specific orders, OFFENSE is zero, CAMP is last
//
static void CG_NextOrder_f( void ) {
clientInfo_t *ci = cgs.clientinfo + cg.snap->ps.clientNum;
if (ci) {
if (!ci->teamLeader && sortedTeamPlayers[cg_currentSelectedPlayer.integer] != cg.snap->ps.clientNum) {
return;
}
}
if (cgs.currentOrder < TEAMTASK_CAMP) {
cgs.currentOrder++;
if (cgs.currentOrder == TEAMTASK_RETRIEVE) {
if (!CG_OtherTeamHasFlag()) {
cgs.currentOrder++;
}
}
if (cgs.currentOrder == TEAMTASK_ESCORT) {
if (!CG_YourTeamHasFlag()) {
cgs.currentOrder++;
}
}
} else {
cgs.currentOrder = TEAMTASK_OFFENSE;
}
cgs.orderPending = qtrue;
cgs.orderTime = cg.time + 3000;
}
static void CG_ConfirmOrder_f (void ) {
trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_YES));
trap_SendConsoleCommand("+button5; wait; -button5");
if (cg.time < cgs.acceptOrderTime) {
trap_SendClientCommand(va("teamtask %d\n", cgs.acceptTask));
cgs.acceptOrderTime = 0;
}
}
static void CG_DenyOrder_f (void ) {
trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_NO));
trap_SendConsoleCommand("+button6; wait; -button6");
if (cg.time < cgs.acceptOrderTime) {
cgs.acceptOrderTime = 0;
}
}
static void CG_TaskOffense_f (void ) {
if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONGETFLAG));
} else {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONOFFENSE));
}
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_OFFENSE));
}
static void CG_TaskDefense_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONDEFENSE));
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_DEFENSE));
}
static void CG_TaskPatrol_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONPATROL));
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_PATROL));
}
static void CG_TaskCamp_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONCAMPING));
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_CAMP));
}
static void CG_TaskFollow_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOW));
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_FOLLOW));
}
static void CG_TaskRetrieve_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONRETURNFLAG));
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_RETRIEVE));
}
static void CG_TaskEscort_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOWCARRIER));
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_ESCORT));
}
static void CG_TaskOwnFlag_f (void ) {
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_IHAVEFLAG));
}
static void CG_TauntKillInsult_f (void ) {
trap_SendConsoleCommand("cmd vsay kill_insult\n");
}
static void CG_TauntPraise_f (void ) {
trap_SendConsoleCommand("cmd vsay praise\n");
}
static void CG_TauntTaunt_f (void ) {
trap_SendConsoleCommand("cmd vtaunt\n");
}
static void CG_TauntDeathInsult_f (void ) {
trap_SendConsoleCommand("cmd vsay death_insult\n");
}
static void CG_TauntGauntlet_f (void ) {
trap_SendConsoleCommand("cmd vsay kill_guantlet\n");
}
static void CG_TaskSuicide_f (void ) {
int clientNum;
char command[128];
clientNum = CG_CrosshairPlayer();
if ( clientNum == -1 ) {
return;
}
Com_sprintf( command, 128, "tell %i suicide", clientNum );
trap_SendClientCommand( command );
}
/*
==================
CG_TeamMenu_f
==================
*/
/*
static void CG_TeamMenu_f( void ) {
if (trap_Key_GetCatcher() & KEYCATCH_CGAME) {
CG_EventHandling(CGAME_EVENT_NONE);
trap_Key_SetCatcher(0);
} else {
CG_EventHandling(CGAME_EVENT_TEAMMENU);
//trap_Key_SetCatcher(KEYCATCH_CGAME);
}
}
*/
/*
==================
CG_EditHud_f
==================
*/
/*
static void CG_EditHud_f( void ) {
//cls.keyCatchers ^= KEYCATCH_CGAME;
//VM_Call (cgvm, CG_EVENT_HANDLING, (cls.keyCatchers & KEYCATCH_CGAME) ? CGAME_EVENT_EDITHUD : CGAME_EVENT_NONE);
}
*/
#endif
/*
==================
CG_StartOrbit_f
@ -864,33 +626,6 @@ static consoleCommand_t commands[] = {
{ "vtell_target", CG_VoiceTellTarget_f },
{ "vtell_attacker", CG_VoiceTellAttacker_f },
{ "tcmd", CG_TargetCommand_f },
#ifdef MISSIONPACK
{ "loadhud", CG_LoadHud_f },
{ "nextTeamMember", CG_NextTeamMember_f },
{ "prevTeamMember", CG_PrevTeamMember_f },
{ "nextOrder", CG_NextOrder_f },
{ "confirmOrder", CG_ConfirmOrder_f },
{ "denyOrder", CG_DenyOrder_f },
{ "taskOffense", CG_TaskOffense_f },
{ "taskDefense", CG_TaskDefense_f },
{ "taskPatrol", CG_TaskPatrol_f },
{ "taskCamp", CG_TaskCamp_f },
{ "taskFollow", CG_TaskFollow_f },
{ "taskRetrieve", CG_TaskRetrieve_f },
{ "taskEscort", CG_TaskEscort_f },
{ "taskSuicide", CG_TaskSuicide_f },
{ "taskOwnFlag", CG_TaskOwnFlag_f },
{ "tauntKillInsult", CG_TauntKillInsult_f },
{ "tauntPraise", CG_TauntPraise_f },
{ "tauntTaunt", CG_TauntTaunt_f },
{ "tauntDeathInsult", CG_TauntDeathInsult_f },
{ "tauntGauntlet", CG_TauntGauntlet_f },
{ "spWin", CG_spWin_f },
{ "spLose", CG_spLose_f },
{ "scoresDown", CG_scrollScoresDown_f },
{ "scoresUp", CG_scrollScoresUp_f },
#endif
{ "startOrbit", CG_StartOrbit_f },
//{ "camera", CG_Camera_f },
{ "loaddeferred", CG_LoadDeferredPlayers },

File diff suppressed because it is too large Load diff

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.34 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.33 2002/06/09 05:16:33 niceass
// pressure change
//
@ -315,198 +318,14 @@ void CG_SpawnEffect( vec3_t org ) {
re->reType = RT_MODEL;
re->shaderTime = cg.time / 1000.0f;
#ifndef MISSIONPACK
re->customShader = cgs.media.teleportEffectShader;
#endif
re->hModel = cgs.media.teleportEffectModel;
AxisClear( re->axis );
VectorCopy( org, re->origin );
#ifdef MISSIONPACK
re->origin[2] += 16;
#else
re->origin[2] -= 24;
#endif
}
#ifdef MISSIONPACK
/*
===============
CG_LightningBoltBeam
===============
*/
void CG_LightningBoltBeam( vec3_t start, vec3_t end ) {
localEntity_t *le;
refEntity_t *beam;
le = CG_AllocLocalEntity();
le->leFlags = 0;
le->leType = LE_SHOWREFENTITY;
le->startTime = cg.time;
le->endTime = cg.time + 50;
beam = &le->refEntity;
VectorCopy( start, beam->origin );
// this is the end point
VectorCopy( end, beam->oldorigin );
beam->reType = RT_LIGHTNING;
beam->customShader = cgs.media.lightningShader;
}
/*
==================
CG_KamikazeEffect
==================
*/
void CG_KamikazeEffect( vec3_t org ) {
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
le->leFlags = 0;
le->leType = LE_KAMIKAZE;
le->startTime = cg.time;
le->endTime = cg.time + 3000;//2250;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0;
VectorClear(le->angles.trBase);
re = &le->refEntity;
re->reType = RT_MODEL;
re->shaderTime = cg.time / 1000.0f;
re->hModel = cgs.media.kamikazeEffectModel;
VectorCopy( org, re->origin );
}
/*
==================
CG_ObeliskExplode
==================
*/
void CG_ObeliskExplode( vec3_t org, int entityNum ) {
localEntity_t *le;
vec3_t origin;
// create an explosion
VectorCopy( org, origin );
origin[2] += 64;
le = CG_MakeExplosion( origin, vec3_origin,
cgs.media.dishFlashModel,
cgs.media.rocketExplosionShader,
600, qtrue );
le->light = 300;
le->lightColor[0] = 1;
le->lightColor[1] = 0.75;
le->lightColor[2] = 0.0;
}
/*
==================
CG_ObeliskPain
==================
*/
void CG_ObeliskPain( vec3_t org ) {
float r;
sfxHandle_t sfx;
// hit sound
r = rand() & 3;
if ( r < 2 ) {
sfx = cgs.media.obeliskHitSound1;
} else if ( r == 2 ) {
sfx = cgs.media.obeliskHitSound2;
} else {
sfx = cgs.media.obeliskHitSound3;
}
trap_S_StartSound ( org, ENTITYNUM_NONE, CHAN_BODY, sfx );
}
/*
==================
CG_InvulnerabilityImpact
==================
*/
void CG_InvulnerabilityImpact( vec3_t org, vec3_t angles ) {
localEntity_t *le;
refEntity_t *re;
int r;
sfxHandle_t sfx;
le = CG_AllocLocalEntity();
le->leFlags = 0;
le->leType = LE_INVULIMPACT;
le->startTime = cg.time;
le->endTime = cg.time + 1000;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0;
re = &le->refEntity;
re->reType = RT_MODEL;
re->shaderTime = cg.time / 1000.0f;
re->hModel = cgs.media.invulnerabilityImpactModel;
VectorCopy( org, re->origin );
AnglesToAxis( angles, re->axis );
r = rand() & 3;
if ( r < 2 ) {
sfx = cgs.media.invulnerabilityImpactSound1;
} else if ( r == 2 ) {
sfx = cgs.media.invulnerabilityImpactSound2;
} else {
sfx = cgs.media.invulnerabilityImpactSound3;
}
trap_S_StartSound (org, ENTITYNUM_NONE, CHAN_BODY, sfx );
}
/*
==================
CG_InvulnerabilityJuiced
==================
*/
void CG_InvulnerabilityJuiced( vec3_t org ) {
localEntity_t *le;
refEntity_t *re;
vec3_t angles;
le = CG_AllocLocalEntity();
le->leFlags = 0;
le->leType = LE_INVULJUICED;
le->startTime = cg.time;
le->endTime = cg.time + 10000;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0;
re = &le->refEntity;
re->reType = RT_MODEL;
re->shaderTime = cg.time / 1000.0f;
re->hModel = cgs.media.invulnerabilityJuicedModel;
VectorCopy( org, re->origin );
VectorClear(angles);
AnglesToAxis( angles, re->axis );
trap_S_StartSound (org, ENTITYNUM_NONE, CHAN_BODY, cgs.media.invulnerabilityJuicedSound );
}
#endif
/*
==================
CG_ScorePlum

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.26 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.25 2002/04/23 06:09:18 niceass
// pressure stuff
//
@ -514,21 +517,9 @@ static void CG_Item( centity_t *cent ) {
VectorScale( ent.axis[1], 1.5, ent.axis[1] );
VectorScale( ent.axis[2], 1.5, ent.axis[2] );
ent.nonNormalizedAxes = qtrue;
#ifdef MISSIONPACK
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.weaponHoverSound );
#endif
}
*/
#ifdef MISSIONPACK
if ( item->giType == IT_HOLDABLE && item->giTag == HI_KAMIKAZE ) {
VectorScale( ent.axis[0], 2, ent.axis[0] );
VectorScale( ent.axis[1], 2, ent.axis[1] );
VectorScale( ent.axis[2], 2, ent.axis[2] );
ent.nonNormalizedAxes = qtrue;
}
#endif
// add to refresh list
trap_R_AddRefEntityToScene(&ent);
@ -543,29 +534,6 @@ static void CG_Item( centity_t *cent ) {
trap_R_AddRefEntityToScene(&ent);
}
#ifdef MISSIONPACK
if ( item->giType == IT_WEAPON && wi->barrelModel ) {
refEntity_t barrel;
memset( &barrel, 0, sizeof( barrel ) );
barrel.hModel = wi->barrelModel;
VectorCopy( ent.lightingOrigin, barrel.lightingOrigin );
barrel.shadowPlane = ent.shadowPlane;
barrel.renderfx = ent.renderfx;
CG_PositionRotatedEntityOnTag( &barrel, &ent, wi->weaponModel, "tag_barrel" );
AxisCopy( ent.axis, barrel.axis );
barrel.nonNormalizedAxes = ent.nonNormalizedAxes;
trap_R_AddRefEntityToScene( &barrel );
}
#endif
// accompanying rings / spheres for powerups
if ( !cg_simpleItems.integer )
{
@ -676,14 +644,6 @@ static void CG_Missile( centity_t *cent ) {
ent.hModel = weapon->missileModel;
ent.renderfx = weapon->missileRenderfx | RF_NOSHADOW;
#ifdef MISSIONPACK
if ( cent->currentState.weapon == WP_PROX_LAUNCHER ) {
if (s1->generic1 == TEAM_BLUE) {
ent.hModel = cgs.media.blueProxMine;
}
}
#endif
// convert direction of travel into axis
if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) {
ent.axis[0][2] = 1;
@ -709,15 +669,7 @@ static void CG_Missile( centity_t *cent ) {
else
RotateAroundDirection( ent.axis, cg.time / 4 );
} else {
#ifdef MISSIONPACK
if ( s1->weapon == WP_PROX_LAUNCHER ) {
AnglesToAxis( cent->lerpAngles, ent.axis );
}
else
#endif
{
RotateAroundDirection( ent.axis, s1->time );
}
RotateAroundDirection( ent.axis, s1->time );
}
// add to refresh list, possibly with quad glow
@ -997,15 +949,7 @@ CG_TeamBase
*/
static void CG_TeamBase( centity_t *cent ) {
refEntity_t model;
#ifdef MISSIONPACK
vec3_t angles;
int t, h;
float c;
if ( cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF ) {
#else
if ( cgs.gametype == GT_CTF) {
#endif
// show the flag base
memset(&model, 0, sizeof(model));
model.reType = RT_MODEL;
@ -1023,124 +967,6 @@ static void CG_TeamBase( centity_t *cent ) {
}
trap_R_AddRefEntityToScene( &model );
}
#ifdef MISSIONPACK
else if ( cgs.gametype == GT_OBELISK ) {
// show the obelisk
memset(&model, 0, sizeof(model));
model.reType = RT_MODEL;
VectorCopy( cent->lerpOrigin, model.lightingOrigin );
VectorCopy( cent->lerpOrigin, model.origin );
AnglesToAxis( cent->currentState.angles, model.axis );
model.hModel = cgs.media.overloadBaseModel;
trap_R_AddRefEntityToScene( &model );
// if hit
if ( cent->currentState.frame == 1) {
// show hit model
// modelindex2 is the health value of the obelisk
c = cent->currentState.modelindex2;
model.shaderRGBA[0] = 0xff;
model.shaderRGBA[1] = c;
model.shaderRGBA[2] = c;
model.shaderRGBA[3] = 0xff;
//
model.hModel = cgs.media.overloadEnergyModel;
trap_R_AddRefEntityToScene( &model );
}
// if respawning
if ( cent->currentState.frame == 2) {
if ( !cent->miscTime ) {
cent->miscTime = cg.time;
}
t = cg.time - cent->miscTime;
h = (cg_obeliskRespawnDelay.integer - 5) * 1000;
//
if (t > h) {
c = (float) (t - h) / h;
if (c > 1)
c = 1;
}
else {
c = 0;
}
// show the lights
AnglesToAxis( cent->currentState.angles, model.axis );
//
model.shaderRGBA[0] = c * 0xff;
model.shaderRGBA[1] = c * 0xff;
model.shaderRGBA[2] = c * 0xff;
model.shaderRGBA[3] = c * 0xff;
model.hModel = cgs.media.overloadLightsModel;
trap_R_AddRefEntityToScene( &model );
// show the target
if (t > h) {
if ( !cent->muzzleFlashTime ) {
trap_S_StartSound (cent->lerpOrigin, ENTITYNUM_NONE, CHAN_BODY, cgs.media.obeliskRespawnSound);
cent->muzzleFlashTime = 1;
}
VectorCopy(cent->currentState.angles, angles);
angles[YAW] += (float) 16 * acos(1-c) * 180 / M_PI;
AnglesToAxis( angles, model.axis );
VectorScale( model.axis[0], c, model.axis[0]);
VectorScale( model.axis[1], c, model.axis[1]);
VectorScale( model.axis[2], c, model.axis[2]);
model.shaderRGBA[0] = 0xff;
model.shaderRGBA[1] = 0xff;
model.shaderRGBA[2] = 0xff;
model.shaderRGBA[3] = 0xff;
//
model.origin[2] += 56;
model.hModel = cgs.media.overloadTargetModel;
trap_R_AddRefEntityToScene( &model );
}
else {
//FIXME: show animated smoke
}
}
else {
cent->miscTime = 0;
cent->muzzleFlashTime = 0;
// modelindex2 is the health value of the obelisk
c = cent->currentState.modelindex2;
model.shaderRGBA[0] = 0xff;
model.shaderRGBA[1] = c;
model.shaderRGBA[2] = c;
model.shaderRGBA[3] = 0xff;
// show the lights
model.hModel = cgs.media.overloadLightsModel;
trap_R_AddRefEntityToScene( &model );
// show the target
model.origin[2] += 56;
model.hModel = cgs.media.overloadTargetModel;
trap_R_AddRefEntityToScene( &model );
}
}
else if ( cgs.gametype == GT_HARVESTER ) {
// show harvester model
memset(&model, 0, sizeof(model));
model.reType = RT_MODEL;
VectorCopy( cent->lerpOrigin, model.lightingOrigin );
VectorCopy( cent->lerpOrigin, model.origin );
AnglesToAxis( cent->currentState.angles, model.axis );
if ( cent->currentState.modelindex == TEAM_RED ) {
model.hModel = cgs.media.harvesterModel;
model.customSkin = cgs.media.harvesterRedSkin;
}
else if ( cent->currentState.modelindex == TEAM_BLUE ) {
model.hModel = cgs.media.harvesterModel;
model.customSkin = cgs.media.harvesterBlueSkin;
}
else {
model.hModel = cgs.media.harvesterNeutralModel;
model.customSkin = 0;
}
trap_R_AddRefEntityToScene( &model );
}
#endif
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.64 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.63 2002/06/05 23:53:05 jbravo
// Color fixes for player names
//
@ -118,11 +121,6 @@
// JBravo: warning fix
void CG_BreakBreakable(centity_t *cent, int eParam, int number);
// for the voice chats
#ifdef MISSIONPACK // bk001205
#include "../../ui/menudef.h"
#endif
void CG_LaunchGib (vec3_t origin, vec3_t velocity, qhandle_t hModel);
//==========================================================================
@ -216,17 +214,6 @@ static void CG_UseItem( centity_t *cent ) {
}
trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.medkitSound );
break;
#ifdef MISSIONPACK
case HI_KAMIKAZE:
break;
case HI_PORTAL:
break;
case HI_INVULNERABILITY:
trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useInvulnerabilitySound );
break;
#endif
}
}
@ -755,32 +742,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
DEBUGNAME("EV_TAUNT");
trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*taunt.wav" ) );
break;
#ifdef MISSIONPACK
case EV_TAUNT_YES:
DEBUGNAME("EV_TAUNT_YES");
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_YES);
break;
case EV_TAUNT_NO:
DEBUGNAME("EV_TAUNT_NO");
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_NO);
break;
case EV_TAUNT_FOLLOWME:
DEBUGNAME("EV_TAUNT_FOLLOWME");
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_FOLLOWME);
break;
case EV_TAUNT_GETFLAG:
DEBUGNAME("EV_TAUNT_GETFLAG");
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONGETFLAG);
break;
case EV_TAUNT_GUARDBASE:
DEBUGNAME("EV_TAUNT_GUARDBASE");
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONDEFENSE);
break;
case EV_TAUNT_PATROL:
DEBUGNAME("EV_TAUNT_PATROL");
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONPATROL);
break;
#endif
case EV_WATER_TOUCH:
DEBUGNAME("EV_WATER_TOUCH");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrInSound );
@ -816,22 +777,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
if ( item->giType == IT_POWERUP || item->giType == IT_TEAM) {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.n_healthSound );
} else if (item->giType == IT_PERSISTANT_POWERUP) {
#ifdef MISSIONPACK
switch (item->giTag ) {
case PW_SCOUT:
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.scoutSound );
break;
case PW_GUARD:
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.guardSound );
break;
case PW_DOUBLER:
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.doublerSound );
break;
case PW_AMMOREGEN:
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.ammoregenSound );
break;
}
#endif
} else if (item->giType == IT_HOLDABLE) {
// Elder: we want sounds for unique item pickup
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound, qfalse ) );
@ -1009,52 +954,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.hgrenb2aSound );
}
break;
#ifdef MISSIONPACK
case EV_PROXIMITY_MINE_STICK:
DEBUGNAME("EV_PROXIMITY_MINE_STICK");
//Elder: removed
if( es->eventParm & SURF_FLESH ) {
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimplSound );
//Makro - new surfaceparm system
//} else if( es->eventParm & SURF_METALSTEPS ) {
} else if( IsMetalFlag(es->eventParm) ) {
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimpmSound );
} else {
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimpdSound );
}
break;
case EV_PROXIMITY_MINE_TRIGGER:
DEBUGNAME("EV_PROXIMITY_MINE_TRIGGER");
//Elder: removed
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbactvSound );
break;
case EV_KAMIKAZE:
DEBUGNAME("EV_KAMIKAZE");
CG_KamikazeEffect( cent->lerpOrigin );
break;
case EV_OBELISKEXPLODE:
DEBUGNAME("EV_OBELISKEXPLODE");
CG_ObeliskExplode( cent->lerpOrigin, es->eventParm );
break;
case EV_OBELISKPAIN:
DEBUGNAME("EV_OBELISKPAIN");
CG_ObeliskPain( cent->lerpOrigin );
break;
case EV_INVUL_IMPACT:
DEBUGNAME("EV_INVUL_IMPACT");
CG_InvulnerabilityImpact( cent->lerpOrigin, cent->currentState.angles );
break;
case EV_JUICED:
DEBUGNAME("EV_JUICED");
CG_InvulnerabilityJuiced( cent->lerpOrigin );
break;
case EV_LIGHTNINGBOLT:
DEBUGNAME("EV_LIGHTNINGBOLT");
CG_LightningBoltBeam(es->origin2, es->pos.trBase);
break;
#endif
case EV_SCOREPLUM:
DEBUGNAME("EV_SCOREPLUM");
CG_ScorePlum( cent->currentState.otherEntityNum, cent->lerpOrigin, cent->currentState.time );
@ -1319,19 +1218,9 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
}
else {
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
#ifdef MISSIONPACK
if (cgs.gametype == GT_1FCTF)
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
else
#endif
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
}
else if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
#ifdef MISSIONPACK
if (cgs.gametype == GT_1FCTF)
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
else
#endif
CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound );
}
}
@ -1342,19 +1231,9 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
}
else {
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
#ifdef MISSIONPACK
if (cgs.gametype == GT_1FCTF)
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
else
#endif
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
}
else if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
#ifdef MISSIONPACK
if (cgs.gametype == GT_1FCTF)
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
else
#endif
CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound );
}
}
@ -1385,11 +1264,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
case GTS_TEAMS_ARE_TIED:
if (cg_RQ3_anouncer.integer == 1) CG_AddBufferedSound( cgs.media.teamsTiedSound );
break;
#ifdef MISSIONPACK
case GTS_KAMIKAZE:
trap_S_StartLocalSound(cgs.media.kamikazeFarSound, CHAN_ANNOUNCER);
break;
#endif
default:
break;
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.32 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.31 2002/06/08 14:07:52 makro
// no message
//
@ -324,17 +327,6 @@ void CG_DrawInformation( void ) {
case GT_CTF:
line = "CAPTURE THE FLAG";
break;
#ifdef MISSIONPACK
case GT_1FCTF:
line = "ONE FLAG CTF";
break;
case GT_OBELISK:
line = "OVERLOAD";
break;
case GT_HARVESTER:
line = "HARVESTER";
break;
#endif
default:
line = "UNKNOWN GAMETYPE";
break;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.94 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.93 2002/06/12 23:05:14 slicer
// SSG Zooming final tweak
//
@ -192,10 +195,6 @@
// If you absolutely need something stored, it can either be kept
// by the server in the server stored userinfos, or stashed in a cvar.
#ifdef MISSIONPACK
#define CG_FONT_THRESHOLD 0.1
#endif
#define POWERUP_BLINKS 5
// NiceAss: Weapon scales
@ -260,13 +259,8 @@
// Elder: this is added
#define DEFAULT_SKIN "resdog"
#ifdef MISSIONPACK
#define DEFAULT_TEAM_MODEL "james"
#define DEFAULT_TEAM_HEAD "*james"
#else
#define DEFAULT_TEAM_MODEL "grunt"
#define DEFAULT_TEAM_HEAD "grunt"
#endif
// Elder: Changed
#define DEFAULT_REDTEAM_NAME "Reservoir Dogs"
@ -455,12 +449,6 @@ typedef enum {
LE_SCOREPLUM,
LE_PRESSURE,
LE_TRACER,
#ifdef MISSIONPACK
LE_KAMIKAZE,
LE_INVULIMPACT,
LE_INVULJUICED,
LE_SHOWREFENTITY
#endif
} leType_t;
typedef enum {
@ -1006,18 +994,6 @@ typedef struct {
qhandle_t blueFlagBaseModel;
qhandle_t neutralFlagBaseModel;
#ifdef MISSIONPACK
qhandle_t overloadBaseModel;
qhandle_t overloadTargetModel;
qhandle_t overloadLightsModel;
qhandle_t overloadEnergyModel;
qhandle_t harvesterModel;
qhandle_t harvesterRedSkin;
qhandle_t harvesterBlueSkin;
qhandle_t harvesterNeutralModel;
#endif
qhandle_t armorModel;
qhandle_t armorIcon;
@ -1118,10 +1094,6 @@ typedef struct {
qhandle_t flamePressureShader;
qhandle_t bloodTrailShader;
#ifdef MISSIONPACK
qhandle_t nailPuffShader;
qhandle_t blueProxMine;
#endif
qhandle_t numberShaders[11];
@ -1187,21 +1159,6 @@ typedef struct {
// special effects models
qhandle_t teleportEffectModel;
qhandle_t teleportEffectShader;
#ifdef MISSIONPACK
qhandle_t kamikazeEffectModel;
qhandle_t kamikazeShockWave;
qhandle_t kamikazeHeadModel;
qhandle_t kamikazeHeadTrail;
qhandle_t guardPowerupModel;
qhandle_t scoutPowerupModel;
qhandle_t doublerPowerupModel;
qhandle_t ammoRegenPowerupModel;
qhandle_t invulnerabilityPowerupModel;
qhandle_t invulnerabilityImpactModel;
qhandle_t invulnerabilityJuicedModel;
qhandle_t medkitUsageModel;
qhandle_t heartShader;
#endif
// JBravo: moved out of MISSIONPACK
qhandle_t dustPuffShader;
@ -1273,30 +1230,6 @@ typedef struct {
sfxHandle_t sfx_railg;
sfxHandle_t sfx_rockexp;
sfxHandle_t sfx_plasmaexp;
#ifdef MISSIONPACK
sfxHandle_t sfx_proxexp;
sfxHandle_t sfx_nghit;
sfxHandle_t sfx_nghitflesh;
sfxHandle_t sfx_nghitmetal;
sfxHandle_t sfx_chghit;
sfxHandle_t sfx_chghitflesh;
sfxHandle_t sfx_chghitmetal;
sfxHandle_t kamikazeExplodeSound;
sfxHandle_t kamikazeImplodeSound;
sfxHandle_t kamikazeFarSound;
sfxHandle_t useInvulnerabilitySound;
sfxHandle_t invulnerabilityImpactSound1;
sfxHandle_t invulnerabilityImpactSound2;
sfxHandle_t invulnerabilityImpactSound3;
sfxHandle_t invulnerabilityJuicedSound;
sfxHandle_t obeliskHitSound1;
sfxHandle_t obeliskHitSound2;
sfxHandle_t obeliskHitSound3;
sfxHandle_t obeliskRespawnSound;
sfxHandle_t winnerSound;
sfxHandle_t loserSound;
sfxHandle_t youSuckSound;
#endif
sfxHandle_t gibSound;
//Blaze: Dont need this any more
// sfxHandle_t glassSound; //Blaze: Reaction breakable glass
@ -1385,24 +1318,6 @@ typedef struct {
sfxHandle_t countFightSound;
sfxHandle_t countPrepareSound;
#ifdef MISSIONPACK
// new stuff
qhandle_t patrolShader;
qhandle_t assaultShader;
qhandle_t campShader;
qhandle_t followShader;
qhandle_t defendShader;
qhandle_t teamLeaderShader;
qhandle_t retrieveShader;
qhandle_t escortShader;
qhandle_t flagShaders[3];
sfxHandle_t countPrepareTeamSound;
sfxHandle_t ammoregenSound;
sfxHandle_t doublerSound;
sfxHandle_t guardSound;
sfxHandle_t scoutSound;
#endif
qhandle_t cursor;
qhandle_t selectCursor;
qhandle_t sizeCursor;
@ -1719,17 +1634,6 @@ extern vmCvar_t cg_oldRail;
extern vmCvar_t cg_oldRocket;
extern vmCvar_t cg_oldPlasma;
extern vmCvar_t cg_trueLightning;
#ifdef MISSIONPACK
extern vmCvar_t cg_redTeamName;
extern vmCvar_t cg_blueTeamName;
extern vmCvar_t cg_currentSelectedPlayer;
extern vmCvar_t cg_currentSelectedPlayerName;
extern vmCvar_t cg_singlePlayer;
extern vmCvar_t cg_singlePlayerActive;
extern vmCvar_t cg_recordSPDemo;
extern vmCvar_t cg_recordSPDemoName;
extern vmCvar_t cg_obeliskRespawnDelay;
#endif
// NiceAss: No longer part of the MissionPack
extern vmCvar_t cg_enableBreath;
// JBravo: ditto
@ -1996,14 +1900,6 @@ localEntity_t *CG_SmokePuff( const vec3_t p,
qhandle_t hShader );
void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing );
void CG_SpawnEffect( vec3_t org );
#ifdef MISSIONPACK
void CG_KamikazeEffect( vec3_t org );
void CG_ObeliskExplode( vec3_t org, int entityNum );
void CG_ObeliskPain( vec3_t org );
void CG_InvulnerabilityImpact( vec3_t org, vec3_t angles );
void CG_InvulnerabilityJuiced( vec3_t org );
void CG_LightningBoltBeam( vec3_t start, vec3_t end );
#endif
void CG_ScorePlum( int client, vec3_t org, int score );
//Blaze: for explosions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.17 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.16 2002/06/09 05:15:40 niceass
// pressure change
//
@ -572,182 +575,6 @@ static void CG_AddSpriteExplosion( localEntity_t *le ) {
}
}
#ifdef MISSIONPACK
/*
====================
CG_AddKamikaze
====================
*/
void CG_AddKamikaze( localEntity_t *le ) {
refEntity_t *re;
refEntity_t shockwave;
float c;
vec3_t test, axis[3];
int t;
re = &le->refEntity;
t = cg.time - le->startTime;
VectorClear( test );
AnglesToAxis( test, axis );
if (t > KAMI_SHOCKWAVE_STARTTIME && t < KAMI_SHOCKWAVE_ENDTIME) {
if (!(le->leFlags & LEF_SOUND1)) {
// trap_S_StartSound (re->origin, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.kamikazeExplodeSound );
trap_S_StartLocalSound(cgs.media.kamikazeExplodeSound, CHAN_AUTO);
le->leFlags |= LEF_SOUND1;
}
// 1st kamikaze shockwave
memset(&shockwave, 0, sizeof(shockwave));
shockwave.hModel = cgs.media.kamikazeShockWave;
shockwave.reType = RT_MODEL;
shockwave.shaderTime = re->shaderTime;
VectorCopy(re->origin, shockwave.origin);
c = (float)(t - KAMI_SHOCKWAVE_STARTTIME) / (float)(KAMI_SHOCKWAVE_ENDTIME - KAMI_SHOCKWAVE_STARTTIME);
VectorScale( axis[0], c * KAMI_SHOCKWAVE_MAXRADIUS / KAMI_SHOCKWAVEMODEL_RADIUS, shockwave.axis[0] );
VectorScale( axis[1], c * KAMI_SHOCKWAVE_MAXRADIUS / KAMI_SHOCKWAVEMODEL_RADIUS, shockwave.axis[1] );
VectorScale( axis[2], c * KAMI_SHOCKWAVE_MAXRADIUS / KAMI_SHOCKWAVEMODEL_RADIUS, shockwave.axis[2] );
shockwave.nonNormalizedAxes = qtrue;
if (t > KAMI_SHOCKWAVEFADE_STARTTIME) {
c = (float)(t - KAMI_SHOCKWAVEFADE_STARTTIME) / (float)(KAMI_SHOCKWAVE_ENDTIME - KAMI_SHOCKWAVEFADE_STARTTIME);
}
else {
c = 0;
}
c *= 0xff;
shockwave.shaderRGBA[0] = 0xff - c;
shockwave.shaderRGBA[1] = 0xff - c;
shockwave.shaderRGBA[2] = 0xff - c;
shockwave.shaderRGBA[3] = 0xff - c;
trap_R_AddRefEntityToScene( &shockwave );
}
if (t > KAMI_EXPLODE_STARTTIME && t < KAMI_IMPLODE_ENDTIME) {
// explosion and implosion
c = ( le->endTime - cg.time ) * le->lifeRate;
c *= 0xff;
re->shaderRGBA[0] = le->color[0] * c;
re->shaderRGBA[1] = le->color[1] * c;
re->shaderRGBA[2] = le->color[2] * c;
re->shaderRGBA[3] = le->color[3] * c;
if( t < KAMI_IMPLODE_STARTTIME ) {
c = (float)(t - KAMI_EXPLODE_STARTTIME) / (float)(KAMI_IMPLODE_STARTTIME - KAMI_EXPLODE_STARTTIME);
}
else {
if (!(le->leFlags & LEF_SOUND2)) {
// trap_S_StartSound (re->origin, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.kamikazeImplodeSound );
trap_S_StartLocalSound(cgs.media.kamikazeImplodeSound, CHAN_AUTO);
le->leFlags |= LEF_SOUND2;
}
c = (float)(KAMI_IMPLODE_ENDTIME - t) / (float) (KAMI_IMPLODE_ENDTIME - KAMI_IMPLODE_STARTTIME);
}
VectorScale( axis[0], c * KAMI_BOOMSPHERE_MAXRADIUS / KAMI_BOOMSPHEREMODEL_RADIUS, re->axis[0] );
VectorScale( axis[1], c * KAMI_BOOMSPHERE_MAXRADIUS / KAMI_BOOMSPHEREMODEL_RADIUS, re->axis[1] );
VectorScale( axis[2], c * KAMI_BOOMSPHERE_MAXRADIUS / KAMI_BOOMSPHEREMODEL_RADIUS, re->axis[2] );
re->nonNormalizedAxes = qtrue;
trap_R_AddRefEntityToScene( re );
// add the dlight
trap_R_AddLightToScene( re->origin, c * 1000.0, 1.0, 1.0, c );
}
if (t > KAMI_SHOCKWAVE2_STARTTIME && t < KAMI_SHOCKWAVE2_ENDTIME) {
// 2nd kamikaze shockwave
if (le->angles.trBase[0] == 0 &&
le->angles.trBase[1] == 0 &&
le->angles.trBase[2] == 0) {
le->angles.trBase[0] = random() * 360;
le->angles.trBase[1] = random() * 360;
le->angles.trBase[2] = random() * 360;
}
else {
c = 0;
}
memset(&shockwave, 0, sizeof(shockwave));
shockwave.hModel = cgs.media.kamikazeShockWave;
shockwave.reType = RT_MODEL;
shockwave.shaderTime = re->shaderTime;
VectorCopy(re->origin, shockwave.origin);
test[0] = le->angles.trBase[0];
test[1] = le->angles.trBase[1];
test[2] = le->angles.trBase[2];
AnglesToAxis( test, axis );
c = (float)(t - KAMI_SHOCKWAVE2_STARTTIME) / (float)(KAMI_SHOCKWAVE2_ENDTIME - KAMI_SHOCKWAVE2_STARTTIME);
VectorScale( axis[0], c * KAMI_SHOCKWAVE2_MAXRADIUS / KAMI_SHOCKWAVEMODEL_RADIUS, shockwave.axis[0] );
VectorScale( axis[1], c * KAMI_SHOCKWAVE2_MAXRADIUS / KAMI_SHOCKWAVEMODEL_RADIUS, shockwave.axis[1] );
VectorScale( axis[2], c * KAMI_SHOCKWAVE2_MAXRADIUS / KAMI_SHOCKWAVEMODEL_RADIUS, shockwave.axis[2] );
shockwave.nonNormalizedAxes = qtrue;
if (t > KAMI_SHOCKWAVE2FADE_STARTTIME) {
c = (float)(t - KAMI_SHOCKWAVE2FADE_STARTTIME) / (float)(KAMI_SHOCKWAVE2_ENDTIME - KAMI_SHOCKWAVE2FADE_STARTTIME);
}
else {
c = 0;
}
c *= 0xff;
shockwave.shaderRGBA[0] = 0xff - c;
shockwave.shaderRGBA[1] = 0xff - c;
shockwave.shaderRGBA[2] = 0xff - c;
shockwave.shaderRGBA[3] = 0xff - c;
trap_R_AddRefEntityToScene( &shockwave );
}
}
/*
===================
CG_AddInvulnerabilityImpact
===================
*/
void CG_AddInvulnerabilityImpact( localEntity_t *le ) {
trap_R_AddRefEntityToScene( &le->refEntity );
}
/*
===================
CG_AddInvulnerabilityJuiced
===================
*/
void CG_AddInvulnerabilityJuiced( localEntity_t *le ) {
int t;
t = cg.time - le->startTime;
if ( t > 3000 ) {
le->refEntity.axis[0][0] = (float) 1.0 + 0.3 * (t - 3000) / 2000;
le->refEntity.axis[1][1] = (float) 1.0 + 0.3 * (t - 3000) / 2000;
le->refEntity.axis[2][2] = (float) 0.7 + 0.3 * (2000 - (t - 3000)) / 2000;
}
if ( t > 5000 ) {
le->endTime = 0;
CG_GibPlayer( le->refEntity.origin );
}
else {
trap_R_AddRefEntityToScene( &le->refEntity );
}
}
/*
===================
CG_AddRefEntity
===================
*/
void CG_AddRefEntity( localEntity_t *le ) {
if (le->endTime < cg.time) {
CG_FreeLocalEntity( le );
return;
}
trap_R_AddRefEntityToScene( &le->refEntity );
}
#endif
/*
===================
CG_AddScorePlum
@ -969,21 +796,6 @@ void CG_AddLocalEntities( void ) {
case LE_PRESSURE:
CG_AddPressureEntity( le );
#ifdef MISSIONPACK
case LE_KAMIKAZE:
CG_AddKamikaze( le );
break;
case LE_INVULIMPACT:
CG_AddInvulnerabilityImpact( le );
break;
case LE_INVULJUICED:
CG_AddInvulnerabilityJuiced( le );
break;
case LE_SHOWREFENTITY:
CG_AddRefEntity( le );
break;
#endif
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.32 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.31 2002/06/13 19:03:22 niceass
// cg_forceModel teamplay fix.
//
@ -714,18 +717,6 @@ static void CG_LoadClientInfo( clientInfo_t *ci ) {
char teamname[MAX_QPATH];
teamname[0] = 0;
#ifdef MISSIONPACK
if( cgs.gametype >= GT_TEAM) {
if( ci->team == TEAM_BLUE ) {
Q_strncpyz(teamname, cg_blueTeamName.string, sizeof(teamname) );
} else {
Q_strncpyz(teamname, cg_redTeamName.string, sizeof(teamname) );
}
}
if( teamname[0] ) {
strcat( teamname, "/" );
}
#endif
modelloaded = qtrue;
if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ) ) {
if ( cg_buildScript.integer ) {
@ -2053,75 +2044,6 @@ static void CG_PlayerFlag( centity_t *cent, qhandle_t hSkin, refEntity_t *torso
trap_R_AddRefEntityToScene( &flag );
}
#ifdef MISSIONPACK // bk001204
/*
===============
CG_PlayerTokens
===============
*/
static void CG_PlayerTokens( centity_t *cent, int renderfx ) {
int tokens, i, j;
float angle;
refEntity_t ent;
vec3_t dir, origin;
skulltrail_t *trail;
trail = &cg.skulltrails[cent->currentState.number];
tokens = cent->currentState.generic1;
if ( !tokens ) {
trail->numpositions = 0;
return;
}
if ( tokens > MAX_SKULLTRAIL ) {
tokens = MAX_SKULLTRAIL;
}
// add skulls if there are more than last time
for (i = 0; i < tokens - trail->numpositions; i++) {
for (j = trail->numpositions; j > 0; j--) {
VectorCopy(trail->positions[j-1], trail->positions[j]);
}
VectorCopy(cent->lerpOrigin, trail->positions[0]);
}
trail->numpositions = tokens;
// move all the skulls along the trail
VectorCopy(cent->lerpOrigin, origin);
for (i = 0; i < trail->numpositions; i++) {
VectorSubtract(trail->positions[i], origin, dir);
if (VectorNormalize(dir) > 30) {
VectorMA(origin, 30, dir, trail->positions[i]);
}
VectorCopy(trail->positions[i], origin);
}
memset( &ent, 0, sizeof( ent ) );
if( cgs.clientinfo[ cent->currentState.clientNum ].team == TEAM_BLUE ) {
ent.hModel = cgs.media.redCubeModel;
} else {
ent.hModel = cgs.media.blueCubeModel;
}
ent.renderfx = renderfx;
VectorCopy(cent->lerpOrigin, origin);
for (i = 0; i < trail->numpositions; i++) {
VectorSubtract(origin, trail->positions[i], ent.axis[0]);
ent.axis[0][2] = 0;
VectorNormalize(ent.axis[0]);
VectorSet(ent.axis[2], 0, 0, 1);
CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]);
VectorCopy(trail->positions[i], ent.origin);
angle = (((cg.time + 500 * MAX_SKULLTRAIL - 500 * i) / 16) & 255) * (M_PI * 2) / 255;
ent.origin[2] += sin(angle) * 10;
trap_R_AddRefEntityToScene( &ent );
VectorCopy(trail->positions[i], origin);
}
}
#endif
/*
===============
CG_PlayerPowerups
@ -2560,14 +2482,6 @@ void CG_Player( centity_t *cent ) {
int renderfx;
qboolean shadow;
float shadowPlane;
#ifdef MISSIONPACK
refEntity_t skull;
refEntity_t powerup;
int t;
float c;
float angle;
vec3_t dir, angles;
#endif
// the client number is stored in clientNum. It can't be derived
// from the entity number, because a single client may have
@ -2621,11 +2535,6 @@ void CG_Player( centity_t *cent ) {
renderfx |= RF_SHADOW_PLANE;
}
renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all
#ifdef MISSIONPACK
if( cgs.gametype == GT_HARVESTER ) {
CG_PlayerTokens( cent, renderfx );
}
#endif
//
// add the legs
//
@ -2664,211 +2573,6 @@ void CG_Player( centity_t *cent ) {
torso.renderfx = renderfx;
CG_AddRefEntityWithPowerups( &torso, &cent->currentState, ci->team );
#ifdef MISSIONPACK
if ( cent->currentState.eFlags & EF_KAMIKAZE ) {
memset( &skull, 0, sizeof(skull) );
VectorCopy( cent->lerpOrigin, skull.lightingOrigin );
skull.shadowPlane = shadowPlane;
skull.renderfx = renderfx;
if ( cent->currentState.eFlags & EF_DEAD ) {
// one skull bobbing above the dead body
angle = ((cg.time / 7) & 255) * (M_PI * 2) / 255;
if (angle > M_PI * 2)
angle -= (float)M_PI * 2;
dir[0] = sin(angle) * 20;
dir[1] = cos(angle) * 20;
angle = ((cg.time / 4) & 255) * (M_PI * 2) / 255;
dir[2] = 15 + sin(angle) * 8;
VectorAdd(torso.origin, dir, skull.origin);
dir[2] = 0;
VectorCopy(dir, skull.axis[1]);
VectorNormalize(skull.axis[1]);
VectorSet(skull.axis[2], 0, 0, 1);
CrossProduct(skull.axis[1], skull.axis[2], skull.axis[0]);
skull.hModel = cgs.media.kamikazeHeadModel;
trap_R_AddRefEntityToScene( &skull );
skull.hModel = cgs.media.kamikazeHeadTrail;
trap_R_AddRefEntityToScene( &skull );
}
else {
// three skulls spinning around the player
angle = ((cg.time / 4) & 255) * (M_PI * 2) / 255;
dir[0] = cos(angle) * 20;
dir[1] = sin(angle) * 20;
dir[2] = cos(angle) * 20;
VectorAdd(torso.origin, dir, skull.origin);
angles[0] = sin(angle) * 30;
angles[1] = (angle * 180 / M_PI) + 90;
if (angles[1] > 360)
angles[1] -= 360;
angles[2] = 0;
AnglesToAxis( angles, skull.axis );
/*
dir[2] = 0;
VectorInverse(dir);
VectorCopy(dir, skull.axis[1]);
VectorNormalize(skull.axis[1]);
VectorSet(skull.axis[2], 0, 0, 1);
CrossProduct(skull.axis[1], skull.axis[2], skull.axis[0]);
*/
skull.hModel = cgs.media.kamikazeHeadModel;
trap_R_AddRefEntityToScene( &skull );
// flip the trail because this skull is spinning in the other direction
VectorInverse(skull.axis[1]);
skull.hModel = cgs.media.kamikazeHeadTrail;
trap_R_AddRefEntityToScene( &skull );
angle = ((cg.time / 4) & 255) * (M_PI * 2) / 255 + M_PI;
if (angle > M_PI * 2)
angle -= (float)M_PI * 2;
dir[0] = sin(angle) * 20;
dir[1] = cos(angle) * 20;
dir[2] = cos(angle) * 20;
VectorAdd(torso.origin, dir, skull.origin);
angles[0] = cos(angle - 0.5 * M_PI) * 30;
angles[1] = 360 - (angle * 180 / M_PI);
if (angles[1] > 360)
angles[1] -= 360;
angles[2] = 0;
AnglesToAxis( angles, skull.axis );
/*
dir[2] = 0;
VectorCopy(dir, skull.axis[1]);
VectorNormalize(skull.axis[1]);
VectorSet(skull.axis[2], 0, 0, 1);
CrossProduct(skull.axis[1], skull.axis[2], skull.axis[0]);
*/
skull.hModel = cgs.media.kamikazeHeadModel;
trap_R_AddRefEntityToScene( &skull );
skull.hModel = cgs.media.kamikazeHeadTrail;
trap_R_AddRefEntityToScene( &skull );
angle = ((cg.time / 3) & 255) * (M_PI * 2) / 255 + 0.5 * M_PI;
if (angle > M_PI * 2)
angle -= (float)M_PI * 2;
dir[0] = sin(angle) * 20;
dir[1] = cos(angle) * 20;
dir[2] = 0;
VectorAdd(torso.origin, dir, skull.origin);
VectorCopy(dir, skull.axis[1]);
VectorNormalize(skull.axis[1]);
VectorSet(skull.axis[2], 0, 0, 1);
CrossProduct(skull.axis[1], skull.axis[2], skull.axis[0]);
skull.hModel = cgs.media.kamikazeHeadModel;
trap_R_AddRefEntityToScene( &skull );
skull.hModel = cgs.media.kamikazeHeadTrail;
trap_R_AddRefEntityToScene( &skull );
}
}
if ( cent->currentState.powerups & ( 1 << PW_GUARD ) ) {
memcpy(&powerup, &torso, sizeof(torso));
powerup.hModel = cgs.media.guardPowerupModel;
powerup.frame = 0;
powerup.oldframe = 0;
powerup.customSkin = 0;
trap_R_AddRefEntityToScene( &powerup );
}
if ( cent->currentState.powerups & ( 1 << PW_SCOUT ) ) {
memcpy(&powerup, &torso, sizeof(torso));
powerup.hModel = cgs.media.scoutPowerupModel;
powerup.frame = 0;
powerup.oldframe = 0;
powerup.customSkin = 0;
trap_R_AddRefEntityToScene( &powerup );
}
if ( cent->currentState.powerups & ( 1 << PW_DOUBLER ) ) {
memcpy(&powerup, &torso, sizeof(torso));
powerup.hModel = cgs.media.doublerPowerupModel;
powerup.frame = 0;
powerup.oldframe = 0;
powerup.customSkin = 0;
trap_R_AddRefEntityToScene( &powerup );
}
if ( cent->currentState.powerups & ( 1 << PW_AMMOREGEN ) ) {
memcpy(&powerup, &torso, sizeof(torso));
powerup.hModel = cgs.media.ammoRegenPowerupModel;
powerup.frame = 0;
powerup.oldframe = 0;
powerup.customSkin = 0;
trap_R_AddRefEntityToScene( &powerup );
}
if ( cent->currentState.powerups & ( 1 << PW_INVULNERABILITY ) ) {
if ( !ci->invulnerabilityStartTime ) {
ci->invulnerabilityStartTime = cg.time;
}
ci->invulnerabilityStopTime = cg.time;
}
else {
ci->invulnerabilityStartTime = 0;
}
if ( (cent->currentState.powerups & ( 1 << PW_INVULNERABILITY ) ) ||
cg.time - ci->invulnerabilityStopTime < 250 ) {
memcpy(&powerup, &torso, sizeof(torso));
powerup.hModel = cgs.media.invulnerabilityPowerupModel;
powerup.customSkin = 0;
// always draw
powerup.renderfx &= ~RF_THIRD_PERSON;
VectorCopy(cent->lerpOrigin, powerup.origin);
if ( cg.time - ci->invulnerabilityStartTime < 250 ) {
c = (float) (cg.time - ci->invulnerabilityStartTime) / 250;
}
else if (cg.time - ci->invulnerabilityStopTime < 250 ) {
c = (float) (250 - (cg.time - ci->invulnerabilityStopTime)) / 250;
}
else {
c = 1;
}
VectorSet( powerup.axis[0], c, 0, 0 );
VectorSet( powerup.axis[1], 0, c, 0 );
VectorSet( powerup.axis[2], 0, 0, c );
trap_R_AddRefEntityToScene( &powerup );
}
t = cg.time - ci->medkitUsageTime;
if ( ci->medkitUsageTime && t < 500 ) {
memcpy(&powerup, &torso, sizeof(torso));
powerup.hModel = cgs.media.medkitUsageModel;
powerup.customSkin = 0;
// always draw
powerup.renderfx &= ~RF_THIRD_PERSON;
VectorClear(angles);
AnglesToAxis(angles, powerup.axis);
VectorCopy(cent->lerpOrigin, powerup.origin);
powerup.origin[2] += -24 + (float) t * 80 / 500;
if ( t > 400 ) {
c = (float) (t - 1000) * 0xff / 100;
powerup.shaderRGBA[0] = 0xff - c;
powerup.shaderRGBA[1] = 0xff - c;
powerup.shaderRGBA[2] = 0xff - c;
powerup.shaderRGBA[3] = 0xff - c;
}
else {
powerup.shaderRGBA[0] = 0xff;
powerup.shaderRGBA[1] = 0xff;
powerup.shaderRGBA[2] = 0xff;
powerup.shaderRGBA[3] = 0xff;
}
trap_R_AddRefEntityToScene( &powerup );
}
#endif // MISSIONPACK
//
// add the head
//

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.24 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.23 2002/06/12 19:59:39 jbravo
// Removed unused variables
//
@ -73,9 +76,6 @@ void CG_CheckAmmo( void ) {
case WP_GRENADE_LAUNCHER:
case WP_RAILGUN:
case WP_SHOTGUN:
#ifdef MISSIONPACK
case WP_PROX_LAUNCHER:
#endif
total += cg.snap->ps.ammo[i] * 1000;
break;
default:
@ -396,18 +396,8 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
if ( ps->persistant[PERS_HITS] > ops->persistant[PERS_HITS] ) {
armor = ps->persistant[PERS_ATTACKEE_ARMOR] & 0xff;
health = ps->persistant[PERS_ATTACKEE_ARMOR] >> 8;
#ifdef MISSIONPACK
if (armor > 50 ) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.hitSoundHighArmor, CHAN_LOCAL_SOUND );
} else if (armor || health > 100) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.hitSoundLowArmor, CHAN_LOCAL_SOUND );
} else {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND );
}
#else
//Elder: completely remove cowbell sound
//if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND );
#endif
} else if ( ps->persistant[PERS_HITS] < ops->persistant[PERS_HITS] ) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.hitTeamSound, CHAN_LOCAL_SOUND );
}
@ -434,43 +424,19 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
//Com_Printf("capture\n");
}
if (ps->persistant[PERS_IMPRESSIVE_COUNT] != ops->persistant[PERS_IMPRESSIVE_COUNT]) {
#ifdef MISSIONPACK
if (ps->persistant[PERS_IMPRESSIVE_COUNT] == 1) {
sfx = cgs.media.firstImpressiveSound;
} else {
sfx = cgs.media.impressiveSound;
}
#else
sfx = cgs.media.impressiveSound;
#endif
pushReward(sfx, cgs.media.medalImpressive, ps->persistant[PERS_IMPRESSIVE_COUNT]);
reward = qtrue;
//Com_Printf("impressive\n");
}
if (ps->persistant[PERS_EXCELLENT_COUNT] != ops->persistant[PERS_EXCELLENT_COUNT]) {
#ifdef MISSIONPACK
if (ps->persistant[PERS_EXCELLENT_COUNT] == 1) {
sfx = cgs.media.firstExcellentSound;
} else {
sfx = cgs.media.excellentSound;
}
#else
sfx = cgs.media.excellentSound;
#endif
pushReward(sfx, cgs.media.medalExcellent, ps->persistant[PERS_EXCELLENT_COUNT]);
reward = qtrue;
//Com_Printf("excellent\n");
}
if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] != ops->persistant[PERS_GAUNTLET_FRAG_COUNT]) {
#ifdef MISSIONPACK
if (ops->persistant[PERS_GAUNTLET_FRAG_COUNT] == 1) {
sfx = cgs.media.firstHumiliationSound;
} else {
sfx = cgs.media.humiliationSound;
}
#else
sfx = cgs.media.humiliationSound;
#endif
pushReward(sfx, cgs.media.medalGauntlet, ps->persistant[PERS_GAUNTLET_FRAG_COUNT]);
reward = qtrue;
//Com_Printf("guantlet frag\n");

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.23 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.22 2002/06/11 23:38:43 niceass
// spectator fix
//
@ -314,16 +317,7 @@ static void CG_TouchItem( centity_t *cent ) {
// Special case for flags.
// We don't predict touching our own flag
#ifdef MISSIONPACK
if( cgs.gametype == GT_1FCTF ) {
if( item->giTag != PW_NEUTRALFLAG ) {
return;
}
}
if( cgs.gametype == GT_CTF || cgs.gametype == GT_HARVESTER ) {
#else
if( cgs.gametype == GT_CTF ) {
#endif
if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED &&
item->giTag == PW_REDFLAG)
return;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.51 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.50 2002/06/12 22:31:59 slicer
// Even better way to improve the Cvar Anti-Cheat System
//
@ -158,18 +161,6 @@ static const orderTask_t validOrders[] = {
static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t);
#ifdef MISSIONPACK // bk001204
static int CG_ValidOrder(const char *p) {
int i;
for (i = 0; i < numValidOrders; i++) {
if (Q_stricmp(p, validOrders[i].order) == 0) {
return validOrders[i].taskNum;7
}
}
return -1;
}
#endif
/*
=================
CG_ParseScores
@ -216,10 +207,6 @@ static void CG_ParseScores( void ) {
cg.scores[i].team = cgs.clientinfo[cg.scores[i].client].team;
}
#ifdef MISSIONPACK
CG_SetScoreSelection(NULL);
#endif
}
/*
=================
@ -366,14 +353,7 @@ static void CG_ParseWarmup( void ) {
if ( warmup == 0 && cg.warmup ) {
} else if ( warmup > 0 && cg.warmup <= 0 ) {
#ifdef MISSIONPACK
if (cgs.gametype >= GT_CTF && cgs.gametype <= GT_HARVESTER) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.countPrepareTeamSound, CHAN_ANNOUNCER );
} else
#endif
{
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.countPrepareSound, CHAN_ANNOUNCER );
}
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.countPrepareSound, CHAN_ANNOUNCER );
}
cg.warmup = warmup;
@ -397,12 +377,6 @@ void CG_SetConfigValues( void ) {
cgs.redflag = s[0] - '0';
cgs.blueflag = s[1] - '0';
}
#ifdef MISSIONPACK
else if( cgs.gametype == GT_1FCTF ) {
s = CG_ConfigString( CS_FLAGSTATUS );
cgs.flagStatus = s[0] - '0';
}
#endif
cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) );
}
@ -489,9 +463,6 @@ static void CG_ConfigStringModified( void ) {
cgs.voteModified = qtrue;
} else if ( num == CS_VOTE_STRING ) {
Q_strncpyz( cgs.voteString, str, sizeof( cgs.voteString ) );
#ifdef MISSIONPACK
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER );
#endif //MISSIONPACK
} else if ( num >= CS_TEAMVOTE_TIME && num <= CS_TEAMVOTE_TIME + 1) {
cgs.teamVoteTime[num-CS_TEAMVOTE_TIME] = atoi( str );
cgs.teamVoteModified[num-CS_TEAMVOTE_TIME] = qtrue;
@ -503,9 +474,6 @@ static void CG_ConfigStringModified( void ) {
cgs.teamVoteModified[num-CS_TEAMVOTE_NO] = qtrue;
} else if ( num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1) {
Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString ) );
#ifdef MISSIONPACK
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER );
#endif
} else if ( num == CS_INTERMISSION ) {
cg.intermissionStarted = atoi( str );
} else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) {
@ -523,11 +491,6 @@ static void CG_ConfigStringModified( void ) {
cgs.redflag = str[0] - '0';
cgs.blueflag = str[1] - '0';
}
#ifdef MISSIONPACK
else if( cgs.gametype == GT_1FCTF ) {
cgs.flagStatus = str[0] - '0';
}
#endif
}
else if ( num == CS_SHADERSTATE ) {
CG_ShaderStateChanged();
@ -654,14 +617,6 @@ static void CG_MapRestart( void ) {
trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER );
CG_CenterPrint( "FIGHT!", 120, GIANTCHAR_WIDTH*2 );
}
#ifdef MISSIONPACK
if (cg_singlePlayerActive.integer) {
trap_Cvar_Set("ui_matchStartTime", va("%i", cg.time));
if (cg_recordSPDemo.integer && cg_recordSPDemoName.string && *cg_recordSPDemoName.string) {
trap_SendConsoleCommand(va("set g_synchronousclients 1 ; record %s \n", cg_recordSPDemoName.string));
}
}
#endif
trap_Cvar_Set("cg_thirdPerson", "0");
}
@ -993,32 +948,6 @@ CG_PlayVoiceChat
=================
*/
void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
#ifdef MISSIONPACK
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
}
if ( !cg_noVoiceChats.integer ) {
trap_S_StartLocalSound( vchat->snd, CHAN_VOICE);
if (vchat->clientNum != cg.snap->ps.clientNum) {
int orderTask = CG_ValidOrder(vchat->cmd);
if (orderTask > 0) {
cgs.acceptOrderTime = cg.time + 5000;
Q_strncpyz(cgs.acceptVoice, vchat->cmd, sizeof(cgs.acceptVoice));
cgs.acceptTask = orderTask;
cgs.acceptLeader = vchat->clientNum;
}
// see if this was an order
CG_ShowResponseHead();
}
}
if (!vchat->voiceOnly && !cg_noVoiceText.integer) {
CG_AddToTeamChat( vchat->message );
CG_Printf( "%s\n", vchat->message );
}
voiceChatBuffer[cg.voiceChatBufferOut].snd = 0;
#endif
}
/*
@ -1027,17 +956,6 @@ CG_PlayBufferedVoieChats
=====================
*/
void CG_PlayBufferedVoiceChats( void ) {
#ifdef MISSIONPACK
if ( cg.voiceChatTime < cg.time ) {
if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) {
//
CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]);
//
cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER;
cg.voiceChatTime = cg.time + 1000;
}
}
#endif
}
/*
@ -1046,19 +964,6 @@ CG_AddBufferedVoiceChat
=====================
*/
void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) {
#ifdef MISSIONPACK
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
}
memcpy(&voiceChatBuffer[cg.voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t));
cg.voiceChatBufferIn = (cg.voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER;
if (cg.voiceChatBufferIn == cg.voiceChatBufferOut) {
CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] );
cg.voiceChatBufferOut++;
}
#endif
}
/*
@ -1067,47 +972,6 @@ CG_VoiceChatLocal
=================
*/
void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) {
#ifdef MISSIONPACK
char *chat;
voiceChatList_t *voiceChatList;
clientInfo_t *ci;
sfxHandle_t snd;
bufferedVoiceChat_t vchat;
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
}
if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) {
clientNum = 0;
}
ci = &cgs.clientinfo[ clientNum ];
cgs.currentVoiceClient = clientNum;
voiceChatList = CG_VoiceChatListForClient( clientNum );
if ( CG_GetVoiceChat( voiceChatList, cmd, &snd, &chat ) ) {
//
if ( mode == SAY_TEAM || !cg_teamChatsOnly.integer ) {
vchat.clientNum = clientNum;
vchat.snd = snd;
vchat.voiceOnly = voiceOnly;
Q_strncpyz(vchat.cmd, cmd, sizeof(vchat.cmd));
if ( mode == SAY_TELL ) {
Com_sprintf(vchat.message, sizeof(vchat.message), "[%s]: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat);
}
else if ( mode == SAY_TEAM ) {
Com_sprintf(vchat.message, sizeof(vchat.message), "(%s): %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat);
}
else {
Com_sprintf(vchat.message, sizeof(vchat.message), "%s: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat);
}
CG_AddBufferedVoiceChat(&vchat);
}
}
#endif
}
/*
@ -1116,26 +980,6 @@ CG_VoiceChat
=================
*/
void CG_VoiceChat( int mode ) {
#ifdef MISSIONPACK
const char *cmd;
int clientNum, color;
qboolean voiceOnly;
voiceOnly = atoi(CG_Argv(1));
clientNum = atoi(CG_Argv(2));
color = atoi(CG_Argv(3));
cmd = CG_Argv(4);
if (cg_noTaunt.integer != 0) {
if (!strcmp(cmd, VOICECHAT_KILLINSULT) || !strcmp(cmd, VOICECHAT_TAUNT) || \
!strcmp(cmd, VOICECHAT_DEATHINSULT) || !strcmp(cmd, VOICECHAT_KILLGAUNTLET) || \
!strcmp(cmd, VOICECHAT_PRAISE)) {
return;
}
}
CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd );
#endif
}
/*
@ -1433,15 +1277,6 @@ static void CG_ServerCommand( void ) {
if (!strcmp( cmd, "print")) {
CG_Printf("%s", CG_Argv(1));
#ifdef MISSIONPACK
cmd = CG_Argv(1); // yes, this is obviously a hack, but so is the way we hear about
// votes passing or failing
if (!Q_stricmpn(cmd, "vote failed", 11) || !Q_stricmpn(cmd, "team vote failed", 16)) {
trap_S_StartLocalSound(cgs.media.voteFailed, CHAN_ANNOUNCER);
} else if (!Q_stricmpn(cmd, "vote passed", 11) || !Q_stricmpn(cmd, "team vote passed", 16)) {
trap_S_StartLocalSound(cgs.media.votePassed, CHAN_ANNOUNCER);
}
#endif
return;
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.81 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
// Revision 1.80 2002/06/12 17:05:14 slicer
// Fixed a couple of problems related to the sniper zooming
//
@ -588,75 +591,6 @@ static void CG_RocketTrail( centity_t *ent, const weaponInfo_t *wi ) {
}
*/
#ifdef MISSIONPACK
/*
==========================
CG_NailTrail
==========================
*/
static void CG_NailTrail( centity_t *ent, const weaponInfo_t *wi ) {
int step;
vec3_t origin, lastPos;
int t;
int startTime, contents;
int lastContents;
entityState_t *es;
vec3_t up;
localEntity_t *smoke;
if ( cg_noProjectileTrail.integer ) {
return;
}
up[0] = 0;
up[1] = 0;
up[2] = 0;
step = 50;
es = &ent->currentState;
startTime = ent->trailTime;
t = step * ( (startTime + step) / step );
CG_EvaluateTrajectory( &es->pos, cg.time, origin );
contents = CG_PointContents( origin, -1 );
// if object (e.g. grenade) is stationary, don't toss up smoke
if ( es->pos.trType == TR_STATIONARY ) {
ent->trailTime = cg.time;
return;
}
CG_EvaluateTrajectory( &es->pos, ent->trailTime, lastPos );
lastContents = CG_PointContents( lastPos, -1 );
ent->trailTime = cg.time;
if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) {
if ( contents & lastContents & CONTENTS_WATER ) {
CG_BubbleTrail( lastPos, origin, 8 );
}
return;
}
for ( ; t <= ent->trailTime ; t += step ) {
CG_EvaluateTrajectory( &es->pos, t, lastPos );
smoke = CG_SmokePuff( lastPos, up,
wi->trailRadius,
1, 1, 1, 0.33f,
wi->wiTrailTime,
t,
0,
0,
cgs.media.nailPuffShader );
// use the optimized local entity add
smoke->leType = LE_SCALE_FADE;
}
}
#endif
/*
==========================
CG_NailTrail
@ -1401,11 +1335,6 @@ static float CG_MachinegunSpinAngle( centity_t *cent ) {
cent->pe.barrelTime = cg.time;
cent->pe.barrelAngle = AngleMod( angle );
cent->pe.barrelSpinning = !!(cent->currentState.eFlags & EF_FIRING);
#ifdef MISSIONPACK
if ( cent->currentState.weapon == WP_CHAINGUN && !cent->pe.barrelSpinning ) {
trap_S_StartSound( NULL, cent->currentState.number, CHAN_WEAPON, trap_S_RegisterSound( "sound/weapons/vulcan/wvulwind.wav", qfalse ) );
}
#endif
}
return angle;
@ -3544,11 +3473,6 @@ void CG_MissileHitPlayer( int weapon, vec3_t origin, vec3_t dir, int entityNum )
switch ( weapon ) {
case WP_GRENADE_LAUNCHER:
case WP_ROCKET_LAUNCHER:
#ifdef MISSIONPACK
case WP_NAILGUN:
case WP_CHAINGUN:
case WP_PROX_LAUNCHER:
#endif
CG_MissileHitWall( weapon, 0, origin, dir, IMPACTSOUND_FLESH, 0 );
break;
default: