diff --git a/code/botlib/be_ai_goal.c b/code/botlib/be_ai_goal.c index de7d6ecc4f..4bc17a526f 100644 --- a/code/botlib/be_ai_goal.c +++ b/code/botlib/be_ai_goal.c @@ -98,11 +98,11 @@ typedef enum { GT_TEAM, // team deathmatch GT_CTF, // capture the flag -#ifdef MISSIONPACK +//#ifdef MISSIONPACK GT_1FCTF, GT_OBELISK, GT_HARVESTER, -#endif +//#endif GT_MAX_GAME_TYPE } gametype_t; diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index 9e624a221a..adf8286b2b 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -1115,32 +1115,40 @@ static float CG_DrawScores( float y ) { } } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( cgs.gametype == GT_1FCTF ) { // Display flag status item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); if (item) { - y1 = y + scoreHeight; + y1 = y; if( cgs.flagStatus >= 0 && cgs.flagStatus <= 4 ) { vec4_t color = {1, 1, 1, 1}; int index = 0; - if (cgs.flagStatus == FLAG_TAKEN_RED) { - color[1] = color[2] = 0; - index = 1; - } else if (cgs.flagStatus == FLAG_TAKEN_BLUE) { - color[0] = color[1] = 0; - index = 1; - } else if (cgs.flagStatus == FLAG_DROPPED) { - index = 2; + switch(cgs.flagStatus) + { + case FLAG_TAKEN_RED: + color[1] = color[2] = 0; + index = 1; + y1 = y ; + break; + case FLAG_TAKEN_BLUE: + color[0] = color[1] = 0; + index = 1; + y1 = y + scoreHeight; + default: + index = 2; + y1 = y - scoreHeight; + break; } + trap_R_SetColor(color); - CG_DrawPic( x, y1-4, w, scoreHeight, cgs.media.flagShaders[index] ); + CG_DrawPic( x - w, y1, w, scoreHeight, cgs.media.flagShaders[index] ); trap_R_SetColor(NULL); } } } -#endif +//#endif // RED color[0] = 1.0f; color[1] = 0.3f; @@ -1715,13 +1723,13 @@ static void CG_DrawHoldableItem( void ) { } #endif // MISSIONPACK -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* =================== CG_DrawPersistantPowerup =================== */ -#if 0 // sos001208 - DEAD +//#if 0 // sos001208 - DEAD static void CG_DrawPersistantPowerup( void ) { int value; @@ -1731,8 +1739,8 @@ static void CG_DrawPersistantPowerup( void ) { CG_DrawPic( 640-ICON_SIZE, (SCREEN_HEIGHT-ICON_SIZE)/2 - ICON_SIZE, ICON_SIZE, ICON_SIZE, cg_items[ value ].icon ); } } -#endif -#endif // MISSIONPACK +//#endif +//#endif // MISSIONPACK /* @@ -2223,15 +2231,17 @@ static void CG_DrawVote(void) { if ( sec < 0 ) { sec = 0; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK s = va("VOTE(%i):%s yes:%i no:%i", sec, cgs.voteString, cgs.voteYes, cgs.voteNo); CG_DrawSmallString( cgs.screenXmin , 58, s, 1.0F ); s = "or press ESC then click Vote"; CG_DrawSmallString( 0, 58 + SMALLCHAR_HEIGHT + 2, s, 1.0F ); + /* #else s = va("VOTE(%i):%s yes:%i no:%i", sec, cgs.voteString, cgs.voteYes, cgs.voteNo ); CG_DrawSmallString( cgs.screenXmin , 58, s, 1.0F ); #endif + */ } /* @@ -2441,7 +2451,7 @@ static void CG_DrawAmmoWarning( void ) { } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================= CG_DrawProxWarning @@ -2473,7 +2483,7 @@ static void CG_DrawProxWarning( void ) { w = CG_DrawStrlen( s , UI_BIGFONT);// * BIGCHAR_WIDTH; CG_DrawBigStringColor( 320 - w / 2, 64 + BIGCHAR_HEIGHT, s, g_color_table[ColorIndex(COLOR_RED)] ); } -#endif +//#endif /* @@ -2530,7 +2540,7 @@ static void CG_DrawWarmup( void ) { case GT_CTF: s = "Capture the Flag"; break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case GT_1FCTF: s = "One Flag CTF"; break; @@ -2540,7 +2550,7 @@ static void CG_DrawWarmup( void ) { case GT_HARVESTER: s = "Harvester"; break; -#endif +//#endif default: s = ""; break; @@ -2646,19 +2656,19 @@ static void CG_Draw2D(stereoFrame_t stereoFrame) CG_DrawAmmoWarning(); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK CG_DrawProxWarning(); -#endif +//#endif if(stereoFrame == STEREO_CENTER) CG_DrawCrosshair(); CG_DrawCrosshairNames(); CG_DrawWeaponSelect(); -#ifndef MISSIONPACK +//#ifndef MISSIONPACK CG_DrawHoldableItem(); -#else - //CG_DrawPersistantPowerup(); -#endif +//#else + CG_DrawPersistantPowerup(); +//#endif CG_DrawReward(); } } diff --git a/code/cgame/cg_ents.c b/code/cgame/cg_ents.c index 98a1e083c1..89478bb236 100644 --- a/code/cgame/cg_ents.c +++ b/code/cgame/cg_ents.c @@ -704,19 +704,19 @@ 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 +//#ifdef MISSIONPACK trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.weaponHoverSound ); -#endif +//#endif } -#ifdef MISSIONPACK +//#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 +//#endif // add to refresh list trap_R_AddRefEntityToScene(&ent); @@ -1217,15 +1217,12 @@ CG_TeamBase */ static void CG_TeamBase( centity_t *cent ) { refEntity_t model; -#ifdef MISSIONPACK +//#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; @@ -1243,7 +1240,7 @@ static void CG_TeamBase( centity_t *cent ) { } trap_R_AddRefEntityToScene( &model ); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if ( cgs.gametype == GT_OBELISK ) { // show the obelisk memset(&model, 0, sizeof(model)); @@ -1360,7 +1357,7 @@ static void CG_TeamBase( centity_t *cent ) { } trap_R_AddRefEntityToScene( &model ); } -#endif +//#endif } /* diff --git a/code/cgame/cg_event.c b/code/cgame/cg_event.c index 752cdddf77..4a46067ed7 100644 --- a/code/cgame/cg_event.c +++ b/code/cgame/cg_event.c @@ -146,11 +146,11 @@ static void CG_Obituary( entityState_t *ent ) { if (attacker == target) { gender = ci->gender; switch (mod) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case MOD_KAMIKAZE: message = "goes out with a bang"; break; -#endif +//#endif case MOD_GRENADE_SPLASH: if ( gender == GENDER_FEMALE ) message = "tripped on her own grenade"; @@ -178,7 +178,7 @@ static void CG_Obituary( entityState_t *ent ) { case MOD_BFG_SPLASH: message = "should have used a smaller gun"; break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case MOD_PROXIMITY_MINE: if( gender == GENDER_FEMALE ) { message = "found her prox mine"; @@ -188,7 +188,7 @@ static void CG_Obituary( entityState_t *ent ) { message = "found his prox mine"; } break; -#endif +//#endif default: if ( gender == GENDER_FEMALE ) message = "killed herself"; @@ -291,7 +291,7 @@ static void CG_Obituary( entityState_t *ent ) { message = "was blasted by"; message2 = "'s BFG"; break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case MOD_NAIL: message = "was nailed by"; break; @@ -310,7 +310,7 @@ static void CG_Obituary( entityState_t *ent ) { case MOD_JUICED: message = "was juiced by"; break; -#endif +//#endif case MOD_HMG: message = "was heavy machinegunned by"; break; @@ -382,7 +382,7 @@ static void CG_UseItem( centity_t *cent ) { trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.medkitSound ); break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case HI_KAMIKAZE: break; @@ -391,7 +391,7 @@ static void CG_UseItem( centity_t *cent ) { case HI_INVULNERABILITY: trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useInvulnerabilitySound ); break; -#endif +//#endif } } @@ -742,7 +742,7 @@ 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 +//#ifdef MISSIONPACK switch (item->giTag ) { case PW_SCOUT: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.scoutSound ); @@ -757,7 +757,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.ammoregenSound ); break; } -#endif +//#endif } else { trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound, qfalse ) ); } @@ -1099,19 +1099,19 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { } else { if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (cgs.gametype == GT_1FCTF) CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound ); else -#endif +//#endif CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound ); } else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (cgs.gametype == GT_1FCTF) CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound ); else -#endif +//#endif CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound ); } } @@ -1122,24 +1122,24 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { } else { if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (cgs.gametype == GT_1FCTF) CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound ); else -#endif +//#endif CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound ); } else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (cgs.gametype == GT_1FCTF) CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound ); else -#endif +//#endif CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound ); } } break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case GTS_REDOBELISK_ATTACKED: // Overload: red obelisk is being attacked if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) { CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound ); @@ -1150,7 +1150,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound ); } break; -#endif +//#endif case GTS_REDTEAM_SCORED: CG_AddBufferedSound(cgs.media.redScoredSound); @@ -1167,11 +1167,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { case GTS_TEAMS_ARE_TIED: CG_AddBufferedSound( cgs.media.teamsTiedSound ); break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case GTS_KAMIKAZE: trap_S_StartLocalSound(cgs.media.kamikazeFarSound, CHAN_ANNOUNCER); break; -#endif +//#endif default: break; } diff --git a/code/cgame/cg_info.c b/code/cgame/cg_info.c index e365ad9eeb..9adc0d8957 100644 --- a/code/cgame/cg_info.c +++ b/code/cgame/cg_info.c @@ -252,7 +252,7 @@ void CG_DrawInformation( void ) { case GT_CTF: s = "Capture The Flag"; break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case GT_1FCTF: s = "One Flag CTF"; break; @@ -262,7 +262,7 @@ void CG_DrawInformation( void ) { case GT_HARVESTER: s = "Harvester"; break; -#endif +//#endif default: s = "Unknown Gametype"; break; diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index ae8875d2e9..8dcab3d843 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -559,10 +559,10 @@ typedef struct { int spectatorOffset; // current offset from start int spectatorPaintLen; // current offset from start -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // skull trails skulltrail_t skulltrails[MAX_CLIENTS]; -#endif +//#endif // centerprinting int centerPrintTime; @@ -681,12 +681,12 @@ typedef struct { qhandle_t charsetPropB; qhandle_t whiteShader; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK qhandle_t redCubeModel; qhandle_t blueCubeModel; qhandle_t redCubeIcon; qhandle_t blueCubeIcon; -#endif +//#endif qhandle_t redFlagModel; qhandle_t blueFlagModel; qhandle_t neutralFlagModel; @@ -705,7 +705,7 @@ typedef struct { qhandle_t blueFlagBaseModel; qhandle_t neutralFlagBaseModel; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK qhandle_t overloadBaseModel; qhandle_t overloadTargetModel; qhandle_t overloadLightsModel; @@ -715,7 +715,7 @@ typedef struct { qhandle_t harvesterRedSkin; qhandle_t harvesterBlueSkin; qhandle_t harvesterNeutralModel; -#endif +//#endif qhandle_t armorModel; qhandle_t armorIcon; @@ -785,10 +785,10 @@ typedef struct { qhandle_t battleSuitShader; qhandle_t battleWeaponShader; qhandle_t hastePuffShader; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK qhandle_t redKamikazeShader; qhandle_t blueKamikazeShader; -#endif +//#endif // weapon effect models qhandle_t bulletFlashModel; @@ -1012,7 +1012,7 @@ typedef struct { sfxHandle_t countPrepareSound; sfxHandle_t countPrepareTeamSound; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // new stuff qhandle_t patrolShader; qhandle_t assaultShader; @@ -1033,7 +1033,7 @@ typedef struct { qhandle_t cursor; qhandle_t selectCursor; qhandle_t sizeCursor; -#endif +//#endif sfxHandle_t regenSound; sfxHandle_t protectSound; @@ -1283,7 +1283,7 @@ extern vmCvar_t cg_oldRail; extern vmCvar_t cg_oldRocket; extern vmCvar_t cg_oldPlasma; extern vmCvar_t cg_trueLightning; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK extern vmCvar_t cg_redTeamName; extern vmCvar_t cg_blueTeamName; extern vmCvar_t cg_currentSelectedPlayer; @@ -1295,7 +1295,7 @@ extern vmCvar_t cg_singlePlayerActive; extern vmCvar_t cg_recordSPDemo; extern vmCvar_t cg_recordSPDemoName; extern vmCvar_t cg_obeliskRespawnDelay; -#endif +//#endif //ttf extern vmCvar_t cg_forceBitmapFonts; extern vmCvar_t cg_consoleFont; @@ -1590,7 +1590,7 @@ void CG_ImpactMark( qhandle_t markShader, void CG_InitLocalEntities( void ); localEntity_t *CG_AllocLocalEntity( void ); void CG_AddLocalEntities( void ); -void CG_AddRefEntity (const refEntity_t *re); +//void CG_AddRefEntity (const refEntity_t *re); // // cg_effects.c // diff --git a/code/cgame/cg_localents.c b/code/cgame/cg_localents.c index 4ecc64cece..99eca9bdb4 100644 --- a/code/cgame/cg_localents.c +++ b/code/cgame/cg_localents.c @@ -545,7 +545,7 @@ static void CG_AddSpriteExplosion( localEntity_t *le ) { } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ==================== CG_AddKamikaze @@ -721,7 +721,7 @@ void CG_AddRefEntity( localEntity_t *le ) { trap_R_AddRefEntityToScene( &le->refEntity ); } -#endif +//#endif /* =================== CG_AddScorePlum @@ -900,7 +900,7 @@ void CG_AddDamagePlum( localEntity_t *le ) { // purple VectorSet(re->shaderRGBA, 0x55, 0xa8, 0x8b); break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case MOD_NAIL: // turquoise VectorSet(re->shaderRGBA, 0x00, 0xaf, 0x7f); @@ -913,7 +913,7 @@ void CG_AddDamagePlum( localEntity_t *le ) { // light grey VectorSet(re->shaderRGBA, 0xaf, 0xaf, 0xaf); break; -#endif +//#endif case MOD_HMG: // dark yellowish orange VectorSet(re->shaderRGBA, 0xaf, 0xaf, 0x00); @@ -1045,7 +1045,7 @@ void CG_AddLocalEntities( void ) { CG_AddDamagePlum( le ); break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case LE_KAMIKAZE: CG_AddKamikaze( le ); break; @@ -1058,7 +1058,7 @@ void CG_AddLocalEntities( void ) { case LE_SHOWREFENTITY: CG_AddRefEntity( le ); break; -#endif +//#endif } } } diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 9905ed334c..8df497df38 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -201,7 +201,7 @@ vmCvar_t cg_oldRocket; vmCvar_t cg_oldPlasma; vmCvar_t cg_trueLightning; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK vmCvar_t cg_redTeamName; vmCvar_t cg_blueTeamName; vmCvar_t cg_currentSelectedPlayer; @@ -213,7 +213,7 @@ vmCvar_t cg_singlePlayerActive; vmCvar_t cg_recordSPDemo; vmCvar_t cg_recordSPDemoName; vmCvar_t cg_obeliskRespawnDelay; -#endif +//#endif // ttf vmCvar_t cg_forceBitmapFonts; vmCvar_t cg_consoleFont; @@ -368,7 +368,7 @@ static cvarTable_t cvarTable[] = { { &cg_paused, "cl_paused", "0", CVAR_ROM }, { &cg_blood, "com_blood", "1", CVAR_ARCHIVE }, { &cg_synchronousClients, "g_synchronousClients", "0", CVAR_SYSTEMINFO }, -#ifdef MISSIONPACK +//#ifdef MISSIONPACK { &cg_redTeamName, "g_redteam", DEFAULT_REDTEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, { &cg_blueTeamName, "g_blueteam", DEFAULT_BLUETEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, { &cg_currentSelectedPlayer, "cg_currentSelectedPlayer", "0", CVAR_ARCHIVE}, @@ -381,7 +381,7 @@ static cvarTable_t cvarTable[] = { { &cg_recordSPDemoName, "ui_recordSPDemoName", "", CVAR_ARCHIVE}, { &cg_obeliskRespawnDelay, "g_obeliskRespawnDelay", "10", CVAR_SERVERINFO}, { &cg_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE}, -#endif +//#endif { &cg_cameraOrbit, "cg_cameraOrbit", "0", CVAR_CHEAT}, { &cg_cameraOrbitDelay, "cg_cameraOrbitDelay", "50", CVAR_ARCHIVE}, { &cg_timescaleFadeEnd, "cg_timescaleFadeEnd", "1", 0}, @@ -757,7 +757,7 @@ static void CG_RegisterAnnouncerSounds (void) cgs.media.eCapturedSound = trap_S_RegisterSound(va("%s/e_captured.ogg", baseDir), qtrue); - if ((cgs.gametype == GT_CTF /*|| cgs.gametype == GT_1FCTF + if ((cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF/* || cgs.gametype == GT_CTFS || cgs.gametype == GT_NTF*/) || cg_buildScript.integer) { @@ -850,14 +850,14 @@ static void CG_RegisterSounds( void ) { cgs.media.takenYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_yourteam.wav", qtrue ); cgs.media.takenOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_opponent.wav", qtrue ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( cgs.gametype == GT_1FCTF || cg_buildScript.integer ) { cgs.media.neutralFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qtrue ); // FIXME: not in QL cgs.media.yourTeamTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_1flag.wav", qtrue ); cgs.media.enemyTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_1flag.wav", qtrue ); } -#endif +//#endif } cgs.media.tracerSound = trap_S_RegisterSound( "sound/weapons/machinegun/buletby1.wav", qfalse ); cgs.media.selectSound = trap_S_RegisterSound( "sound/weapons/change.wav", qfalse ); @@ -867,7 +867,7 @@ static void CG_RegisterSounds( void ) { cgs.media.gibSound[i] = trap_S_RegisterSound(va("sound/misc/electrogib_0%d.ogg", i + 1), qfalse); cgs.media.gibBounceSound[i] = trap_S_RegisterSound(va("sound/misc/electrogib_bounce_0%d.ogg", i + 1), qfalse); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK cgs.media.useInvulnerabilitySound = trap_S_RegisterSound( "sound/items/invul_activate.wav", qfalse ); cgs.media.invulnerabilityImpactSound1 = trap_S_RegisterSound( "sound/items/invul_impact_01.wav", qfalse ); cgs.media.invulnerabilityImpactSound2 = trap_S_RegisterSound( "sound/items/invul_impact_02.wav", qfalse ); @@ -878,11 +878,11 @@ static void CG_RegisterSounds( void ) { cgs.media.obeliskHitSound3 = trap_S_RegisterSound( "sound/items/obelisk_hit_03.wav", qfalse ); cgs.media.obeliskRespawnSound = trap_S_RegisterSound( "sound/items/obelisk_respawn.wav", qfalse ); - cgs.media.ammoregenSound = trap_S_RegisterSound("sound/items/cl_ammoregen.wav", qfalse); - cgs.media.doublerSound = trap_S_RegisterSound("sound/items/cl_doubler.wav", qfalse); - cgs.media.guardSound = trap_S_RegisterSound("sound/items/cl_guard.wav", qfalse); - cgs.media.scoutSound = trap_S_RegisterSound("sound/items/cl_scout.wav", qfalse); -#endif + cgs.media.ammoregenSound = trap_S_RegisterSound("sound/items/ammoregen.wav", qfalse); + cgs.media.doublerSound = trap_S_RegisterSound("sound/items/damage.wav", qfalse); + cgs.media.guardSound = trap_S_RegisterSound("sound/items/guard.wav", qfalse); + cgs.media.scoutSound = trap_S_RegisterSound("sound/items/scout.wav", qfalse); +//#endif cgs.media.teleInSound = trap_S_RegisterSound( "sound/world/telein.wav", qfalse ); cgs.media.teleOutSound = trap_S_RegisterSound( "sound/world/teleout.wav", qfalse ); @@ -1074,7 +1074,7 @@ static void CG_RegisterGraphics( void ) { cgs.media.regenShader = trap_R_RegisterShader("powerups/regen" ); cgs.media.hastePuffShader = trap_R_RegisterShader("hasteSmokePuff" ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( cgs.gametype == GT_HARVESTER || cg_buildScript.integer ) { cgs.media.redCubeModel = trap_R_RegisterModel( "models/powerups/orb/r_orb.md3" ); cgs.media.blueCubeModel = trap_R_RegisterModel( "models/powerups/orb/b_orb.md3" ); @@ -1083,9 +1083,7 @@ static void CG_RegisterGraphics( void ) { } if ( cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF || cgs.gametype == GT_HARVESTER || cg_buildScript.integer ) { -#else - if ( cgs.gametype == GT_CTF || cg_buildScript.integer ) { -#endif + cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag.md3" ); cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" ); cgs.media.redFlagShader[0] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/red_flag_at_base.png" ); @@ -1094,7 +1092,7 @@ static void CG_RegisterGraphics( void ) { cgs.media.blueFlagShader[0] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/blue_flag_at_base.png" ); cgs.media.blueFlagShader[1] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/blue_flag_taken.png" ); cgs.media.blueFlagShader[2] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/blue_flag_dropped.png" ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK cgs.media.flagPoleModel = trap_R_RegisterModel( "models/flag2/flagpole.md3" ); cgs.media.flagFlapModel = trap_R_RegisterModel( "models/flag2/flagflap3.md3" ); @@ -1105,10 +1103,10 @@ static void CG_RegisterGraphics( void ) { cgs.media.redFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/red_base.md3" ); cgs.media.blueFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/blue_base.md3" ); cgs.media.neutralFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/ntrl_base.md3" ); -#endif +//#endif } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( cgs.gametype == GT_1FCTF || cg_buildScript.integer ) { cgs.media.neutralFlagModel = trap_R_RegisterModel( "models/flags/n_flag.md3" ); cgs.media.flagShader[0] = trap_R_RegisterShaderNoMip( "icons/iconf_neutral1" ); @@ -1117,31 +1115,37 @@ static void CG_RegisterGraphics( void ) { cgs.media.flagShader[3] = trap_R_RegisterShaderNoMip( "icons/iconf_neutral3" ); } - if ( cgs.gametype == GT_OBELISK || cg_buildScript.integer ) { + //if ( cgs.gametype == GT_OBELISK || cg_buildScript.integer ) { + /* cgs.media.rocketExplosionShader = trap_R_RegisterShader("rocketExplosion"); cgs.media.overloadBaseModel = trap_R_RegisterModel( "models/powerups/overload_base.md3" ); cgs.media.overloadTargetModel = trap_R_RegisterModel( "models/powerups/overload_target.md3" ); cgs.media.overloadLightsModel = trap_R_RegisterModel( "models/powerups/overload_lights.md3" ); cgs.media.overloadEnergyModel = trap_R_RegisterModel( "models/powerups/overload_energy.md3" ); - } + */ + // Hack lol + cgs.media.rocketExplosionShader = trap_R_RegisterShader("rocketExplosion"); + cgs.media.overloadBaseModel = trap_R_RegisterModel( "models/powerups/obelisk/obelisk.md3" ); + cgs.media.overloadTargetModel = trap_R_RegisterModel( "models/powerups/obelisk/obelisk.md3" ); + cgs.media.overloadLightsModel = trap_R_RegisterModel( "models/powerups/harvester/harvester.md3" ); + cgs.media.overloadEnergyModel = trap_R_RegisterModel( "models/powerups/overload_energy.md3" ); - if ( cgs.gametype == GT_HARVESTER || cg_buildScript.integer ) { - cgs.media.harvesterModel = trap_R_RegisterModel( "models/powerups/harvester/harvester.md3" ); - cgs.media.harvesterRedSkin = trap_R_RegisterSkin( "models/powerups/harvester/red.skin" ); - cgs.media.harvesterBlueSkin = trap_R_RegisterSkin( "models/powerups/harvester/blue.skin" ); - cgs.media.harvesterNeutralModel = trap_R_RegisterModel( "models/powerups/obelisk/obelisk.md3" ); - } + + cgs.media.harvesterModel = trap_R_RegisterModel( "models/powerups/harvester/harvester.md3" ); + cgs.media.harvesterRedSkin = trap_R_RegisterSkin( "models/powerups/harvester/red.skin" ); + cgs.media.harvesterBlueSkin = trap_R_RegisterSkin( "models/powerups/harvester/blue.skin" ); + cgs.media.harvesterNeutralModel = trap_R_RegisterModel( "models/powerups/obelisk/obelisk.md3" ); cgs.media.redKamikazeShader = trap_R_RegisterShader( "models/weaphits/kamikred" ); cgs.media.dustPuffShader = trap_R_RegisterShader("hasteSmokePuff" ); -#endif +//#endif cgs.media.friendShader = trap_R_RegisterShader( "sprites/friend" ); cgs.media.redQuadShader = trap_R_RegisterShader("powerups/blueflag" ); cgs.media.teamStatusBar = trap_R_RegisterShader( "gfx/2d/colorbar.tga" ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK cgs.media.blueKamikazeShader = trap_R_RegisterShader( "models/weaphits/kamikblu" ); -#endif +//#endif cgs.media.armorModel = trap_R_RegisterModel( "models/powerups/armor/armor_yel.md3" ); @@ -1243,7 +1247,7 @@ static void CG_RegisterGraphics( void ) { cgs.gameModels[i] = trap_R_RegisterModel( modelName ); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // new stuff cgs.media.patrolShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/patrol.tga"); cgs.media.assaultShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/assault.tga"); @@ -1256,10 +1260,10 @@ static void CG_RegisterGraphics( void ) { cgs.media.cursor = trap_R_RegisterShaderNoMip( "menu/art/3_cursor2" ); cgs.media.sizeCursor = trap_R_RegisterShaderNoMip( "ui/assets/sizecursor.tga" ); cgs.media.selectCursor = trap_R_RegisterShaderNoMip( "ui/assets/selectcursor.tga" ); - cgs.media.flagShaders[0] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_in_base.tga"); - cgs.media.flagShaders[1] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_capture.tga"); - cgs.media.flagShaders[2] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_missing.tga"); -#endif + cgs.media.flagShaders[0] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/flag_at_base.png" ); + cgs.media.flagShaders[1] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/flag_taken.png" ); + cgs.media.flagShaders[2] = trap_R_RegisterShaderNoMip( "gfx/2d/flag_status/flag_dropped.png" ); +//#endif cgs.media.powerupIncoming = trap_R_RegisterShaderNoMip("gfx/2d/powerup/incoming"); cgs.media.regenAvailable = trap_R_RegisterShaderNoMip("gfx/2d/powerup/regen"); cgs.media.quadAvailable = trap_R_RegisterShaderNoMip("gfx/2d/powerup/quad"); diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index 2928471a90..0e60548081 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -748,7 +748,7 @@ static void CG_LoadClientInfo( int clientNum, clientInfo_t *ci ) { trap_Cvar_Set( "r_vertexlight", "0" ); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( cgs.gametype >= GT_TEAM) { if( ci->team == TEAM_BLUE ) { Q_strncpyz(teamname, cg_blueTeamName.string, sizeof(teamname) ); @@ -759,7 +759,7 @@ static void CG_LoadClientInfo( int clientNum, clientInfo_t *ci ) { if( teamname[0] ) { strcat( teamname, "/" ); } -#endif +//#endif modelloaded = qtrue; if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ) ) { if ( cg_buildScript.integer ) { @@ -1784,7 +1784,7 @@ static void CG_HasteTrail( centity_t *cent ) { smoke->leType = LE_SCALE_FADE; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* =============== CG_BreathPuffs @@ -1869,7 +1869,7 @@ static void CG_DustTrail( centity_t *cent ) { cgs.media.dustPuffShader ); } -#endif +//#endif /* =============== @@ -2014,7 +2014,7 @@ static void CG_PlayerFlag( centity_t *cent, qhandle_t hSkin, refEntity_t *torso } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* =============== CG_PlayerTokens @@ -2082,7 +2082,7 @@ static void CG_PlayerTokens( centity_t *cent, int renderfx ) { VectorCopy(trail->positions[i], origin); } } -#endif +//#endif /* @@ -2499,14 +2499,14 @@ void CG_Player( centity_t *cent ) { int renderfx; qboolean shadow; float shadowPlane; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK refEntity_t skull; refEntity_t powerup; int t; float c; float angle; vec3_t dir, angles; -#endif +//#endif qboolean darken; // the client number is stored in clientNum. It can't be derived @@ -2565,11 +2565,11 @@ void CG_Player( centity_t *cent ) { renderfx |= RF_SHADOW_PLANE; } renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( cgs.gametype == GT_HARVESTER ) { CG_PlayerTokens( cent, renderfx ); } -#endif +//#endif // // add the legs // @@ -2621,7 +2621,7 @@ void CG_Player( centity_t *cent ) { CG_AddRefEntityWithPowerups( &torso, ¢->currentState, ci->team ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( cent->currentState.eFlags & EF_KAMIKAZE ) { memset( &skull, 0, sizeof(skull) ); @@ -2827,7 +2827,7 @@ void CG_Player( centity_t *cent ) { } trap_R_AddRefEntityToScene( &powerup ); } -#endif // MISSIONPACK +//#endif // MISSIONPACK // // add the head @@ -2853,11 +2853,11 @@ void CG_Player( centity_t *cent ) { CG_AddRefEntityWithPowerups( &head, ¢->currentState, ci->team ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK CG_BreathPuffs(cent, &head); CG_DustTrail(cent); -#endif +//#endif // // add the gun / barrel / flash diff --git a/code/cgame/cg_predict.c b/code/cgame/cg_predict.c index 56d2fc0ae9..9a6edf6739 100644 --- a/code/cgame/cg_predict.c +++ b/code/cgame/cg_predict.c @@ -286,13 +286,13 @@ static void CG_TouchItem( centity_t *cent ) { // Special case for flags. // We don't predict touching our own flag -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( cgs.gametype == GT_1FCTF ) { if( item->giType == IT_TEAM && item->giTag != PW_NEUTRALFLAG ) { return; } } -#endif +//#endif if( cgs.gametype == GT_CTF ) { if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED && item->giType == IT_TEAM && item->giTag == PW_REDFLAG) diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c index 71d18b5478..f5bf80e438 100644 --- a/code/cgame/cg_servercmds.c +++ b/code/cgame/cg_servercmds.c @@ -234,12 +234,12 @@ void CG_SetConfigValues( void ) { cgs.redflag = s[0] - '0'; cgs.blueflag = s[1] - '0'; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if( cgs.gametype == GT_1FCTF ) { s = CG_ConfigString( CS_FLAGSTATUS ); cgs.flagStatus = s[0] - '0'; } -#endif +//#endif cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) ); } @@ -326,9 +326,9 @@ static void CG_ConfigStringModified( void ) { cgs.voteModified = qtrue; } else if ( num == CS_VOTE_STRING ) { Q_strncpyz( cgs.voteString, str, sizeof( cgs.voteString ) ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER ); -#endif //MISSIONPACK +//#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; @@ -340,9 +340,9 @@ 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[0] ) ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER ); -#endif +//#endif } else if ( num == CS_INTERMISSION ) { cg.intermissionStarted = atoi( str ); } else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) { @@ -360,11 +360,11 @@ static void CG_ConfigStringModified( void ) { cgs.redflag = str[0] - '0'; cgs.blueflag = str[1] - '0'; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if( cgs.gametype == GT_1FCTF ) { cgs.flagStatus = str[0] - '0'; } -#endif +//#endif } else if ( num == CS_SHADERSTATE ) { CG_ShaderStateChanged(); @@ -1018,7 +1018,7 @@ static void CG_ServerCommand( void ) { if ( !strcmp( cmd, "print" ) ) { CG_Printf( "%s", CG_Argv(1) ); -#ifdef MISSIONPACK +//#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 )) { @@ -1026,7 +1026,7 @@ static void CG_ServerCommand( void ) { } else if ( !Q_stricmpn( cmd, "vote passed", 11 ) || !Q_stricmpn( cmd, "team vote passed", 16 ) ) { trap_S_StartLocalSound( cgs.media.votePassed, CHAN_ANNOUNCER ); } -#endif +//#endif return; } diff --git a/code/cgame/cg_weapons.c b/code/cgame/cg_weapons.c index ef49a095c0..7041d3fab5 100644 --- a/code/cgame/cg_weapons.c +++ b/code/cgame/cg_weapons.c @@ -1165,11 +1165,11 @@ 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 +//#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 +//#endif } return angle; diff --git a/code/game/ai_chat.c b/code/game/ai_chat.c index 4f954b5246..032929e0bd 100644 --- a/code/game/ai_chat.c +++ b/code/game/ai_chat.c @@ -265,13 +265,13 @@ char *BotWeaponNameForMeansOfDeath(int mod) { case MOD_LIGHTNING: return "Lightning Gun"; case MOD_BFG: case MOD_BFG_SPLASH: return "BFG10K"; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case MOD_NAIL: return "Nailgun"; case MOD_CHAINGUN: return "Chaingun"; case MOD_PROXIMITY_MINE: return "Proximity Launcher"; case MOD_KAMIKAZE: return "Kamikaze"; case MOD_JUICED: return "Prox mine"; -#endif +//#endif case MOD_HMG: return "Heavy Machinegun"; case MOD_GRAPPLE: return "Grapple"; default: return "[unknown weapon]"; @@ -300,11 +300,12 @@ char *BotRandomWeaponName(void) { case 5: return "Plasmagun"; case 6: return "Railgun"; case 7: return "Lightning Gun"; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case 8: return "Nailgun"; case 9: return "Chaingun"; case 10: return "Proximity Launcher"; -#endif +//#endif + case 11: return "Heavy Machinegun"; default: return "BFG10K"; } } @@ -600,10 +601,10 @@ int BotChat_Death(bot_state_t *bs) { BotAI_BotInitialChat(bs, "death_suicide", BotRandomOpponentName(bs), NULL); else if (bs->botdeathtype == MOD_TELEFRAG) BotAI_BotInitialChat(bs, "death_telefrag", name, NULL); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (bs->botdeathtype == MOD_KAMIKAZE && trap_BotNumInitialChats(bs->cs, "death_kamikaze")) BotAI_BotInitialChat(bs, "death_kamikaze", name, NULL); -#endif +//#endif else { if ((bs->botdeathtype == MOD_GAUNTLET || bs->botdeathtype == MOD_RAILGUN || @@ -696,10 +697,10 @@ int BotChat_Kill(bot_state_t *bs) { else if (bs->enemydeathtype == MOD_TELEFRAG) { BotAI_BotInitialChat(bs, "kill_telefrag", name, NULL); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (bs->botdeathtype == MOD_KAMIKAZE && trap_BotNumInitialChats(bs->cs, "kill_kamikaze")) BotAI_BotInitialChat(bs, "kill_kamikaze", name, NULL); -#endif +//#endif //choose between insult and praise else if (random() < trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_INSULT, 0, 1)) { BotAI_BotInitialChat(bs, "kill_insult", name, NULL); diff --git a/code/game/ai_cmd.c b/code/game/ai_cmd.c index 2944fb06d3..79e99378ce 100644 --- a/code/game/ai_cmd.c +++ b/code/game/ai_cmd.c @@ -96,7 +96,7 @@ void BotPrintTeamGoal(bot_state_t *bs) { BotAI_Print(PRT_MESSAGE, "%s: I'm gonna try to return the flag for %1.0f secs\n", netname, t); break; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case LTG_ATTACKENEMYBASE: { BotAI_Print(PRT_MESSAGE, "%s: I'm gonna attack the enemy base for %1.0f secs\n", netname, t); @@ -107,7 +107,7 @@ void BotPrintTeamGoal(bot_state_t *bs) { BotAI_Print(PRT_MESSAGE, "%s: I'm gonna harvest for %1.0f secs\n", netname, t); break; } -#endif +//#endif case LTG_DEFENDKEYAREA: { BotAI_Print(PRT_MESSAGE, "%s: I'm gonna defend a key area for %1.0f secs\n", netname, t); @@ -824,12 +824,12 @@ void BotMatch_GetFlag(bot_state_t *bs, bot_match_t *match) { if (!ctf_redflag.areanum || !ctf_blueflag.areanum) return; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (!ctf_neutralflag.areanum || !ctf_redflag.areanum || !ctf_blueflag.areanum) return; } -#endif +//#endif else { return; } @@ -875,12 +875,12 @@ void BotMatch_AttackEnemyBase(bot_state_t *bs, bot_match_t *match) { if (gametype == GT_CTF) { BotMatch_GetFlag(bs, match); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF || gametype == GT_OBELISK || gametype == GT_HARVESTER) { if (!redobelisk.areanum || !blueobelisk.areanum) return; } -#endif +//#endif else { return; } @@ -910,7 +910,7 @@ void BotMatch_AttackEnemyBase(bot_state_t *bs, bot_match_t *match) { #endif //DEBUG } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== BotMatch_Harvest @@ -952,7 +952,7 @@ void BotMatch_Harvest(bot_state_t *bs, bot_match_t *match) { BotPrintTeamGoal(bs); #endif //DEBUG } -#endif +//#endif /* ================== @@ -967,12 +967,12 @@ void BotMatch_RushBase(bot_state_t *bs, bot_match_t *match) { if (!ctf_redflag.areanum || !ctf_blueflag.areanum) return; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF || gametype == GT_HARVESTER) { if (!redobelisk.areanum || !blueobelisk.areanum) return; } -#endif +//#endif else { return; } @@ -1059,9 +1059,9 @@ void BotMatch_ReturnFlag(bot_state_t *bs, bot_match_t *match) { //if not in CTF mode if ( gametype != GT_CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK && gametype != GT_1FCTF -#endif +//#endif ) return; //if not addressed to this bot @@ -1426,7 +1426,7 @@ void BotMatch_WhatAreYouDoing(bot_state_t *bs, bot_match_t *match) { BotAI_BotInitialChat(bs, "returningflag", NULL); break; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case LTG_ATTACKENEMYBASE: { BotAI_BotInitialChat(bs, "attackingenemybase", NULL); @@ -1437,7 +1437,7 @@ void BotMatch_WhatAreYouDoing(bot_state_t *bs, bot_match_t *match) { BotAI_BotInitialChat(bs, "harvesting", NULL); break; } -#endif +//#endif default: { BotAI_BotInitialChat(bs, "roaming", NULL); @@ -1525,7 +1525,7 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) { "Heavy Armor", "Red Flag", "Blue Flag", -#ifdef MISSIONPACK +//#ifdef MISSIONPACK "Nailgun", "Prox Launcher", "Chaingun", @@ -1537,7 +1537,8 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) { "Red Obelisk", "Blue Obelisk", "Neutral Obelisk", -#endif +//#endif + "Heavy Machine Gun", NULL }; // @@ -1558,9 +1559,9 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) { } if (bestitem != -1) { if (gametype == GT_CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK || gametype == GT_1FCTF -#endif +//#endif ) { redtt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, ctf_redflag.areanum, TFL_DEFAULT); bluett = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, ctf_blueflag.areanum, TFL_DEFAULT); @@ -1574,7 +1575,7 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) { BotAI_BotInitialChat(bs, "location", nearbyitems[bestitem], NULL); } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_OBELISK || gametype == GT_HARVESTER) { redtt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, redobelisk.areanum, TFL_DEFAULT); bluett = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, blueobelisk.areanum, TFL_DEFAULT); @@ -1588,7 +1589,7 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) { BotAI_BotInitialChat(bs, "location", nearbyitems[bestitem], NULL); } } -#endif +//#endif else { BotAI_BotInitialChat(bs, "location", nearbyitems[bestitem], NULL); } @@ -1746,14 +1747,14 @@ void BotMatch_CTF(bot_state_t *bs, bot_match_t *match) { bs->flagstatuschanged = 1; } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (match->subtype & ST_1FCTFGOTFLAG) { trap_BotMatchVariable(match, NETNAME, netname, sizeof(netname)); bs->flagcarrier = ClientFromName(netname); } } -#endif +//#endif } void BotMatch_EnterGame(bot_state_t *bs, bot_match_t *match) { @@ -1826,7 +1827,7 @@ int BotMatchMessage(bot_state_t *bs, char *message) { BotMatch_GetFlag(bs, &match); break; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK //CTF & 1FCTF & Obelisk & Harvester case MSG_ATTACKENEMYBASE: { @@ -1839,7 +1840,7 @@ int BotMatchMessage(bot_state_t *bs, char *message) { BotMatch_Harvest(bs, &match); break; } -#endif +//#endif //CTF & 1FCTF & Harvester case MSG_RUSHBASE: //ctf rush to the base { diff --git a/code/game/ai_dmnet.c b/code/game/ai_dmnet.c index 9e478c1602..16e54798bd 100644 --- a/code/game/ai_dmnet.c +++ b/code/game/ai_dmnet.c @@ -195,9 +195,9 @@ int BotNearbyGoal(bot_state_t *bs, int tfl, bot_goal_t *ltg, float range) { if (BotGoForAir(bs, tfl, ltg, range)) return qtrue; // if the bot is carrying a flag or cubes if (BotCTFCarryingFlag(bs) -#ifdef MISSIONPACK +//#ifdef MISSIONPACK || Bot1FCTFCarryingFlag(bs) || BotHarvesterCarryingCubes(bs) -#endif +//#endif ) { //if the bot is just a few secs away from the base if (trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, @@ -834,7 +834,7 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal) } } #endif //CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (bs->ltgtype == LTG_GETFLAG) { //check for bot typing status message @@ -1030,7 +1030,7 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal) return qtrue; } } -#endif +//#endif //normal goal stuff return BotGetItemLongTermGoal(bs, tfl, goal); } @@ -1301,14 +1301,14 @@ int BotSelectActivateWeapon(bot_state_t *bs) { return WEAPONINDEX_PLASMAGUN; else if (bs->inventory[INVENTORY_LIGHTNING] > 0 && bs->inventory[INVENTORY_LIGHTNINGAMMO] > 0) return WEAPONINDEX_LIGHTNING; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (bs->inventory[INVENTORY_CHAINGUN] > 0 && bs->inventory[INVENTORY_BELT] > 0) return WEAPONINDEX_CHAINGUN; else if (bs->inventory[INVENTORY_NAILGUN] > 0 && bs->inventory[INVENTORY_NAILS] > 0) return WEAPONINDEX_NAILGUN; else if (bs->inventory[INVENTORY_PROXLAUNCHER] > 0 && bs->inventory[INVENTORY_MINES] > 0) return WEAPONINDEX_PROXLAUNCHER; -#endif +//#endif else if (bs->inventory[INVENTORY_GRENADELAUNCHER] > 0 && bs->inventory[INVENTORY_GRENADES] > 0) return WEAPONINDEX_GRENADE_LAUNCHER; else if (bs->inventory[INVENTORY_RAILGUN] > 0 && bs->inventory[INVENTORY_SLUGS] > 0) @@ -1885,7 +1885,7 @@ int AINode_Seek_LTG(bot_state_t *bs) range = 50; } #endif //CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (Bot1FCTFCarryingFlag(bs)) range = 50; @@ -1894,7 +1894,7 @@ int AINode_Seek_LTG(bot_state_t *bs) if (BotHarvesterCarryingCubes(bs)) range = 80; } -#endif +//#endif // if (BotNearbyGoal(bs, bs->tfl, &goal, range)) { trap_BotResetLastAvoidReach(bs->ms); @@ -2059,13 +2059,13 @@ int AINode_Battle_Fight(bot_state_t *bs) { VectorCopy(entinfo.origin, target); // if not a player enemy if (bs->enemy >= MAX_CLIENTS) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if attacking an obelisk if ( bs->enemy == redobelisk.entitynum || bs->enemy == blueobelisk.entitynum ) { target[2] += 16; } -#endif +//#endif } //update the reachability area and origin if possible areanum = BotPointAreaNum(target); @@ -2093,12 +2093,12 @@ int AINode_Battle_Fight(bot_state_t *bs) { } //if the enemy is not visible if (!BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (bs->enemy == redobelisk.entitynum || bs->enemy == blueobelisk.entitynum) { AIEnter_Battle_Chase(bs, "battle fight: obelisk out of sight"); return qfalse; } -#endif +//#endif if (BotWantsToChase(bs)) { AIEnter_Battle_Chase(bs, "battle fight: enemy out of sight"); return qfalse; @@ -2363,13 +2363,13 @@ int AINode_Battle_Retreat(bot_state_t *bs) { VectorCopy(entinfo.origin, target); // if not a player enemy if (bs->enemy >= MAX_CLIENTS) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if attacking an obelisk if ( bs->enemy == redobelisk.entitynum || bs->enemy == blueobelisk.entitynum ) { target[2] += 16; } -#endif +//#endif } //update the reachability area and origin if possible areanum = BotPointAreaNum(target); @@ -2411,7 +2411,7 @@ int AINode_Battle_Retreat(bot_state_t *bs) { range = 50; } #endif //CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (Bot1FCTFCarryingFlag(bs)) range = 50; @@ -2420,7 +2420,7 @@ int AINode_Battle_Retreat(bot_state_t *bs) { if (BotHarvesterCarryingCubes(bs)) range = 80; } -#endif +//#endif // if (BotNearbyGoal(bs, bs->tfl, &goal, range)) { trap_BotResetLastAvoidReach(bs->ms); @@ -2540,13 +2540,13 @@ int AINode_Battle_NBG(bot_state_t *bs) { VectorCopy(entinfo.origin, target); // if not a player enemy if (bs->enemy >= MAX_CLIENTS) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if attacking an obelisk if ( bs->enemy == redobelisk.entitynum || bs->enemy == blueobelisk.entitynum ) { target[2] += 16; } -#endif +//#endif } //update the reachability area and origin if possible areanum = BotPointAreaNum(target); diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c index 7eb692d63f..ccc6e27ae1 100644 --- a/code/game/ai_dmq3.c +++ b/code/game/ai_dmq3.c @@ -91,12 +91,12 @@ int max_bspmodelindex; //maximum BSP model index //CTF flag goals bot_goal_t ctf_redflag; bot_goal_t ctf_blueflag; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK bot_goal_t ctf_neutralflag; bot_goal_t redobelisk; bot_goal_t blueobelisk; bot_goal_t neutralobelisk; -#endif +//#endif #define MAX_ALTROUTEGOALS 32 @@ -225,10 +225,10 @@ qboolean EntityCarriesFlag(aas_entityinfo_t *entinfo) { return qtrue; if ( entinfo->powerups & ( 1 << PW_BLUEFLAG ) ) return qtrue; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( entinfo->powerups & ( 1 << PW_NEUTRALFLAG ) ) return qtrue; -#endif +//#endif return qfalse; } @@ -284,7 +284,7 @@ qboolean EntityHasQuad(aas_entityinfo_t *entinfo) { return qfalse; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== EntityHasKamikze @@ -338,7 +338,7 @@ int BotHarvesterCarryingCubes(bot_state_t *bs) { if (bs->inventory[INVENTORY_BLUECUBE] > 0) return qtrue; return qfalse; } -#endif +//#endif /* ================== @@ -361,7 +361,7 @@ BotSetTeamStatus ================== */ void BotSetTeamStatus(bot_state_t *bs) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int teamtask; aas_entityinfo_t entinfo; @@ -416,7 +416,7 @@ void BotSetTeamStatus(bot_state_t *bs) { break; } BotSetUserInfo(bs, "teamtask", va("%d", teamtask)); -#endif +//#endif } /* @@ -792,7 +792,7 @@ void BotCTFRetreatGoals(bot_state_t *bs) { } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== Bot1FCTFSeekGoals @@ -1319,7 +1319,7 @@ void BotHarvesterRetreatGoals(bot_state_t *bs) { return; } } -#endif +//#endif /* ================== @@ -1332,7 +1332,7 @@ void BotTeamGoals(bot_state_t *bs, int retreat) { if (gametype == GT_CTF) { BotCTFRetreatGoals(bs); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { Bot1FCTFRetreatGoals(bs); } @@ -1342,14 +1342,14 @@ void BotTeamGoals(bot_state_t *bs, int retreat) { else if (gametype == GT_HARVESTER) { BotHarvesterRetreatGoals(bs); } -#endif +//#endif } else { if (gametype == GT_CTF) { //decide what to do in CTF mode BotCTFSeekGoals(bs); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { Bot1FCTFSeekGoals(bs); } @@ -1359,7 +1359,7 @@ void BotTeamGoals(bot_state_t *bs, int retreat) { else if (gametype == GT_HARVESTER) { BotHarvesterSeekGoals(bs); } -#endif +//#endif } // reset the order time which is used to see if // we decided to refuse an order @@ -1536,14 +1536,14 @@ int BotSynonymContext(bot_state_t *bs) { context = CONTEXT_NORMAL|CONTEXT_NEARBYITEM|CONTEXT_NAMES; // if (gametype == GT_CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK || gametype == GT_1FCTF -#endif +//#endif ) { if (BotTeam(bs) == TEAM_RED) context |= CONTEXT_CTFREDTEAM; else context |= CONTEXT_CTFBLUETEAM; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_OBELISK) { if (BotTeam(bs) == TEAM_RED) context |= CONTEXT_OBELISKREDTEAM; else context |= CONTEXT_OBELISKBLUETEAM; @@ -1552,7 +1552,7 @@ int BotSynonymContext(bot_state_t *bs) { if (BotTeam(bs) == TEAM_RED) context |= CONTEXT_HARVESTERREDTEAM; else context |= CONTEXT_HARVESTERBLUETEAM; } -#endif +//#endif return context; } @@ -1620,7 +1620,7 @@ BotCheckItemPickup ================== */ void BotCheckItemPickup(bot_state_t *bs, int *oldinventory) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int offence, leader; if (gametype <= GT_TEAM) @@ -1705,7 +1705,7 @@ void BotCheckItemPickup(bot_state_t *bs, int *oldinventory) { bs->teamtaskpreference &= ~TEAMTP_ATTACKER; } } -#endif +//#endif } /* @@ -1766,15 +1766,15 @@ void BotUpdateInventory(bot_state_t *bs) { bs->inventory[INVENTORY_INVISIBILITY] = bs->cur_ps.powerups[PW_INVIS] != 0; bs->inventory[INVENTORY_REGEN] = bs->cur_ps.powerups[PW_REGEN] != 0; bs->inventory[INVENTORY_FLIGHT] = bs->cur_ps.powerups[PW_FLIGHT] != 0; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK bs->inventory[INVENTORY_SCOUT] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_SCOUT; bs->inventory[INVENTORY_GUARD] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_GUARD; bs->inventory[INVENTORY_DOUBLER] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_DOUBLER; bs->inventory[INVENTORY_AMMOREGEN] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_AMMOREGEN; -#endif +//#endif bs->inventory[INVENTORY_REDFLAG] = bs->cur_ps.powerups[PW_REDFLAG] != 0; bs->inventory[INVENTORY_BLUEFLAG] = bs->cur_ps.powerups[PW_BLUEFLAG] != 0; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK bs->inventory[INVENTORY_NEUTRALFLAG] = bs->cur_ps.powerups[PW_NEUTRALFLAG] != 0; if (BotTeam(bs) == TEAM_RED) { bs->inventory[INVENTORY_REDCUBE] = bs->cur_ps.generic1; @@ -1784,7 +1784,7 @@ void BotUpdateInventory(bot_state_t *bs) { bs->inventory[INVENTORY_REDCUBE] = 0; bs->inventory[INVENTORY_BLUECUBE] = bs->cur_ps.generic1; } -#endif +//#endif BotCheckItemPickup(bs, oldinventory); } @@ -1805,7 +1805,7 @@ void BotUpdateBattleInventory(bot_state_t *bs, int enemy) { //FIXME: add num visible enemies and num visible team mates to the inventory } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== BotUseKamikaze @@ -2023,7 +2023,7 @@ void BotUseInvulnerability(bot_state_t *bs) { } } } -#endif +//#endif /* ================== @@ -2034,10 +2034,10 @@ void BotBattleUseItems(bot_state_t *bs) { if (bs->inventory[INVENTORY_HEALTH] < 40) { if (bs->inventory[INVENTORY_TELEPORTER] > 0) { if (!BotCTFCarryingFlag(bs) -#ifdef MISSIONPACK +//#ifdef MISSIONPACK && !Bot1FCTFCarryingFlag(bs) && !BotHarvesterCarryingCubes(bs) -#endif +//#endif ) { trap_EA_Use(bs->client); } @@ -2048,10 +2048,10 @@ void BotBattleUseItems(bot_state_t *bs) { trap_EA_Use(bs->client); } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK BotUseKamikaze(bs); BotUseInvulnerability(bs); -#endif +//#endif } /* @@ -2273,7 +2273,7 @@ int BotWantsToRetreat(bot_state_t *bs) { if (BotCTFCarryingFlag(bs)) return qtrue; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { //if carrying the flag then always retreat if (Bot1FCTFCarryingFlag(bs)) @@ -2296,16 +2296,16 @@ int BotWantsToRetreat(bot_state_t *bs) { //if carrying cubes then always retreat if (BotHarvesterCarryingCubes(bs)) return qtrue; } -#endif +//#endif // if (bs->enemy >= 0) { BotEntityInfo(bs->enemy, &entinfo); // if the enemy is carrying a flag if (EntityCarriesFlag(&entinfo)) return qfalse; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if the enemy is carrying cubes if (EntityCarriesCubes(&entinfo)) return qfalse; -#endif +//#endif } //if the bot is getting the flag if (bs->ltgtype == LTG_GETFLAG) @@ -2333,7 +2333,7 @@ int BotWantsToChase(bot_state_t *bs) { if (EntityCarriesFlag(&entinfo)) return qtrue; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { //never chase if carrying the flag if (Bot1FCTFCarryingFlag(bs)) @@ -2360,7 +2360,7 @@ int BotWantsToChase(bot_state_t *bs) { // always chase if the enemy is carrying cubes if (EntityCarriesCubes(&entinfo)) return qtrue; } -#endif +//#endif //if the bot is getting the flag if (bs->ltgtype == LTG_GETFLAG) return qfalse; @@ -2413,7 +2413,7 @@ BotHasPersistantPowerupAndWeapon ================== */ int BotHasPersistantPowerupAndWeapon(bot_state_t *bs) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if the bot does not have a persistant powerup if (!bs->inventory[INVENTORY_SCOUT] && !bs->inventory[INVENTORY_GUARD] && @@ -2421,7 +2421,7 @@ int BotHasPersistantPowerupAndWeapon(bot_state_t *bs) { !bs->inventory[INVENTORY_AMMOREGEN] ) { return qfalse; } -#endif +//#endif //if the bot is very low on health if (bs->inventory[INVENTORY_HEALTH] < 60) return qfalse; //if the bot is low on health @@ -2961,7 +2961,7 @@ int BotFindEnemy(bot_state_t *bs, int curenemy) { else { cursquaredist = 0; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (gametype == GT_OBELISK) { vec3_t target; bot_goal_t *goal; @@ -2987,7 +2987,7 @@ int BotFindEnemy(bot_state_t *bs, int curenemy) { return qtrue; } } -#endif +//#endif // for (i = 0; i < level.maxclients; i++) { @@ -3205,7 +3205,7 @@ void BotVisibleTeamMatesAndEnemies(bot_state_t *bs, int *teammates, int *enemies } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== BotTeamCubeCarrierVisible @@ -3267,7 +3267,7 @@ int BotEnemyCubeCarrierVisible(bot_state_t *bs) { } return -1; } -#endif +//#endif /* ================== @@ -3295,13 +3295,13 @@ void BotAimAtEnemy(bot_state_t *bs) { if (bs->enemy >= MAX_CLIENTS) { //if the obelisk is visible VectorCopy(entinfo.origin, target); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if attacking an obelisk if ( bs->enemy == redobelisk.entitynum || bs->enemy == blueobelisk.entitynum ) { target[2] += 32; } -#endif +//#endif //aim at the obelisk VectorSubtract(target, bs->eye, dir); vectoangles(dir, bs->ideal_viewangles); @@ -3584,7 +3584,7 @@ void BotCheckAttack(bot_state_t *bs) { BotEntityInfo(attackentity, &entinfo); // if not attacking a player if (attackentity >= MAX_CLIENTS) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if attacking an obelisk if ( entinfo.number == redobelisk.entitynum || entinfo.number == blueobelisk.entitynum ) { @@ -3594,7 +3594,7 @@ void BotCheckAttack(bot_state_t *bs) { return; } } -#endif +//#endif } // reactiontime = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_REACTIONTIME, 0, 1); @@ -4782,9 +4782,9 @@ BotCheckEvents void BotCheckEvents(bot_state_t *bs, entityState_t *state) { int event; char buf[128]; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK aas_entityinfo_t entinfo; -#endif +//#endif //NOTE: this sucks, we're accessing the gentity_t directly //but there's no other fast way to do it right now @@ -4833,7 +4833,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) { bs->enemysuicide = qtrue; } // -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (gametype == GT_1FCTF) { // BotEntityInfo(target, &entinfo); @@ -4844,7 +4844,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) { } } } -#endif +//#endif break; } case EV_GLOBAL_SOUND: @@ -4866,13 +4866,13 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) { bs->flagstatuschanged = qtrue; } else*/ -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (!strcmp(buf, "sound/items/kamikazerespawn.wav" )) { //the kamikaze respawned so don't avoid it BotDontAvoid(bs, "Kamikaze"); } else -#endif +//#endif if (!strcmp(buf, "sound/items/poweruprespawn.wav")) { //powerup respawned... go get it BotGoForPowerups(bs); @@ -4915,7 +4915,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) { break; //see BotMatch_CTF } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { switch(state->eventParm) { case GTS_RED_CAPTURE: @@ -4946,7 +4946,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) { break; } } -#endif +//#endif break; } case EV_PLAYER_TELEPORT_IN: @@ -5045,12 +5045,12 @@ void BotCheckSnapshot(bot_state_t *bs) { //check for grenades the bot should avoid BotCheckForGrenades(bs, &state); // -#ifdef MISSIONPACK +//#ifdef MISSIONPACK //check for proximity mines which the bot should deactivate BotCheckForProxMines(bs, &state); //check for dead bodies with the kamikaze effect which should be gibbed BotCheckForKamikazeBody(bs, &state); -#endif +//#endif } //check the player state for events BotAI_GetEntityState(bs->client, &state); @@ -5146,7 +5146,7 @@ void BotSetupAlternativeRouteGoals(void) { if (altroutegoals_setup) return; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (gametype == GT_CTF) { if (trap_BotGetLevelItemGoal(-1, "Neutral Flag", &ctf_neutralflag) < 0) BotAI_Print(PRT_WARNING, "No alt routes without Neutral Flag\n"); @@ -5215,7 +5215,7 @@ void BotSetupAlternativeRouteGoals(void) { ALTROUTEGOAL_CLUSTERPORTALS| ALTROUTEGOAL_VIEWPORTALS); } -#endif +//#endif altroutegoals_setup = qtrue; } @@ -5447,7 +5447,7 @@ void BotSetupDeathmatchAI(void) { if (trap_BotGetLevelItemGoal(-1, "Blue Flag", &ctf_blueflag) < 0) BotAI_Print(PRT_WARNING, "CTF without Blue Flag\n"); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (trap_BotGetLevelItemGoal(-1, "Neutral Flag", &ctf_neutralflag) < 0) BotAI_Print(PRT_WARNING, "One Flag CTF without Neutral Flag\n"); @@ -5475,7 +5475,7 @@ void BotSetupDeathmatchAI(void) { BotAI_Print(PRT_WARNING, "Harvester without Neutral Obelisk\n"); BotSetEntityNumForGoalWithActivator(&neutralobelisk, "team_neutralobelisk"); } -#endif +//#endif max_bspmodelindex = 0; for (ent = trap_AAS_NextBSPEntity(0); ent; ent = trap_AAS_NextBSPEntity(ent)) { diff --git a/code/game/ai_dmq3.h b/code/game/ai_dmq3.h index bd7783cfaa..c2f04df67f 100644 --- a/code/game/ai_dmq3.h +++ b/code/game/ai_dmq3.h @@ -62,10 +62,10 @@ qboolean EntityIsDead(aas_entityinfo_t *entinfo); qboolean EntityIsInvisible(aas_entityinfo_t *entinfo); //returns true if the entity is shooting qboolean EntityIsShooting(aas_entityinfo_t *entinfo); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK //returns true if this entity has the kamikaze qboolean EntityHasKamikaze(aas_entityinfo_t *entinfo); -#endif +//#endif // set a user info key/value pair void BotSetUserInfo(bot_state_t *bs, char *key, char *value); // set the team status (offense, defense etc.) @@ -147,7 +147,7 @@ void BotCTFSeekGoals(bot_state_t *bs); //set ctf goals (defend base, get enemy flag) during retreat void BotCTFRetreatGoals(bot_state_t *bs); // -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int Bot1FCTFCarryingFlag(bot_state_t *bs); int BotHarvesterCarryingCubes(bot_state_t *bs); void Bot1FCTFSeekGoals(bot_state_t *bs); @@ -159,7 +159,7 @@ void BotHarvesterSeekGoals(bot_state_t *bs); void BotHarvesterRetreatGoals(bot_state_t *bs); int BotTeamCubeCarrierVisible(bot_state_t *bs); int BotEnemyCubeCarrierVisible(bot_state_t *bs); -#endif +//#endif //get a random alternate route goal towards the given base int BotGetAlternateRouteGoal(bot_state_t *bs, int base); //returns either the alternate route goal or the given goal @@ -198,9 +198,9 @@ extern vmCvar_t bot_challenge; extern bot_goal_t ctf_redflag; extern bot_goal_t ctf_blueflag; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK extern bot_goal_t ctf_neutralflag; extern bot_goal_t redobelisk; extern bot_goal_t blueobelisk; extern bot_goal_t neutralobelisk; -#endif +//#endif diff --git a/code/game/ai_main.c b/code/game/ai_main.c index 1d57035a4a..739cae49b1 100644 --- a/code/game/ai_main.c +++ b/code/game/ai_main.c @@ -288,7 +288,7 @@ void BotReportStatus(bot_state_t *bs) { else strcpy(flagstatus, S_COLOR_BLUE"F "); } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (Bot1FCTFCarryingFlag(bs)) { if (BotTeam(bs) == TEAM_RED) strcpy(flagstatus, S_COLOR_RED"F "); @@ -301,7 +301,7 @@ void BotReportStatus(bot_state_t *bs) { else Com_sprintf(flagstatus, sizeof(flagstatus), S_COLOR_BLUE"%2d", bs->inventory[INVENTORY_BLUECUBE]); } } -#endif +//#endif switch(bs->ltgtype) { case LTG_TEAMHELP: @@ -437,7 +437,7 @@ void BotSetInfoConfigString(bot_state_t *bs) { strcpy(carrying, "F "); } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (Bot1FCTFCarryingFlag(bs)) { strcpy(carrying, "F "); @@ -449,7 +449,7 @@ void BotSetInfoConfigString(bot_state_t *bs) { else Com_sprintf(carrying, sizeof(carrying), "%2d", bs->inventory[INVENTORY_BLUECUBE]); } } -#endif +//#endif switch(bs->ltgtype) { case LTG_TEAMHELP: @@ -1389,9 +1389,9 @@ int BotAILoadMap( int restart ) { return qtrue; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK void ProximityMine_Trigger( gentity_t *trigger, gentity_t *other, trace_t *trace ); -#endif +//#endif /* ================== @@ -1506,7 +1506,7 @@ int BotAIStartFrame(int time) { trap_BotLibUpdateEntity(i, NULL); continue; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // never link prox mine triggers if (ent->r.contents == CONTENTS_TRIGGER) { if (ent->touch == ProximityMine_Trigger) { @@ -1514,7 +1514,7 @@ int BotAIStartFrame(int time) { continue; } } -#endif +//#endif // memset(&state, 0, sizeof(bot_entitystate_t)); // diff --git a/code/game/ai_team.c b/code/game/ai_team.c index 78e25b0c05..c654f44976 100644 --- a/code/game/ai_team.c +++ b/code/game/ai_team.c @@ -130,25 +130,23 @@ int BotSortTeamMatesByBaseTravelTime(bot_state_t *bs, int *teammates, int maxtea int traveltimes[MAX_CLIENTS]; bot_goal_t *goal = NULL; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (gametype == GT_CTF || gametype == GT_1FCTF) -#else - if (gametype == GT_CTF) -#endif + { if (BotTeam(bs) == TEAM_RED) goal = &ctf_redflag; else goal = &ctf_blueflag; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else { if (BotTeam(bs) == TEAM_RED) goal = &redobelisk; else goal = &blueobelisk; } -#endif +//#endif numteammates = 0; for (i = 0; i < level.maxclients; i++) { trap_GetConfigstring(CS_PLAYERS+i, buf, sizeof(buf)); @@ -933,7 +931,7 @@ void BotTeamOrders(bot_state_t *bs) { } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== @@ -1886,7 +1884,7 @@ void BotHarvesterOrders(bot_state_t *bs) { } } } -#endif +//#endif /* ================== @@ -2015,7 +2013,7 @@ void BotTeamAI(bot_state_t *bs) { } break; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case GT_1FCTF: { if (bs->numteammates != numteammates || bs->flagstatuschanged || bs->forceorders) { @@ -2071,7 +2069,7 @@ void BotTeamAI(bot_state_t *bs) { } break; } -#endif +//#endif } } diff --git a/code/game/ai_vcmd.c b/code/game/ai_vcmd.c index a274bca79a..700a8315d2 100644 --- a/code/game/ai_vcmd.c +++ b/code/game/ai_vcmd.c @@ -75,12 +75,12 @@ void BotVoiceChat_GetFlag(bot_state_t *bs, int client, int mode) { if (!ctf_redflag.areanum || !ctf_blueflag.areanum) return; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if (gametype == GT_1FCTF) { if (!ctf_neutralflag.areanum || !ctf_redflag.areanum || !ctf_blueflag.areanum) return; } -#endif +//#endif else { return; } @@ -115,14 +115,14 @@ BotVoiceChat_Offense */ void BotVoiceChat_Offense(bot_state_t *bs, int client, int mode) { if ( gametype == GT_CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK || gametype == GT_1FCTF -#endif +//#endif ) { BotVoiceChat_GetFlag(bs, client, mode); return; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (gametype == GT_HARVESTER) { // bs->decisionmaker = client; @@ -141,7 +141,7 @@ void BotVoiceChat_Offense(bot_state_t *bs, int client, int mode) { BotRememberLastOrderedTask(bs); } else -#endif +//#endif { // bs->decisionmaker = client; @@ -170,7 +170,7 @@ BotVoiceChat_Defend ================== */ void BotVoiceChat_Defend(bot_state_t *bs, int client, int mode) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( gametype == GT_OBELISK || gametype == GT_HARVESTER) { // switch(BotTeam(bs)) { @@ -180,11 +180,11 @@ void BotVoiceChat_Defend(bot_state_t *bs, int client, int mode) { } } else -#endif +//#endif if (gametype == GT_CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK || gametype == GT_1FCTF -#endif +//#endif ) { // switch(BotTeam(bs)) { @@ -384,9 +384,9 @@ void BotVoiceChat_ReturnFlag(bot_state_t *bs, int client, int mode) { //if not in CTF mode if ( gametype != GT_CTF -#ifdef MISSIONPACK +//#ifdef MISSIONPACK && gametype != GT_1FCTF -#endif +//#endif ) { return; } diff --git a/code/game/bg_misc.c b/code/game/bg_misc.c index 13ed7574f5..33a95f9e15 100644 --- a/code/game/bg_misc.c +++ b/code/game/bg_misc.c @@ -838,7 +838,7 @@ Only in One Flag CTF games NULL, { "models/flags/n_flag.md3", NULL, NULL, NULL }, -/* icon */ "icons/iconf_neutral1", +/* icon */ "gfx/2d/flag_status/flag_at_base.png", /* pickup */ "Neutral Flag", 0, IT_TEAM, @@ -1094,9 +1094,9 @@ This needs to be the same for client side prediction and server use. */ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const playerState_t *ps ) { gitem_t *item; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int upperBound; -#endif +//#endif if ( ent->modelindex < 1 || ent->modelindex >= bg_numItems ) { Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: index out of range" ); @@ -1115,7 +1115,7 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play return qtrue; case IT_ARMOR: -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_SCOUT ) { return qfalse; } @@ -1131,21 +1131,17 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play if ( ps->stats[STAT_ARMOR] >= upperBound ) { return qfalse; } -#else - if ( ps->stats[STAT_ARMOR] >= ps->stats[STAT_MAX_HEALTH] * 2 ) { - return qfalse; - } -#endif + return qtrue; case IT_HEALTH: // small and mega healths will go over the max, otherwise // don't pick up if already at max -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) { } else -#endif +//#endif if ( item->quantity == 5 || item->quantity == 100 ) { if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] * 2 ) { return qfalse; @@ -1161,7 +1157,7 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play case IT_POWERUP: return qtrue; // powerups are always picked up -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case IT_PERSISTANT_POWERUP: // can only hold one item at a time if ( ps->stats[STAT_PERSISTANT_POWERUP] ) { @@ -1177,10 +1173,10 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play } return qtrue; -#endif +//#endif case IT_TEAM: // team items, such as flags -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( gametype == GT_1FCTF ) { // neutral flag can always be picked up if( item->giTag == PW_NEUTRALFLAG ) { @@ -1196,7 +1192,7 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play } } } -#endif +//#endif if( gametype == GT_CTF ) { // ent->modelindex2 is non-zero on items if they are dropped // we need to know this because we can pick up our dropped flag (and return it) @@ -1214,11 +1210,11 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( gametype == GT_HARVESTER ) { return qtrue; } -#endif +//#endif return qfalse; case IT_HOLDABLE: diff --git a/code/game/bg_pmove.c b/code/game/bg_pmove.c index 43395c4da8..b2dce14e70 100644 --- a/code/game/bg_pmove.c +++ b/code/game/bg_pmove.c @@ -533,7 +533,7 @@ static void PM_WaterMove( void ) { PM_SlideMove( qfalse ); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* =================== PM_InvulnerabilityMove @@ -547,7 +547,7 @@ static void PM_InvulnerabilityMove( void ) { pm->cmd.upmove = 0; VectorClear(pm->ps->velocity); } -#endif +//#endif /* =================== @@ -1690,7 +1690,7 @@ static void PM_Weapon( void ) { break; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[pm->ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_SCOUT ) { addTime /= 1.5; } @@ -1699,7 +1699,7 @@ static void PM_Weapon( void ) { addTime /= 1.3; } else -#endif +//#endif if ( pm->ps->powerups[PW_HASTE] ) { addTime /= 1.3; } @@ -1720,7 +1720,7 @@ static void PM_Animate( void ) { pm->ps->torsoTimer = TIMER_GESTURE; PM_AddEvent( EV_TAUNT ); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK } else if ( pm->cmd.buttons & BUTTON_GETFLAG ) { if ( pm->ps->torsoTimer == 0 ) { PM_StartTorsoAnim( TORSO_GETFLAG ); @@ -1751,7 +1751,7 @@ static void PM_Animate( void ) { PM_StartTorsoAnim( TORSO_NEGATIVE ); pm->ps->torsoTimer = 600; //TIMER_GESTURE; } -#endif +//#endif } } @@ -1970,11 +1970,11 @@ void PmoveSingle (pmove_t *pmove) { PM_DropTimers(); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( pm->ps->powerups[PW_INVULNERABILITY] ) { PM_InvulnerabilityMove(); } else -#endif +//#endif if ( pm->ps->powerups[PW_FLIGHT] ) { // flight powerup doesn't allow jump and has different friction PM_FlyMove(); diff --git a/code/game/bg_public.h b/code/game/bg_public.h index fe04ced526..b61231326c 100644 --- a/code/game/bg_public.h +++ b/code/game/bg_public.h @@ -203,9 +203,9 @@ void Pmove (pmove_t *pmove); typedef enum { STAT_HEALTH, STAT_HOLDABLE_ITEM, -#ifdef MISSIONPACK +//#ifdef MISSIONPACK STAT_PERSISTANT_POWERUP, -#endif +//#endif STAT_WEAPONS, // 16 bit fields STAT_ARMOR, STAT_DEAD_YAW, // look this direction when dead (FIXME: get rid of?) diff --git a/code/game/g_active.c b/code/game/g_active.c index dce66f9505..ed3e5583f7 100644 --- a/code/game/g_active.c +++ b/code/game/g_active.c @@ -173,12 +173,12 @@ G_SetClientSound =============== */ void G_SetClientSound( gentity_t *ent ) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( ent->s.eFlags & EF_TICKING ) { ent->client->ps.loopSound = G_SoundIndex( "sound/weapons/proxmine/wstbtick.wav"); } else -#endif +//#endif if (ent->waterlevel && (ent->watertype&(CONTENTS_LAVA|CONTENTS_SLIME)) ) { ent->client->ps.loopSound = level.snd_fry; } else { @@ -402,9 +402,9 @@ Actions that happen once a second */ void ClientTimerActions( gentity_t *ent, int msec ) { gclient_t *client; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int maxHealth; -#endif +//#endif client = ent->client; client->timeResidual += msec; @@ -413,7 +413,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { client->timeResidual -= 1000; // regenerate -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) { maxHealth = client->ps.stats[STAT_MAX_HEALTH] / 2; } @@ -437,6 +437,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { } G_AddEvent( ent, EV_POWERUP_REGEN, 0 ); } +/* #else if ( client->ps.powerups[PW_REGEN] ) { if ( ent->health < client->ps.stats[STAT_MAX_HEALTH]) { @@ -453,6 +454,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { G_AddEvent( ent, EV_POWERUP_REGEN, 0 ); } #endif +*/ } else { // count down health when over max if ( ent->health > client->ps.stats[STAT_MAX_HEALTH] ) { @@ -465,7 +467,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { client->ps.stats[STAT_ARMOR]--; } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_AMMOREGEN ) { int w, max, inc, t, i; int weapList[]={WP_MACHINEGUN,WP_SHOTGUN,WP_GRENADE_LAUNCHER,WP_ROCKET_LAUNCHER,WP_LIGHTNING,WP_RAILGUN,WP_PLASMAGUN,WP_BFG,WP_NAILGUN,WP_PROX_LAUNCHER,WP_CHAINGUN,WP_HMG}; @@ -503,7 +505,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { } } } -#endif +//#endif } /* @@ -602,7 +604,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { ent->client->ps.powerups[ j ] = 0; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( g_gametype.integer == GT_HARVESTER ) { if ( ent->client->ps.generic1 > 0 ) { if ( ent->client->sess.sessionTeam == TEAM_RED ) { @@ -623,7 +625,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { ent->client->ps.generic1 = 0; } } -#endif +//#endif SelectSpawnPoint( ent->client->ps.origin, origin, angles, qfalse ); TeleportPlayer( ent, origin, angles ); break; @@ -633,7 +635,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case EV_USE_ITEM3: // kamikaze // make sure the invulnerability is off ent->client->invulnerabilityTime = 0; @@ -652,7 +654,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { case EV_USE_ITEM5: // invulnerability ent->client->invulnerabilityTime = level.time + 10000; break; -#endif +//#endif default: break; @@ -661,7 +663,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ============== StuckInOtherClient @@ -702,7 +704,7 @@ static int StuckInOtherClient(gentity_t *ent) { } return qfalse; } -#endif +//#endif void BotTestSolid(vec3_t origin); @@ -843,12 +845,12 @@ void ClientThink_real( gentity_t *ent ) { // set speed client->ps.speed = g_speed.value; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_SCOUT ) { client->ps.speed *= 1.5; } else -#endif +//#endif if ( client->ps.powerups[PW_HASTE] ) { client->ps.speed *= 1.3; } @@ -876,7 +878,7 @@ void ClientThink_real( gentity_t *ent ) { ent->client->pers.cmd.buttons |= BUTTON_GESTURE; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // check for invulnerability expansion before doing the Pmove if (client->ps.powerups[PW_INVULNERABILITY] ) { if ( !(client->ps.pm_flags & PMF_INVULEXPAND) ) { @@ -901,7 +903,7 @@ void ClientThink_real( gentity_t *ent ) { trap_LinkEntity(ent); } } -#endif +//#endif pm.ps = &client->ps; pm.cmd = *ucmd; @@ -924,7 +926,7 @@ void ClientThink_real( gentity_t *ent ) { VectorCopy( client->ps.origin, client->oldOrigin ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (level.intermissionQueued != 0 && g_singlePlayer.integer) { if ( level.time - level.intermissionQueued >= 1000 ) { pm.cmd.buttons = 0; @@ -938,9 +940,7 @@ void ClientThink_real( gentity_t *ent ) { } } Pmove (&pm); -#else - Pmove (&pm); -#endif + // save results of pmove if ( ent->client->ps.eventSequence != oldEventSequence ) { @@ -1123,7 +1123,7 @@ void ClientEndFrame( gentity_t *ent ) { } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // set powerup for player animation if( bg_itemlist[ent->client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) { ent->client->ps.powerups[PW_GUARD] = level.time; @@ -1140,7 +1140,7 @@ void ClientEndFrame( gentity_t *ent ) { if ( ent->client->invulnerabilityTime > level.time ) { ent->client->ps.powerups[PW_INVULNERABILITY] = level.time; } -#endif +//#endif // save network bandwidth #if 0 diff --git a/code/game/g_client.c b/code/game/g_client.c index b307d9687a..de4afc3c0f 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -400,10 +400,10 @@ just like the existing corpse to leave behind. ============= */ void CopyToBodyQue( gentity_t *ent ) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK gentity_t *e; int i; -#endif +//#endif gentity_t *body; int contents; @@ -421,7 +421,7 @@ void CopyToBodyQue( gentity_t *ent ) { body->s = ent->s; body->s.eFlags = EF_DEAD; // clear EF_TALK, etc -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( ent->s.eFlags & EF_KAMIKAZE ) { body->s.eFlags |= EF_KAMIKAZE; @@ -438,7 +438,7 @@ void CopyToBodyQue( gentity_t *ent ) { break; } } -#endif +//#endif body->s.powerups = 0; // clear powerups body->s.loopSound = 0; // clear lava burning body->s.number = body - g_entities; @@ -761,7 +761,7 @@ void ClientUserinfoChanged( int clientNum ) { } // set max health -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (client->ps.powerups[PW_GUARD]) { client->pers.maxHealth = 200; } else { @@ -771,6 +771,7 @@ void ClientUserinfoChanged( int clientNum ) { client->pers.maxHealth = 100; } } +/* #else health = atoi( Info_ValueForKey( userinfo, "handicap" ) ); client->pers.maxHealth = health; @@ -778,6 +779,7 @@ void ClientUserinfoChanged( int clientNum ) { client->pers.maxHealth = 100; } #endif +*/ client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth; // set model @@ -1302,12 +1304,12 @@ void ClientDisconnect( int clientNum ) { // They don't get to take powerups with them! // Especially important for stuff like CTF flags TossClientItems( ent ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK TossClientPersistantPowerups( ent ); if( g_gametype.integer == GT_HARVESTER ) { TossClientCubes( ent ); } -#endif +//#endif } diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index 03382eabb6..5cb06ce142 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -107,7 +107,7 @@ void AccMessage( gentity_t *ent ) { char entry[1024]; Com_sprintf (entry, sizeof(entry), - " %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i ", // %i %i %i %i %i %i + " %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i", ent->client->accuracy[WP_MACHINEGUN][0], ent->client->accuracy[WP_MACHINEGUN][1], ent->client->accuracy[WP_SHOTGUN][0], ent->client->accuracy[WP_SHOTGUN][1], ent->client->accuracy[WP_GRENADE_LAUNCHER][0], ent->client->accuracy[WP_GRENADE_LAUNCHER][1], @@ -117,11 +117,9 @@ void AccMessage( gentity_t *ent ) { ent->client->accuracy[WP_PLASMAGUN][0], ent->client->accuracy[WP_PLASMAGUN][1], ent->client->accuracy[WP_BFG][0], ent->client->accuracy[WP_BFG][1], 0,0, //Hook -#ifdef MISSIONPACK ent->client->accuracy[WP_NAILGUN][0], ent->client->accuracy[WP_NAILGUN][1], 0,0, - ent->client->accuracy[WP_CHAINGUN][0], ent->client->accuracy[WP_CHAINGUN][1] -#endif + ent->client->accuracy[WP_CHAINGUN][0], ent->client->accuracy[WP_CHAINGUN][1], ent->client->accuracy[WP_HMG][0], ent->client->accuracy[WP_HMG][1] ); diff --git a/code/game/g_combat.c b/code/game/g_combat.c index 5cfbff82de..845feb78c5 100644 --- a/code/game/g_combat.c +++ b/code/game/g_combat.c @@ -150,7 +150,7 @@ void TossClientItems( gentity_t *self ) { } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================= @@ -230,7 +230,7 @@ void TossClientPersistantPowerups( gentity_t *ent ) { ent->client->ps.stats[STAT_PERSISTANT_POWERUP] = 0; ent->client->persistantPowerup = NULL; } -#endif +//#endif /* @@ -326,18 +326,18 @@ char *modNames[] = { "MOD_SUICIDE", "MOD_TARGET_LASER", "MOD_TRIGGER_HURT", -#ifdef MISSIONPACK +//#ifdef MISSIONPACK "MOD_NAIL", "MOD_CHAINGUN", "MOD_PROXIMITY_MINE", "MOD_KAMIKAZE", "MOD_JUICED", -#endif +//#endif "MOD_HMG", "MOD_GRAPPLE" }; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================== Kamikaze_DeathActivate @@ -366,7 +366,7 @@ void Kamikaze_DeathTimer( gentity_t *self ) { ent->activator = self; } -#endif +//#endif /* ================== @@ -480,13 +480,13 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int if (self->client && self->client->hook) { Weapon_HookFree(self->client->hook); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ((self->client->ps.eFlags & EF_TICKING) && self->activator) { self->client->ps.eFlags &= ~EF_TICKING; self->activator->think = G_FreeEntity; self->activator->nextthink = level.time; } -#endif +//#endif self->client->ps.pm_type = PM_DEAD; if ( attacker ) { @@ -589,12 +589,12 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int } TossClientItems( self ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK TossClientPersistantPowerups( self ); if( g_gametype.integer == GT_HARVESTER ) { TossClientCubes( self ); } -#endif +//#endif Cmd_Score_f( self ); // show scores // send updated scores to any clients that are following this one, @@ -679,11 +679,11 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int // globally cycle through the different death animations i = ( i + 1 ) % 3; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (self->s.eFlags & EF_KAMIKAZE) { Kamikaze_DeathTimer( self ); } -#endif +//#endif } trap_LinkEntity (self); @@ -834,9 +834,9 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, int asave; int knockback; int max; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK vec3_t bouncedir, impactpoint; -#endif +//#endif if (!targ->takedamage) { return; @@ -847,7 +847,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, if ( level.intermissionQueued ) { return; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( targ->client && mod != MOD_JUICED) { if ( targ->client->invulnerabilityTime > level.time) { if ( dir && point ) { @@ -856,7 +856,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, return; } } -#endif +//#endif if ( !inflictor ) { inflictor = &g_entities[ENTITYNUM_WORLD]; } @@ -871,20 +871,20 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, } return; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_OBELISK && CheckObeliskAttack( targ, attacker ) ) { return; } -#endif +//#endif // reduce damage by the attacker's handicap value // unless they are rocket jumping if ( attacker->client && attacker != targ ) { max = attacker->client->ps.stats[STAT_MAX_HEALTH]; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[attacker->client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) { max /= 2; } -#endif +//#endif damage = damage * max / 100; } @@ -945,16 +945,18 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, // if TF_NO_FRIENDLY_FIRE is set, don't do damage to the target // if the attacker was on the same team -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( mod != MOD_JUICED && targ != attacker && !(dflags & DAMAGE_NO_TEAM_PROTECTION) && OnSameTeam (targ, attacker) ) { +/* #else if ( targ != attacker && OnSameTeam (targ, attacker) ) { #endif +*/ if ( !g_friendlyFire.integer ) { return; } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (mod == MOD_PROXIMITY_MINE) { if (inflictor && inflictor->parent && OnSameTeam(targ, inflictor->parent)) { return; @@ -963,7 +965,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, return; } } -#endif +//#endif // check for godmode if ( targ->flags & FL_GODMODE ) { @@ -1037,11 +1039,9 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, } // See if it's the player hurting the emeny flag carrier -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_CTF || g_gametype.integer == GT_1FCTF ) { -#else - if( g_gametype.integer == GT_CTF) { -#endif + Team_CheckHurtCarrier(targ, attacker); } diff --git a/code/game/g_items.c b/code/game/g_items.c index ed80c3ee18..289c48d463 100644 --- a/code/game/g_items.c +++ b/code/game/g_items.c @@ -117,7 +117,7 @@ int Pickup_Powerup( gentity_t *ent, gentity_t *other ) { //====================================================================== -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) { int clientNum; char userinfo[MAX_INFO_STRING]; @@ -190,7 +190,7 @@ int Pickup_PersistantPowerup( gentity_t *ent, gentity_t *other ) { } //====================================================================== -#endif +//#endif int Pickup_Holdable( gentity_t *ent, gentity_t *other ) { @@ -300,12 +300,12 @@ int Pickup_Health (gentity_t *ent, gentity_t *other) { int quantity; // small and mega healths will go over the max -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( bg_itemlist[other->client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) { max = other->client->ps.stats[STAT_MAX_HEALTH]; } else -#endif +//#endif if ( ent->item->quantity != 5 && ent->item->quantity != 100 ) { max = other->client->ps.stats[STAT_MAX_HEALTH]; } else { @@ -335,7 +335,7 @@ int Pickup_Health (gentity_t *ent, gentity_t *other) { //====================================================================== int Pickup_Armor( gentity_t *ent, gentity_t *other ) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int upperBound; other->client->ps.stats[STAT_ARMOR] += ent->item->quantity; @@ -350,12 +350,14 @@ int Pickup_Armor( gentity_t *ent, gentity_t *other ) { if ( other->client->ps.stats[STAT_ARMOR] > upperBound ) { other->client->ps.stats[STAT_ARMOR] = upperBound; } +/* #else other->client->ps.stats[STAT_ARMOR] += ent->item->quantity; if ( other->client->ps.stats[STAT_ARMOR] > other->client->ps.stats[STAT_MAX_HEALTH] * 2 ) { other->client->ps.stats[STAT_ARMOR] = other->client->ps.stats[STAT_MAX_HEALTH] * 2; } #endif +*/ return RESPAWN_ARMOR; } @@ -481,11 +483,11 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) { respawn = Pickup_Powerup(ent, other); predict = qfalse; break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case IT_PERSISTANT_POWERUP: respawn = Pickup_PersistantPowerup(ent, other); break; -#endif +//#endif case IT_TEAM: respawn = Pickup_Team(ent, other); break; @@ -621,11 +623,9 @@ gentity_t *LaunchItem( gitem_t *item, vec3_t origin, vec3_t velocity ) { VectorCopy( velocity, dropped->s.pos.trDelta ); dropped->s.eFlags |= EF_BOUNCE_HALF; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ((g_gametype.integer == GT_CTF || g_gametype.integer == GT_1FCTF) && item->giType == IT_TEAM) { // Special case for CTF flags -#else - if (g_gametype.integer == GT_CTF && item->giType == IT_TEAM) { // Special case for CTF flags -#endif + dropped->think = Team_DroppedFlagThink; dropped->nextthink = level.time + 30000; Team_CheckDroppedItem( dropped ); @@ -769,7 +769,7 @@ void G_CheckTeamItems( void ) { G_Printf( S_COLOR_YELLOW "WARNING: No team_CTF_blueflag in map\n" ); } } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_1FCTF ) { gitem_t *item; @@ -827,7 +827,7 @@ void G_CheckTeamItems( void ) { G_Printf( S_COLOR_YELLOW "WARNING: No team_neutralobelisk in map\n" ); } } -#endif +//#endif } /* @@ -841,12 +841,12 @@ void ClearRegisteredItems( void ) { // players always start with the base weapon RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) ); RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_HARVESTER ) { RegisterItem( BG_FindItem( "Red Cube" ) ); RegisterItem( BG_FindItem( "Blue Cube" ) ); } -#endif +//#endif } /* @@ -936,11 +936,11 @@ void G_SpawnItem (gentity_t *ent, gitem_t *item) { G_SpawnFloat( "noglobalsound", "0", &ent->speed); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( item->giType == IT_PERSISTANT_POWERUP ) { ent->s.generic1 = ent->spawnflags; } -#endif +//#endif } diff --git a/code/game/g_local.h b/code/game/g_local.h index debd5b6ad6..11f64021ac 100644 --- a/code/game/g_local.h +++ b/code/game/g_local.h @@ -159,10 +159,10 @@ struct gentity_s { gentity_t *teamchain; // next entity in team gentity_t *teammaster; // master of the team -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int kamikazeTime; int kamikazeShockTime; -#endif +//#endif int watertype; int waterlevel; @@ -409,9 +409,9 @@ typedef struct { gentity_t *locationHead; // head of the location list int bodyQueIndex; // dead bodies gentity_t *bodyQue[BODY_QUEUE_SIZE]; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK int portalSequence; -#endif +//#endif } level_locals_t; @@ -499,9 +499,9 @@ qboolean G_RadiusDamage (vec3_t origin, gentity_t *attacker, float damage, float int G_InvulnerabilityEffect( gentity_t *targ, vec3_t dir, vec3_t point, vec3_t impactpoint, vec3_t bouncedir ); void body_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath ); void TossClientItems( gentity_t *self ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK void TossClientPersistantPowerups( gentity_t *self ); -#endif +//#endif void TossClientCubes( gentity_t *self ); void DamagePlum( gentity_t *ent, gentity_t *target, int mod, int damage ); // rat damageplum // damage flags @@ -509,9 +509,9 @@ void DamagePlum( gentity_t *ent, gentity_t *target, int mod, int damage ); // ra #define DAMAGE_NO_ARMOR 0x00000002 // armour does not protect from this damage #define DAMAGE_NO_KNOCKBACK 0x00000004 // do not affect velocity, just view angles #define DAMAGE_NO_PROTECTION 0x00000008 // armor, shields, invulnerability, and godmode have no effect -#ifdef MISSIONPACK +//#ifdef MISSIONPACK #define DAMAGE_NO_TEAM_PROTECTION 0x00000010 // armor, shields, invulnerability, and godmode have no effect -#endif +//#endif // // g_missile.c @@ -545,10 +545,10 @@ void trigger_teleporter_touch (gentity_t *self, gentity_t *other, trace_t *trace // g_misc.c // void TeleportPlayer( gentity_t *player, vec3_t origin, vec3_t angles ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK void DropPortalSource( gentity_t *ent ); void DropPortalDestination( gentity_t *ent ); -#endif +//#endif // @@ -591,9 +591,9 @@ qboolean G_FilterPacket (char *from); // g_weapon.c // void FireWeapon( gentity_t *ent ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK void G_StartKamikaze( gentity_t *ent ); -#endif +//#endif // // g_cmds.c diff --git a/code/game/g_main.c b/code/game/g_main.c index 8323c0f327..fb515679e2 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -144,8 +144,8 @@ static cvarTable_t gameCvarTable[] = { { &g_knockback, "g_knockback", "1000", 0, 0, qtrue }, { &g_quadfactor, "g_quadfactor", "3", 0, 0, qtrue }, { &g_weaponRespawn, "g_weaponrespawn", "5", 0, 0, qtrue }, - { &g_weaponTeamRespawn, "g_weaponTeamRespawn", "30", 0, 0, qtrue }, - { &g_forcerespawn, "g_forcerespawn", "20", 0, 0, qtrue }, + { &g_weaponTeamRespawn, "g_weaponTeamRespawn", "5", 0, 0, qtrue }, + { &g_forcerespawn, "g_forcerespawn", "5", 0, 0, qtrue }, { &g_inactivity, "g_inactivity", "0", 0, 0, qtrue }, { &g_debugMove, "g_debugMove", "0", 0, 0, qfalse }, { &g_debugDamage, "g_debugDamage", "0", 0, 0, qfalse }, diff --git a/code/game/g_misc.c b/code/game/g_misc.c index 4a16d33f37..26510759fc 100644 --- a/code/game/g_misc.c +++ b/code/game/g_misc.c @@ -337,7 +337,7 @@ void SP_shooter_grenade( gentity_t *ent ) { } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK static void PortalDie (gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod) { G_FreeEntity( self ); //FIXME do something more interesting @@ -479,4 +479,4 @@ void DropPortalSource( gentity_t *player ) { } } -#endif +//#endif diff --git a/code/game/g_mover.c b/code/game/g_mover.c index ad9b6c3c50..428c5e0e9e 100644 --- a/code/game/g_mover.c +++ b/code/game/g_mover.c @@ -317,7 +317,7 @@ qboolean G_MoverPush( gentity_t *pusher, vec3_t move, vec3_t amove, gentity_t ** for ( e = 0 ; e < listedEntities ; e++ ) { check = &g_entities[ entityList[ e ] ]; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( check->s.eType == ET_MISSILE ) { // if it is a prox mine if ( !strcmp(check->classname, "prox mine") ) { @@ -352,7 +352,7 @@ qboolean G_MoverPush( gentity_t *pusher, vec3_t move, vec3_t amove, gentity_t ** continue; } } -#endif +//#endif // only push items and players if ( check->s.eType != ET_ITEM && check->s.eType != ET_PLAYER && !check->physicsObject ) { continue; diff --git a/code/game/g_spawn.c b/code/game/g_spawn.c index 71d37c0f8d..831edcd9fd 100644 --- a/code/game/g_spawn.c +++ b/code/game/g_spawn.c @@ -174,11 +174,11 @@ void SP_team_CTF_blueplayer( gentity_t *ent ); void SP_team_CTF_redspawn( gentity_t *ent ); void SP_team_CTF_bluespawn( gentity_t *ent ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK void SP_team_blueobelisk( gentity_t *ent ); void SP_team_redobelisk( gentity_t *ent ); void SP_team_neutralobelisk( gentity_t *ent ); -#endif +//#endif void SP_item_botroam( gentity_t *ent ) { } void SP_ignore (gentity_t *ent) { } @@ -248,11 +248,11 @@ spawn_t spawns[] = { {"team_CTF_redspawn", SP_team_CTF_redspawn}, {"team_CTF_bluespawn", SP_team_CTF_bluespawn}, -#ifdef MISSIONPACK +//#ifdef MISSIONPACK {"team_redobelisk", SP_team_redobelisk}, {"team_blueobelisk", SP_team_blueobelisk}, {"team_neutralobelisk", SP_team_neutralobelisk}, -#endif +//#endif {"item_botroam", SP_item_botroam}, {"advertisement", SP_ignore}, {NULL, 0} diff --git a/code/game/g_team.c b/code/game/g_team.c index 0f5a34c5f2..794ec3a0ee 100644 --- a/code/game/g_team.c +++ b/code/game/g_team.c @@ -52,12 +52,12 @@ void Team_InitGame( void ) { teamgame.blueStatus = -1; // Invalid to force update Team_SetFlagStatus( TEAM_BLUE, FLAG_ATBASE ); break; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK case GT_1FCTF: teamgame.flagStatus = -1; // Invalid to force update Team_SetFlagStatus( TEAM_FREE, FLAG_ATBASE ); break; -#endif +//#endif default: break; } @@ -298,20 +298,20 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker enemy_flag_pw = PW_REDFLAG; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (g_gametype.integer == GT_1FCTF) { flag_pw = PW_NEUTRALFLAG; enemy_flag_pw = PW_NEUTRALFLAG; } -#endif +//#endif // did the attacker frag the flag carrier? tokens = 0; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_HARVESTER ) { tokens = targ->client->ps.generic1; } -#endif +//#endif if (targ->client->ps.powerups[enemy_flag_pw]) { attacker->client->pers.teamState.lastfraggedcarrier = level.time; AddScore(attacker, targ->r.currentOrigin, CTF_FRAG_CARRIER_BONUS); @@ -370,7 +370,7 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker // we have to find the flag and carrier entities -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_OBELISK ) { // find the team obelisk switch (attacker->client->sess.sessionTeam) { @@ -388,7 +388,7 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker // find the center obelisk c = "team_neutralobelisk"; } else { -#endif +//#endif // find the flag switch (attacker->client->sess.sessionTeam) { case TEAM_RED: @@ -407,9 +407,9 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker break; carrier = NULL; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK } -#endif +//#endif flag = NULL; while ((flag = G_Find (flag, FOFS(classname), c)) != NULL) { if (!(flag->flags & FL_DROPPED_ITEM)) @@ -487,11 +487,11 @@ void Team_CheckHurtCarrier(gentity_t *targ, gentity_t *attacker) else flag_pw = PW_REDFLAG; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if (g_gametype.integer == GT_1FCTF) { flag_pw = PW_NEUTRALFLAG; } -#endif +//#endif // flags if (targ->client->ps.powerups[flag_pw] && @@ -543,11 +543,11 @@ void Team_ResetFlags( void ) { Team_ResetFlag( TEAM_RED ); Team_ResetFlag( TEAM_BLUE ); } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if( g_gametype.integer == GT_1FCTF ) { Team_ResetFlag( TEAM_FREE ); } -#endif +//#endif } void Team_ReturnFlagSound( gentity_t *ent, int team ) { @@ -684,12 +684,12 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) { gclient_t *cl = other->client; int enemy_flag; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_1FCTF ) { enemy_flag = PW_NEUTRALFLAG; } else { -#endif +//#endif if (cl->sess.sessionTeam == TEAM_RED) { enemy_flag = PW_BLUEFLAG; } else { @@ -707,24 +707,24 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) { Team_ReturnFlagSound(Team_ResetFlag(team), team); return 0; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK } -#endif +//#endif // the flag is at home base. if the player has the enemy // flag, he's just won! if (!cl->ps.powerups[enemy_flag]) return 0; // We don't have the flag -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_1FCTF ) { PrintMsg( NULL, "%s" S_COLOR_WHITE " captured the flag!\n", cl->pers.netname ); } else { -#endif +//#endif PrintMsg( NULL, "%s" S_COLOR_WHITE " captured the %s flag!\n", cl->pers.netname, TeamName(OtherTeam(team))); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK } -#endif +//#endif cl->ps.powerups[enemy_flag] = 0; @@ -760,9 +760,9 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) { player->client->pers.teamState.lasthurtcarrier = -5; } else if (player->client->sess.sessionTeam == cl->sess.sessionTeam) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK AddScore(player, ent->r.currentOrigin, CTF_TEAM_BONUS); -#endif +//#endif // award extra points for capture assists if (player->client->pers.teamState.lastreturnedflag + CTF_RETURN_FLAG_ASSIST_TIMEOUT > level.time) { @@ -798,7 +798,7 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) { int Team_TouchEnemyFlag( gentity_t *ent, gentity_t *other, int team ) { gclient_t *cl = other->client; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_1FCTF ) { PrintMsg (NULL, "%s" S_COLOR_WHITE " got the flag!\n", other->client->pers.netname ); @@ -812,7 +812,7 @@ int Team_TouchEnemyFlag( gentity_t *ent, gentity_t *other, int team ) { } } else{ -#endif +//#endif PrintMsg (NULL, "%s" S_COLOR_WHITE " got the %s flag!\n", other->client->pers.netname, TeamName(team)); @@ -822,11 +822,11 @@ int Team_TouchEnemyFlag( gentity_t *ent, gentity_t *other, int team ) { cl->ps.powerups[PW_BLUEFLAG] = INT_MAX; // flags never expire Team_SetFlagStatus( team, FLAG_TAKEN ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK } AddScore(other, ent->r.currentOrigin, CTF_FLAG_BONUS); -#endif +//#endif cl->pers.teamState.flagsince = level.time; Team_TakeFlagSound( ent, team ); @@ -837,7 +837,7 @@ int Pickup_Team( gentity_t *ent, gentity_t *other ) { int team; gclient_t *cl = other->client; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_OBELISK ) { // there are no team items that can be picked up in obelisk G_FreeEntity( ent ); @@ -852,7 +852,7 @@ int Pickup_Team( gentity_t *ent, gentity_t *other ) { G_FreeEntity( ent ); return 0; } -#endif +//#endif // figure out what team this flag is if( strcmp(ent->classname, "team_CTF_redflag") == 0 ) { team = TEAM_RED; @@ -860,16 +860,16 @@ int Pickup_Team( gentity_t *ent, gentity_t *other ) { else if( strcmp(ent->classname, "team_CTF_blueflag") == 0 ) { team = TEAM_BLUE; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK else if( strcmp(ent->classname, "team_CTF_neutralflag") == 0 ) { team = TEAM_FREE; } -#endif +//#endif else { PrintMsg ( other, "Don't know what team the flag is on.\n"); return 0; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( g_gametype.integer == GT_1FCTF ) { if( team == TEAM_FREE ) { return Team_TouchEnemyFlag( ent, other, cl->sess.sessionTeam ); @@ -879,7 +879,7 @@ int Pickup_Team( gentity_t *ent, gentity_t *other ) { } return 0; } -#endif +//#endif // GT_CTF if( team == cl->sess.sessionTeam) { return Team_TouchOurFlag( ent, other, team ); @@ -1188,7 +1188,7 @@ void SP_team_CTF_bluespawn(gentity_t *ent) { } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* ================ Obelisks @@ -1491,4 +1491,4 @@ qboolean CheckObeliskAttack( gentity_t *obelisk, gentity_t *attacker ) { return qfalse; } -#endif +//#endif diff --git a/code/game/g_weapon.c b/code/game/g_weapon.c index 745f2d8567..ea24d96f3b 100644 --- a/code/game/g_weapon.c +++ b/code/game/g_weapon.c @@ -109,11 +109,11 @@ qboolean CheckGauntletAttack( gentity_t *ent ) { } else { s_quadFactor = 1; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( ent->client->persistantPowerup && ent->client->persistantPowerup->item && ent->client->persistantPowerup->item->giTag == PW_DOUBLER ) { s_quadFactor *= 2; } -#endif +//#endif damage = 50 * s_quadFactor; G_Damage( traceEnt, ent, ent, forward, tr.endpos, @@ -170,9 +170,9 @@ void SnapVectorTowards( vec3_t v, vec3_t to ) { void Bullet_Fire (gentity_t *ent, float spread, int damage, int mod ) { trace_t tr; vec3_t end; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK vec3_t impactpoint, bouncedir; -#endif +//#endif float r; float u; gentity_t *tent; @@ -216,7 +216,7 @@ void Bullet_Fire (gentity_t *ent, float spread, int damage, int mod ) { tent->s.otherEntityNum = ent->s.number; if ( traceEnt->takedamage) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( traceEnt->client && traceEnt->client->invulnerabilityTime > level.time ) { if (G_InvulnerabilityEffect( traceEnt, forward, tr.endpos, impactpoint, bouncedir )) { G_BounceProjectile( muzzle, impactpoint, bouncedir, end ); @@ -231,12 +231,12 @@ void Bullet_Fire (gentity_t *ent, float spread, int damage, int mod ) { continue; } else { -#endif +//#endif G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, 0, mod); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK } -#endif +//#endif } break; } @@ -319,9 +319,9 @@ qboolean ShotgunPellet( vec3_t start, vec3_t end, gentity_t *ent, struct hitShot trace_t tr; int damage, i, passent; gentity_t *traceEnt; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK vec3_t impactpoint, bouncedir; -#endif +//#endif vec3_t tr_start, tr_end; qboolean hitClient = qfalse; @@ -339,7 +339,7 @@ qboolean ShotgunPellet( vec3_t start, vec3_t end, gentity_t *ent, struct hitShot if ( traceEnt->takedamage) { damage = DEFAULT_SHOTGUN_DAMAGE * s_quadFactor; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( traceEnt->client && traceEnt->client->invulnerabilityTime > level.time ) { if (G_InvulnerabilityEffect( traceEnt, forward, tr.endpos, impactpoint, bouncedir )) { G_BounceProjectile( tr_start, impactpoint, bouncedir, tr_end ); @@ -353,7 +353,7 @@ qboolean ShotgunPellet( vec3_t start, vec3_t end, gentity_t *ent, struct hitShot } continue; } -#endif +//#endif if( LogAccuracyHit( traceEnt, ent ) ) { hitClient = qtrue; } @@ -490,9 +490,9 @@ weapon_railgun_fire #define MAX_RAIL_HITS 4 void weapon_railgun_fire (gentity_t *ent) { vec3_t end; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK vec3_t impactpoint, bouncedir; -#endif +//#endif trace_t trace; gentity_t *tent; gentity_t *traceEnt; @@ -518,7 +518,7 @@ void weapon_railgun_fire (gentity_t *ent) { } traceEnt = &g_entities[ trace.entityNum ]; if ( traceEnt->takedamage ) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( traceEnt->client && traceEnt->client->invulnerabilityTime > level.time ) { if ( G_InvulnerabilityEffect( traceEnt, forward, trace.endpos, impactpoint, bouncedir ) ) { G_BounceProjectile( muzzle, impactpoint, bouncedir, end ); @@ -545,12 +545,6 @@ void weapon_railgun_fire (gentity_t *ent) { } G_Damage (traceEnt, ent, ent, forward, trace.endpos, damage, 0, MOD_RAILGUN); } -#else - if( LogAccuracyHit( traceEnt, ent ) ) { - hits++; - } - G_Damage (traceEnt, ent, ent, forward, trace.endpos, damage, 0, MOD_RAILGUN); -#endif } if ( trace.contents & CONTENTS_SOLID ) { break; // we hit something solid enough to stop the beam @@ -663,9 +657,9 @@ LIGHTNING GUN void Weapon_LightningFire( gentity_t *ent ) { trace_t tr; vec3_t end; -#ifdef MISSIONPACK +//#ifdef MISSIONPACK vec3_t impactpoint, bouncedir; -#endif +//#endif gentity_t *traceEnt, *tent; int damage, i, passent; @@ -677,7 +671,7 @@ void Weapon_LightningFire( gentity_t *ent ) { trap_Trace( &tr, muzzle, NULL, NULL, end, passent, MASK_SHOT ); -#ifdef MISSIONPACK +//#ifdef MISSIONPACK // if not the first trace (the lightning bounced of an invulnerability sphere) if (i) { // add bounced off lightning bolt temp entity @@ -688,7 +682,7 @@ void Weapon_LightningFire( gentity_t *ent ) { SnapVector( end ); VectorCopy( end, tent->s.origin2 ); } -#endif +//#endif if ( tr.entityNum == ENTITYNUM_NONE ) { return; } @@ -696,7 +690,7 @@ void Weapon_LightningFire( gentity_t *ent ) { traceEnt = &g_entities[ tr.entityNum ]; if ( traceEnt->takedamage) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if ( traceEnt->client && traceEnt->client->invulnerabilityTime > level.time ) { if (G_InvulnerabilityEffect( traceEnt, forward, tr.endpos, impactpoint, bouncedir )) { G_BounceProjectile( muzzle, impactpoint, bouncedir, end ); @@ -712,7 +706,7 @@ void Weapon_LightningFire( gentity_t *ent ) { } continue; } -#endif +//#endif if( LogAccuracyHit( traceEnt, ent ) ) { ent->client->accuracy_hits++; ent->client->accuracy[WP_LIGHTNING][1]++; @@ -861,24 +855,21 @@ void FireWeapon( gentity_t *ent ) { } else { s_quadFactor = 1; } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( ent->client->persistantPowerup && ent->client->persistantPowerup->item && ent->client->persistantPowerup->item->giTag == PW_DOUBLER ) { s_quadFactor *= 2; } -#endif +//#endif // track shots taken for accuracy tracking. Grapple is not a weapon and gauntet is just not tracked if( ent->s.weapon != WP_GRAPPLING_HOOK && ent->s.weapon != WP_GAUNTLET ) { -#ifdef MISSIONPACK +//#ifdef MISSIONPACK if( ent->s.weapon == WP_NAILGUN ) { ent->client->accuracy_shots += NUM_NAILSHOTS; } else { ent->client->accuracy_shots++; + ent->client->accuracy[ent->s.weapon][0]++; } -#else - ent->client->accuracy_shots++; - ent->client->accuracy[ent->s.weapon][0]++; -#endif } // set aiming directions @@ -943,7 +934,7 @@ void FireWeapon( gentity_t *ent ) { } -#ifdef MISSIONPACK +//#ifdef MISSIONPACK /* =============== @@ -1192,4 +1183,4 @@ void G_StartKamikaze( gentity_t *ent ) { te->r.svFlags |= SVF_BROADCAST; te->s.eventParm = GTS_KAMIKAZE; } -#endif +//#endif diff --git a/code/q3_ui/ui_local.h b/code/q3_ui/ui_local.h index 1135a52da2..dccac6d03e 100644 --- a/code/q3_ui/ui_local.h +++ b/code/q3_ui/ui_local.h @@ -49,6 +49,16 @@ extern vmCvar_t ui_ctf_capturelimit; extern vmCvar_t ui_ctf_timelimit; extern vmCvar_t ui_ctf_friendly; +extern vmCvar_t ui_1fctf_capturelimit; +extern vmCvar_t ui_1fctf_timelimit; +extern vmCvar_t ui_1fctf_friendly; +extern vmCvar_t ui_overload_capturelimit; +extern vmCvar_t ui_overload_timelimit; +extern vmCvar_t ui_overload_friendly; +extern vmCvar_t ui_harvester_capturelimit; +extern vmCvar_t ui_harvester_timelimit; +extern vmCvar_t ui_harvester_friendly; + extern vmCvar_t ui_arenasFile; extern vmCvar_t ui_botsFile; extern vmCvar_t ui_spScores1; diff --git a/code/q3_ui/ui_main.c b/code/q3_ui/ui_main.c index 216269cf6e..b49544c7b7 100644 --- a/code/q3_ui/ui_main.c +++ b/code/q3_ui/ui_main.c @@ -113,6 +113,16 @@ vmCvar_t ui_ctf_capturelimit; vmCvar_t ui_ctf_timelimit; vmCvar_t ui_ctf_friendly; +vmCvar_t ui_1fctf_capturelimit; +vmCvar_t ui_1fctf_timelimit; +vmCvar_t ui_1fctf_friendly; +vmCvar_t ui_overload_capturelimit; +vmCvar_t ui_overload_timelimit; +vmCvar_t ui_overload_friendly; +vmCvar_t ui_harvester_capturelimit; +vmCvar_t ui_harvester_timelimit; +vmCvar_t ui_harvester_friendly; + vmCvar_t ui_arenasFile; vmCvar_t ui_botsFile; vmCvar_t ui_spScores1; @@ -172,6 +182,18 @@ static cvarTable_t cvarTable[] = { { &ui_ctf_timelimit, "ui_ctf_timelimit", "30", CVAR_ARCHIVE }, { &ui_ctf_friendly, "ui_ctf_friendly", "0", CVAR_ARCHIVE }, + { &ui_1fctf_capturelimit, "ui_1fctf_capturelimit", "8", CVAR_ARCHIVE }, + { &ui_1fctf_timelimit, "ui_1fctf_timelimit", "30", CVAR_ARCHIVE }, + { &ui_1fctf_friendly, "ui_1fctf_friendly", "0", CVAR_ARCHIVE }, + + { &ui_overload_capturelimit, "ui_overload_capturelimit", "8", CVAR_ARCHIVE }, + { &ui_overload_timelimit, "ui_overload_timelimit", "30", CVAR_ARCHIVE }, + { &ui_overload_friendly, "ui_overload_friendly", "0", CVAR_ARCHIVE }, + + { &ui_harvester_capturelimit, "ui_harvester_capturelimit", "20", CVAR_ARCHIVE }, + { &ui_harvester_timelimit, "ui_harvester_timelimit", "30", CVAR_ARCHIVE }, + { &ui_harvester_friendly, "ui_harvester_friendly", "0", CVAR_ARCHIVE }, + { &ui_arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM }, { &ui_botsFile, "g_botsFile", "", CVAR_INIT|CVAR_ROM }, { &ui_spScores1, "g_spScores1", "", CVAR_ARCHIVE }, diff --git a/code/q3_ui/ui_startserver.c b/code/q3_ui/ui_startserver.c index ee6e2d6ea7..c29b54c70e 100644 --- a/code/q3_ui/ui_startserver.c +++ b/code/q3_ui/ui_startserver.c @@ -94,11 +94,33 @@ static const char *gametype_items[] = { "Team Deathmatch", "Tournament", "Capture the Flag", + "One Flag Capture", + "Overload", + "Harvester", NULL }; -static int gametype_remap[] = {GT_FFA, GT_TEAM, GT_TOURNAMENT, GT_CTF}; -static int gametype_remap2[] = {0, 2, 0, 1, 3}; +static int gametype_remap[] = { + GT_FFA, + GT_TEAM, + GT_TOURNAMENT, + GT_CTF, + GT_1FCTF, + GT_OBELISK, + GT_HARVESTER +}; + +static int gametype_remap2[] = { + 0, + 2, + 0, + 1, + 3, + 4, + 5, + 6, + 7 +}; //this works and should increment for more gametypes // use ui_servers2.c definition extern const char* punkbuster_items[]; @@ -150,6 +172,18 @@ static int GametypeBits( char *string ) { bits |= 1 << GT_CTF; continue; } + + if( Q_stricmp( token, "oneflag" ) == 0) { + bits |= 1 << GT_1FCTF; + continue; + } + + if( Q_stricmp( token, "har" ) == 0) { + bits |= 1 << GT_OBELISK; + bits |= 1 << GT_HARVESTER; + continue; + } + } return bits; @@ -780,6 +814,24 @@ static void ServerOptions_Start( void ) { trap_Cvar_SetValue( "ui_ctf_timelimit", timelimit ); trap_Cvar_SetValue( "ui_ctf_friendly", friendlyfire ); break; + + case GT_1FCTF: + trap_Cvar_SetValue( "ui_1fctf_capturelimit", flaglimit ); + trap_Cvar_SetValue( "ui_1fctf_timelimit", timelimit ); + trap_Cvar_SetValue( "ui_1fctf_friendly", friendlyfire ); + break; + + case GT_OBELISK: + trap_Cvar_SetValue( "ui_overload_capturelimit", flaglimit ); + trap_Cvar_SetValue( "ui_overload_timelimit", timelimit ); + trap_Cvar_SetValue( "ui_overload_friendly", friendlyfire ); + break; + + case GT_HARVESTER: + trap_Cvar_SetValue( "ui_harvester_capturelimit", flaglimit ); + trap_Cvar_SetValue( "ui_harvester_timelimit", timelimit ); + trap_Cvar_SetValue( "ui_harvester_friendly", friendlyfire ); + break; } trap_Cvar_SetValue( "sv_maxclients", Com_Clamp( 0, 12, maxclients ) ); @@ -1164,6 +1216,24 @@ static void ServerOptions_SetMenuItems( void ) { Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_ctf_timelimit" ) ) ); s_serveroptions.friendlyfire.curvalue = (int)Com_Clamp( 0, 1, trap_Cvar_VariableValue( "ui_ctf_friendly" ) ); break; + + case GT_1FCTF: + Com_sprintf( s_serveroptions.flaglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 100, trap_Cvar_VariableValue( "ui_1fctf_capturelimit" ) ) ); + Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_1fctf_timelimit" ) ) ); + s_serveroptions.friendlyfire.curvalue = (int)Com_Clamp( 0, 1, trap_Cvar_VariableValue( "ui_1fctf_friendly" ) ); + break; + + case GT_OBELISK: + Com_sprintf( s_serveroptions.flaglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 100, trap_Cvar_VariableValue( "ui_overload_capturelimit" ) ) ); + Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_overload_timelimit" ) ) ); + s_serveroptions.friendlyfire.curvalue = (int)Com_Clamp( 0, 1, trap_Cvar_VariableValue( "ui_overload_friendly" ) ); + break; + + case GT_HARVESTER: + Com_sprintf( s_serveroptions.flaglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 100, trap_Cvar_VariableValue( "ui_harvester_capturelimit" ) ) ); + Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_harvester_timelimit" ) ) ); + s_serveroptions.friendlyfire.curvalue = (int)Com_Clamp( 0, 1, trap_Cvar_VariableValue( "ui_harvester_friendly" ) ); + break; } Q_strncpyz( s_serveroptions.hostname.field.buffer, UI_Cvar_VariableString( "sv_hostname" ), sizeof( s_serveroptions.hostname.field.buffer ) ); @@ -1283,7 +1353,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) { s_serveroptions.picframe.focuspic = GAMESERVER_SELECT; y = 272; - if( s_serveroptions.gametype != GT_CTF ) { + if( s_serveroptions.gametype < GT_CTF ) { s_serveroptions.fraglimit.generic.type = MTYPE_FIELD; s_serveroptions.fraglimit.generic.name = "Frag Limit:"; s_serveroptions.fraglimit.generic.flags = QMF_NUMBERSONLY|QMF_PULSEIFFOCUS|QMF_SMALLFONT; @@ -1463,7 +1533,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) { } } - if( s_serveroptions.gametype != GT_CTF ) { + if( s_serveroptions.gametype < GT_CTF ) { Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.fraglimit ); } else {