mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-26 14:11:22 +00:00
CTF is now CTB. no weapons while the case is in hand other than pistol or knife
This commit is contained in:
parent
5c84200d0d
commit
849d2ca905
10 changed files with 112 additions and 43 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.53 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.52 2002/06/24 05:55:50 niceass
|
||||
// drawping
|
||||
//
|
||||
|
@ -2142,8 +2145,9 @@ static void CG_DrawWarmup(void)
|
|||
// JBravo adding teamplay
|
||||
} else if (cgs.gametype == GT_TEAMPLAY) {
|
||||
s = "RQ3 Teamplay";
|
||||
// JBravo: Now known as CTB
|
||||
} else if (cgs.gametype == GT_CTF) {
|
||||
s = "Capture the Flag";
|
||||
s = "Capture the Briefcase";
|
||||
} else {
|
||||
s = "";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.34 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.33 2002/06/16 20:06:13 jbravo
|
||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||
//
|
||||
|
@ -331,8 +334,9 @@ void CG_DrawInformation(void)
|
|||
//Makro - changed from RQ3 Teamplay
|
||||
line = "CLASSIC ACTION TEAMPLAY";
|
||||
break;
|
||||
// JBravo: now knows as CTB
|
||||
case GT_CTF:
|
||||
line = "CAPTURE THE FLAG";
|
||||
line = "CAPTURE THE BRIEFCASE";
|
||||
break;
|
||||
default:
|
||||
line = "UNKNOWN GAMETYPE";
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.90 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.89 2002/06/24 05:55:03 niceass
|
||||
// drawping
|
||||
//
|
||||
|
@ -1336,8 +1339,10 @@ static void CG_RegisterGraphics(void)
|
|||
}
|
||||
|
||||
if (cgs.gametype == GT_CTF || cg_buildScript.integer) {
|
||||
cgs.media.redFlagModel = trap_R_RegisterModel("models/flags/r_flag.md3");
|
||||
cgs.media.blueFlagModel = trap_R_RegisterModel("models/flags/b_flag.md3");
|
||||
// cgs.media.redFlagModel = trap_R_RegisterModel("models/flags/r_flag.md3");
|
||||
// cgs.media.blueFlagModel = trap_R_RegisterModel("models/flags/b_flag.md3");
|
||||
cgs.media.redFlagModel = trap_R_RegisterModel("models/cases/s_case.md3");
|
||||
cgs.media.blueFlagModel = trap_R_RegisterModel("models/cases/b_case.md3");
|
||||
cgs.media.redFlagShader[0] = trap_R_RegisterShaderNoMip("icons/iconf_red1");
|
||||
cgs.media.redFlagShader[1] = trap_R_RegisterShaderNoMip("icons/iconf_red2");
|
||||
cgs.media.redFlagShader[2] = trap_R_RegisterShaderNoMip("icons/iconf_red3");
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.86 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.85 2002/06/23 04:34:54 niceass
|
||||
// change to foglaser
|
||||
//
|
||||
|
@ -2091,6 +2094,11 @@ static qboolean CG_WeaponSelectable(int i)
|
|||
//if ( !cg.snap->ps.ammo[i] && !cg.snap->ps.stats[STAT_CLIPS] ) {
|
||||
//return qfalse;
|
||||
//}
|
||||
// JBravo: lets not allow switching to weapons other than pistol or knife if the player has a case
|
||||
if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_REDFLAG]) {
|
||||
if (i != WP_PISTOL && i != WP_KNIFE)
|
||||
return qfalse;
|
||||
}
|
||||
if (!(cg.snap->ps.stats[STAT_WEAPONS] & (1 << i))) {
|
||||
return qfalse;
|
||||
}
|
||||
|
@ -2269,6 +2277,10 @@ void CG_SpecialWeapon_f(void)
|
|||
if (cg.snap->ps.stats[STAT_BURST] > 0)
|
||||
return;
|
||||
|
||||
// JBravo: not in CTF
|
||||
if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_REDFLAG])
|
||||
return;
|
||||
|
||||
//Elder: in the middle of firing, reloading or weapon-switching
|
||||
//cg.snap->ps.weaponstate == WEAPON_RELOADING when it's in
|
||||
/*
|
||||
|
@ -2530,6 +2542,11 @@ void CG_Weapon_f(void)
|
|||
if (num < 1 || num > 15) {
|
||||
return;
|
||||
}
|
||||
// JBravo: CTB provisions
|
||||
if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_REDFLAG]) {
|
||||
if (num != WP_PISTOL && num != WP_KNIFE)
|
||||
return;
|
||||
}
|
||||
//Elder: this point on is the regular Q3 weapon function - weird
|
||||
|
||||
cg.weaponSelectTime = cg.time;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.42 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.41 2002/06/16 20:06:14 jbravo
|
||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||
//
|
||||
|
@ -531,7 +534,8 @@ Only in CTF games
|
|||
{
|
||||
"team_CTF_redflag",
|
||||
NULL,
|
||||
{"models/flags/r_flag.md3",
|
||||
// {"models/flags/r_flag.md3",
|
||||
{"models/cases/s_case.md3",
|
||||
0, 0, 0}
|
||||
,
|
||||
/* icon */ "icons/iconf_red1",
|
||||
|
@ -550,7 +554,8 @@ Only in CTF games
|
|||
{
|
||||
"team_CTF_blueflag",
|
||||
NULL,
|
||||
{"models/flags/b_flag.md3",
|
||||
// {"models/flags/b_flag.md3",
|
||||
{"models/cases/b_case.md3",
|
||||
0, 0, 0}
|
||||
,
|
||||
/* icon */ "icons/iconf_blu1",
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.147 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.146 2002/06/28 21:41:12 jbravo
|
||||
// Gawd damn buglet
|
||||
//
|
||||
|
@ -1844,7 +1847,7 @@ static const char *gameNames[] = {
|
|||
|
||||
// JBravo: duh ;)
|
||||
"RQ3 teamplay",
|
||||
"Capture the Flag",
|
||||
"Capture the Briefcase",
|
||||
"One Flag CTF",
|
||||
"Overload",
|
||||
"Harvester"
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.35 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.34 2002/06/24 05:51:51 jbravo
|
||||
// CTF mode is now semi working
|
||||
//
|
||||
|
@ -434,6 +437,11 @@ qboolean G_CallSpawn(gentity_t * ent)
|
|||
ent->classname = "weapon_m4";
|
||||
else if (!strcmp(ent->classname, "RQ3weapon_grenade"))
|
||||
ent->classname = "weapon_grenade";
|
||||
// JBravo: Briefcases
|
||||
else if (!strcmp(ent->classname, "RQ3case_blaxk"))
|
||||
ent->classname = "team_CTF_blueflag";
|
||||
else if (!strcmp(ent->classname, "RQ3case_silver"))
|
||||
ent->classname = "team_CTF_redflag";
|
||||
|
||||
//Elder: map Q3DM ammo -> RQ3 ammo
|
||||
if (!strcmp(ent->classname, "RQ3ammo_mk23"))
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.11 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.10 2002/06/24 05:51:51 jbravo
|
||||
// CTF mode is now semi working
|
||||
//
|
||||
|
@ -75,9 +78,9 @@ int OtherTeam(int team)
|
|||
const char *TeamName(int team)
|
||||
{
|
||||
if (team == TEAM_RED)
|
||||
return "RED";
|
||||
return "SILVER";
|
||||
else if (team == TEAM_BLUE)
|
||||
return "BLUE";
|
||||
return "BLACK";
|
||||
else if (team == TEAM_SPECTATOR)
|
||||
return "SPECTATOR";
|
||||
return "FREE";
|
||||
|
@ -86,9 +89,9 @@ const char *TeamName(int team)
|
|||
const char *OtherTeamName(int team)
|
||||
{
|
||||
if (team == TEAM_RED)
|
||||
return "BLUE";
|
||||
return "BLACK";
|
||||
else if (team == TEAM_BLUE)
|
||||
return "RED";
|
||||
return "SILVER";
|
||||
else if (team == TEAM_SPECTATOR)
|
||||
return "SPECTATOR";
|
||||
return "FREE";
|
||||
|
@ -324,7 +327,7 @@ void Team_FragBonuses(gentity_t * targ, gentity_t * inflictor, gentity_t * attac
|
|||
attacker->client->pers.teamState.lastfraggedcarrier = level.time;
|
||||
AddScore(attacker, targ->r.currentOrigin, CTF_FRAG_CARRIER_BONUS);
|
||||
attacker->client->pers.teamState.fragcarrier++;
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " fragged %s's flag carrier!\n",
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " fragged %s's courier!\n",
|
||||
attacker->client->pers.netname, TeamName(team));
|
||||
|
||||
// the target had the flag, clear the hurt carrier
|
||||
|
@ -628,9 +631,9 @@ void Team_ReturnFlag(int team)
|
|||
{
|
||||
Team_ReturnFlagSound(Team_ResetFlag(team), team);
|
||||
if (team == TEAM_FREE) {
|
||||
PrintMsg(NULL, "The flag has returned!\n");
|
||||
PrintMsg(NULL, "The case has returned!\n");
|
||||
} else {
|
||||
PrintMsg(NULL, "The %s flag has returned!\n", TeamName(team));
|
||||
PrintMsg(NULL, "The %s case has returned!\n", TeamName(team));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -690,7 +693,7 @@ int Team_TouchOurFlag(gentity_t * ent, gentity_t * other, int team)
|
|||
|
||||
if (ent->flags & FL_DROPPED_ITEM) {
|
||||
// hey, its not home. return it by teleporting it back
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " returned the %s flag!\n", cl->pers.netname, TeamName(team));
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " returned the %s case!\n", cl->pers.netname, TeamName(team));
|
||||
AddScore(other, ent->r.currentOrigin, CTF_RECOVERY_BONUS);
|
||||
other->client->pers.teamState.flagrecovery++;
|
||||
other->client->pers.teamState.lastreturnedflag = level.time;
|
||||
|
@ -702,7 +705,7 @@ int Team_TouchOurFlag(gentity_t * ent, gentity_t * other, int team)
|
|||
// flag, he's just won!
|
||||
if (!cl->ps.powerups[enemy_flag])
|
||||
return 0; // We don't have the flag
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " captured the %s flag!\n", cl->pers.netname, TeamName(OtherTeam(team)));
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " captured the %s case!\n", cl->pers.netname, TeamName(OtherTeam(team)));
|
||||
|
||||
cl->ps.powerups[enemy_flag] = 0;
|
||||
|
||||
|
@ -780,7 +783,7 @@ int Team_TouchEnemyFlag(gentity_t * ent, gentity_t * other, int team)
|
|||
{
|
||||
gclient_t *cl = other->client;
|
||||
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " got the %s flag!\n", other->client->pers.netname, TeamName(team));
|
||||
PrintMsg(NULL, "%s" S_COLOR_WHITE " got the %s case!\n", other->client->pers.netname, TeamName(team));
|
||||
|
||||
if (team == TEAM_RED)
|
||||
cl->ps.powerups[PW_REDFLAG] = INT_MAX; // flags never expire
|
||||
|
@ -801,6 +804,10 @@ int Pickup_Team(gentity_t * ent, gentity_t * other)
|
|||
int team;
|
||||
gclient_t *cl = other->client;
|
||||
|
||||
// JBravo: no picking up case if you have a two handed weapon.
|
||||
if (other->client->ps.weapon != WP_PISTOL && other->client->ps.weapon != WP_KNIFE) {
|
||||
return 0;
|
||||
}
|
||||
// figure out what team this flag is
|
||||
if (strcmp(ent->classname, "team_CTF_redflag") == 0) {
|
||||
team = TEAM_RED;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.116 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.115 2002/06/26 03:28:36 niceass
|
||||
// upper right HUD scores updated quickly
|
||||
//
|
||||
|
@ -1918,6 +1921,39 @@ void RQ3_Cmd_Use_f(gentity_t * ent)
|
|||
cmd = ConcatArgs(1);
|
||||
weapon = WP_NONE;
|
||||
|
||||
if (Q_stricmp(cmd, RQ3_PISTOL_NAME) == 0 || Q_stricmp(cmd, "pistol") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_PISTOL)) == (1 << WP_PISTOL)) {
|
||||
weapon = WP_PISTOL;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_AKIMBO_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, "throwing combat knife") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_KNIFE)) == (1 << WP_KNIFE)) {
|
||||
weapon = WP_KNIFE;
|
||||
ent->client->ps.persistant[PERS_WEAPONMODES] &= ~RQ3_KNIFEMODE;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_KNIFE_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, "slashing combat knife") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_KNIFE)) == (1 << WP_KNIFE)) {
|
||||
weapon = WP_KNIFE;
|
||||
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_KNIFEMODE;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_KNIFE_NAME));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (weapon != WP_NONE) {
|
||||
if (weapon == ent->client->ps.weapon)
|
||||
return;
|
||||
Com_sprintf(buf, sizeof(buf), "stuff weapon %d\n", weapon);
|
||||
trap_SendServerCommand(ent - g_entities, buf);
|
||||
return;
|
||||
}
|
||||
if (g_gametype.integer == GT_CTF && (ent->client->ps.powerups[PW_REDFLAG] || ent->client->ps.powerups[PW_BLUEFLAG]))
|
||||
return;
|
||||
if (Q_stricmp(cmd, RQ3_MP5_NAME) == 0 || Q_stricmp(cmd, "mp5") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_MP5)) == (1 << WP_MP5)) {
|
||||
weapon = WP_MP5;
|
||||
|
@ -1961,13 +1997,6 @@ void RQ3_Cmd_Use_f(gentity_t * ent)
|
|||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_AKIMBO_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, RQ3_PISTOL_NAME) == 0 || Q_stricmp(cmd, "pistol") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_PISTOL)) == (1 << WP_PISTOL)) {
|
||||
weapon = WP_PISTOL;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_AKIMBO_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, RQ3_GRENADE_NAME) == 0 || Q_stricmp(cmd, "grenade") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_GRENADE)) == (1 << WP_GRENADE)) {
|
||||
weapon = WP_GRENADE;
|
||||
|
@ -1975,22 +2004,6 @@ void RQ3_Cmd_Use_f(gentity_t * ent)
|
|||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_GRENADE_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, "throwing combat knife") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_KNIFE)) == (1 << WP_KNIFE)) {
|
||||
weapon = WP_KNIFE;
|
||||
ent->client->ps.persistant[PERS_WEAPONMODES] &= ~RQ3_KNIFEMODE;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_KNIFE_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, "slashing combat knife") == 0) {
|
||||
if ((ent->client->ps.stats[STAT_WEAPONS] & (1 << WP_KNIFE)) == (1 << WP_KNIFE)) {
|
||||
weapon = WP_KNIFE;
|
||||
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_KNIFEMODE;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"Out of item: %s\n\"", RQ3_KNIFE_NAME));
|
||||
return;
|
||||
}
|
||||
} else if (Q_stricmp(cmd, "special") == 0) {
|
||||
for (i = WP_NUM_WEAPONS - 1; i > 0; i--) {
|
||||
if (i == WP_KNIFE || i == WP_PISTOL || i == WP_AKIMBO || i == WP_GRENADE)
|
||||
|
@ -2021,7 +2034,7 @@ void Add_TeamWound(gentity_t * attacker, gentity_t * victim, int mod)
|
|||
char userinfo[MAX_INFO_STRING];
|
||||
char *value;
|
||||
|
||||
if (g_gametype.integer != GT_TEAMPLAY || !attacker->client || !victim->client)
|
||||
if ((g_gametype.integer != GT_TEAMPLAY && g_gametype.integer != GT_CTF) || !attacker->client || !victim->client)
|
||||
return;
|
||||
|
||||
attacker->client->team_wounds++;
|
||||
|
@ -2068,7 +2081,7 @@ void Add_TeamKill(gentity_t * attacker)
|
|||
char *value;
|
||||
|
||||
// NiceAss: No TKing in matchmode
|
||||
if (g_gametype.integer != GT_TEAMPLAY || !attacker->client || g_RQ3_matchmode.integer)
|
||||
if ((g_gametype.integer != GT_TEAMPLAY && g_gametype.integer != GT_CTF) || !attacker->client || g_RQ3_matchmode.integer)
|
||||
return;
|
||||
|
||||
attacker->client->team_kills++;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.40 2002/06/29 04:15:15 jbravo
|
||||
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
|
||||
//
|
||||
// Revision 1.39 2002/06/28 21:20:44 makro
|
||||
// More MM...
|
||||
//
|
||||
|
@ -200,7 +203,7 @@ static const char *teamArenaGameNames[] = {
|
|||
"Team Deathmatch",
|
||||
//Makro - inserted teamplay
|
||||
"RQ3 Teamplay",
|
||||
"Capture the Flag",
|
||||
"Capture the Briefcase",
|
||||
"One Flag CTF",
|
||||
"Overload",
|
||||
"Harvester",
|
||||
|
|
Loading…
Reference in a new issue