mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 09:31:11 +00:00
Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
This commit is contained in:
parent
b83e7ac2e5
commit
4f2ae27006
9 changed files with 75 additions and 12 deletions
Binary file not shown.
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.121 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.120 2002/10/26 22:03:43 jbravo
|
||||
// Made TeamDM work RQ3 style.
|
||||
//
|
||||
|
@ -1704,7 +1707,7 @@ void ClientSpawn(gentity_t * ent)
|
|||
|
||||
//Blaze: changed WP_MACHINEGUN to WP_PISTOL, makes the base weapon you start with the pistol
|
||||
// JBravo: Not in TP
|
||||
if (g_gametype.integer == GT_FFA) {
|
||||
if (g_gametype.integer == GT_FFA || (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer)) {
|
||||
if ((int) g_RQ3_weaponban.integer & WPF_MK23) {
|
||||
client->ps.stats[STAT_WEAPONS] = (1 << WP_PISTOL);
|
||||
client->numClips[WP_PISTOL] = 0;
|
||||
|
@ -1740,7 +1743,7 @@ void ClientSpawn(gentity_t * ent)
|
|||
// force the base weapon up
|
||||
//Blaze: Changed WP_MACHINEGUN to WP_PISTOL
|
||||
// JBravo: we dont want the endless pistol in TP
|
||||
if (g_gametype.integer < GT_TEAM) {
|
||||
if (g_gametype.integer < GT_TEAM || (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer)) {
|
||||
client->ps.weapon = WP_PISTOL;
|
||||
client->ps.weaponstate = WEAPON_READY;
|
||||
}
|
||||
|
@ -1788,7 +1791,7 @@ void ClientSpawn(gentity_t * ent)
|
|||
client->ps.torsoAnim = TORSO_STAND;
|
||||
client->ps.legsAnim = LEGS_IDLE;
|
||||
// weapon animations
|
||||
if (g_gametype.integer == GT_FFA)
|
||||
if (g_gametype.integer == GT_FFA || (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer))
|
||||
client->ps.generic1 = ((client->ps.generic1 & ANIM_TOGGLEBIT)
|
||||
^ ANIM_TOGGLEBIT) | WP_ANIM_IDLE;
|
||||
|
||||
|
@ -1802,7 +1805,7 @@ void ClientSpawn(gentity_t * ent)
|
|||
// select the highest weapon number available, after any
|
||||
// spawn given items have fired
|
||||
// JBravo: Lets make sure we have the right weapons
|
||||
if ((g_gametype.integer >= GT_TEAM) &&
|
||||
if (g_gametype.integer >= GT_TEAM && !(g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer) &&
|
||||
(client->sess.sessionTeam == TEAM_RED || client->sess.sessionTeam == TEAM_BLUE)) {
|
||||
EquipPlayer(ent);
|
||||
} else {
|
||||
|
@ -1823,7 +1826,7 @@ void ClientSpawn(gentity_t * ent)
|
|||
client->ps.commandTime = level.time - 100;
|
||||
ent->client->pers.cmd.serverTime = level.time;
|
||||
// JBravo: We should not have to call this during TP spawns
|
||||
if (g_gametype.integer == GT_FFA)
|
||||
if (g_gametype.integer == GT_FFA || (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer))
|
||||
ClientThink(ent - g_entities);
|
||||
|
||||
// positively link the client, even if the command times are weird
|
||||
|
@ -1834,7 +1837,7 @@ void ClientSpawn(gentity_t * ent)
|
|||
}
|
||||
// run the presend to set anything else
|
||||
// JBravo: We should not have to call this during TP spawns
|
||||
if (g_gametype.integer == GT_FFA)
|
||||
if (g_gametype.integer == GT_FFA || (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer))
|
||||
ClientEndFrame(ent);
|
||||
ent->client->noHead = qfalse;
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.53 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.52 2002/10/28 02:42:25 jbravo
|
||||
// Fixed the HC+Bando bug.
|
||||
//
|
||||
|
@ -803,7 +806,7 @@ gentity_t *LaunchItem(gitem_t * item, vec3_t origin, vec3_t velocity, int xr_fla
|
|||
else
|
||||
dropped->think = RQ3_DroppedWeaponThink;
|
||||
// JBravo: weapons and items go away faster in CTF
|
||||
if (g_gametype.integer == GT_CTF || g_gametype.integer == GT_TEAM)
|
||||
if (g_gametype.integer == GT_CTF || (g_gametype.integer == GT_TEAM && !g_RQ3_tdmMode.integer))
|
||||
dropped->nextthink = level.time + RQ3_CTF_RESPAWNTIME_DEFAULT;
|
||||
else if (g_gametype.integer == GT_TEAMPLAY)
|
||||
dropped->nextthink = 0;
|
||||
|
@ -818,7 +821,7 @@ gentity_t *LaunchItem(gitem_t * item, vec3_t origin, vec3_t velocity, int xr_fla
|
|||
else
|
||||
dropped->think = RQ3_DroppedItemThink;
|
||||
// JBravo: weapons and items go away faster in CTF
|
||||
if (g_gametype.integer == GT_CTF || g_gametype.integer == GT_TEAM)
|
||||
if (g_gametype.integer == GT_CTF || (g_gametype.integer == GT_TEAM && !g_RQ3_tdmMode.integer))
|
||||
dropped->nextthink = level.time + RQ3_CTF_RESPAWNTIME_DEFAULT;
|
||||
else if (g_gametype.integer == GT_TEAMPLAY)
|
||||
dropped->nextthink = 0;
|
||||
|
@ -1491,7 +1494,9 @@ void RQ3_ResetItem(int itemTag)
|
|||
float angle = rand() % 360;
|
||||
|
||||
// JBravo: no resetting items in TP or CTB
|
||||
if (g_gametype.integer >= GT_TEAM)
|
||||
if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_CTF)
|
||||
return;
|
||||
if (g_gametype.integer == GT_TEAM && !g_RQ3_tdmMode.integer)
|
||||
return;
|
||||
|
||||
switch (itemTag) {
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.129 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.128 2002/10/26 18:29:17 jbravo
|
||||
// Added allweap and allitem funtionality.
|
||||
//
|
||||
|
@ -1387,6 +1390,7 @@ extern vmCvar_t g_RQ3_weaponban; // JBravo: Bitmapped cvar for weaponbanning
|
|||
extern vmCvar_t g_RQ3_ctb_respawndelay; // JBravo: delay in seconds for ctb respawns
|
||||
extern vmCvar_t g_RQ3_allWeapons; // JBravo: if set, TP/DM players get all the weapons
|
||||
extern vmCvar_t g_RQ3_allItems; // JBravo: if set, TP/DM players get all the items
|
||||
extern vmCvar_t g_RQ3_tdmMode; // JBravo: Which TDM mode do we want?
|
||||
|
||||
//Slicer: Team Status Cvars for MM
|
||||
//extern vmCvar_t g_RQ3_team1ready;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.125 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.124 2002/10/26 22:03:43 jbravo
|
||||
// Made TeamDM work RQ3 style.
|
||||
//
|
||||
|
@ -457,6 +460,7 @@ vmCvar_t g_RQ3_weaponban;
|
|||
vmCvar_t g_RQ3_ctb_respawndelay;
|
||||
vmCvar_t g_RQ3_allWeapons;
|
||||
vmCvar_t g_RQ3_allItems;
|
||||
vmCvar_t g_RQ3_tdmMode;
|
||||
|
||||
// aasimon: Ref System for MM
|
||||
vmCvar_t g_RQ3_AllowRef;
|
||||
|
@ -600,6 +604,7 @@ static cvarTable_t gameCvarTable[] = {
|
|||
{&g_RQ3_ctb_respawndelay, "g_RQ3_ctb_respawndelay", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_allWeapons, "g_RQ3_allWeapons", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_allItems, "g_RQ3_allItems", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_tdmMode, "g_RQ3_tdmMode", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_SYSTEMINFO, 0, qtrue},
|
||||
{&g_RQ3_idleaction, "g_RQ3_idleaction", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_weaponban, "g_RQ3_weaponban", "511", CVAR_ARCHIVE, 0, qtrue},
|
||||
//Blaze: let cvar.cfg be set by the server admins
|
||||
|
@ -1066,7 +1071,7 @@ void G_InitGame(int levelTime, int randomSeed, int restart)
|
|||
}
|
||||
//Elder: spawn unique items.
|
||||
// JBravo: unless we are in Teamplay
|
||||
if (g_gametype.integer < GT_TEAM) {
|
||||
if (g_gametype.integer < GT_TEAM || (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer)) {
|
||||
RQ3_StartUniqueItems();
|
||||
}
|
||||
// Elder: force sv_floodprotect to 0 -- remove when we finish
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.143 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.142 2002/10/26 22:03:43 jbravo
|
||||
// Made TeamDM work RQ3 style.
|
||||
//
|
||||
|
@ -699,6 +702,9 @@ void CleanLevel()
|
|||
gentity_t *ent;
|
||||
int i;
|
||||
|
||||
if (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer)
|
||||
return;
|
||||
|
||||
ClearBodyQue();
|
||||
ent = &g_entities[MAX_CLIENTS];
|
||||
for (i = MAX_CLIENTS; i < level.num_entities; i++, ent++) {
|
||||
|
@ -1014,6 +1020,11 @@ void RQ3_Cmd_Choose_f(gentity_t * ent)
|
|||
return; // not fully in game yet
|
||||
}
|
||||
|
||||
if (g_gametype.integer == GT_TEAM && g_RQ3_tdmMode.integer) {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"This Team DM mode does not allow you to choose weapons or items.\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
cmd = ConcatArgs(1);
|
||||
|
||||
if (Q_stricmp(cmd, RQ3_MP5_NAME) == 0 || Q_stricmp(cmd, "mp5") == 0) {
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.17 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.16 2002/09/01 21:15:47 makro
|
||||
// no message
|
||||
//
|
||||
|
@ -431,7 +434,8 @@ qboolean UI_ConsoleCommand(int realTime)
|
|||
}
|
||||
//Makro - adding popup for choose commands
|
||||
if (Q_stricmp(cmd, "ui_RQ3_loadout") == 0) {
|
||||
if (trap_Cvar_VariableValue("g_gametype") == GT_TEAMPLAY || trap_Cvar_VariableValue("g_gametype") == GT_CTF)
|
||||
if (trap_Cvar_VariableValue("g_gametype") == GT_TEAMPLAY || trap_Cvar_VariableValue("g_gametype") == GT_CTF ||
|
||||
trap_Cvar_VariableValue("g_gametype") == GT_TEAM)
|
||||
_UI_SetActiveMenu(UIMENU_RQ3_WEAPON);
|
||||
else
|
||||
Com_Printf("Not playing teamplay.\n");
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.54 2002/10/29 01:34:52 jbravo
|
||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||
//
|
||||
// Revision 1.53 2002/09/09 02:39:22 niceass
|
||||
// updated version again from 2.21 to 2.25
|
||||
//
|
||||
|
@ -2338,6 +2341,7 @@ void UI_BuildIngameServerInfoList()
|
|||
int gametype = atoi(Info_ValueForKey(info, "g_gametype"));
|
||||
int matchmode = atoi(Info_ValueForKey(info, "g_RQ3_matchmode"));
|
||||
int limit = atoi(Info_ValueForKey(info, "timelimit"));
|
||||
int tdmMode = atoi(Info_ValueForKey(info, "g_RQ3_tdmMode"));
|
||||
|
||||
AddIngameLine("RQ3 Version", Info_ValueForKey(info, "g_RQ3_version"));
|
||||
AddIngameLine("Host name", Info_ValueForKey(info, "sv_hostname"));
|
||||
|
@ -2354,6 +2358,11 @@ void UI_BuildIngameServerInfoList()
|
|||
AddIngameLine("Team 1", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team1Name"), Info_ValueForKey(info, "g_RQ3_team1model")));
|
||||
AddIngameLine("Team 2", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team2Name"), Info_ValueForKey(info, "g_RQ3_team2model")));
|
||||
}
|
||||
case GT_TEAM:
|
||||
AddIngameLine("Team 1", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team1Name"), Info_ValueForKey(info, "g_RQ3_team1model")));
|
||||
AddIngameLine("Team 2", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team2Name"), Info_ValueForKey(info, "g_RQ3_team2model")));
|
||||
if (gametype == GT_TEAM)
|
||||
AddIngameLine("TeamDM Mode", (tdmMode != 0) ? "Classic" : "TP style");
|
||||
case GT_CTF:
|
||||
{
|
||||
limit = atoi(Info_ValueForKey(info, "capturelimit"));
|
||||
|
@ -4358,7 +4367,8 @@ static void UI_RunMenuScript(char **args)
|
|||
//Makro - weapon menu after joining a team
|
||||
} else if (Q_stricmp(name, "weapAfterJoin") == 0) {
|
||||
//only in teamplay
|
||||
if (trap_Cvar_VariableValue("g_gametype") == GT_TEAMPLAY || trap_Cvar_VariableValue("g_gametype") == GT_CTF) {
|
||||
if (trap_Cvar_VariableValue("g_gametype") == GT_TEAMPLAY || trap_Cvar_VariableValue("g_gametype") == GT_CTF ||
|
||||
trap_Cvar_VariableValue("g_gametype") == GT_TEAM) {
|
||||
if (ui_RQ3_weapAfterJoin.integer) {
|
||||
_UI_SetActiveMenu(UIMENU_RQ3_WEAPON);
|
||||
}
|
||||
|
|
|
@ -735,6 +735,27 @@
|
|||
showCvar { "3" }
|
||||
}
|
||||
|
||||
// tdmMode
|
||||
itemdef {
|
||||
name tdm
|
||||
group "opt_gametype"
|
||||
style WINDOW_STYLE_EMPTY
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Team DM Mode:"
|
||||
cvar "g_RQ3_tdmMode"
|
||||
cvarFloatList { "Classic" 1 "TP style" 0 }
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED
|
||||
rect 440 128 168 20
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 84
|
||||
textaligny 14
|
||||
textscale .225
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
cvarTest "ui_actualNetGameType"
|
||||
showCvar { "3" }
|
||||
}
|
||||
|
||||
// RQ3 Teamplay //
|
||||
// Round limit
|
||||
|
||||
|
|
Loading…
Reference in a new issue