From bede62fd3b3323c764ddb4619362aca49c2cc593 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Sun, 24 Feb 2002 18:12:19 +0000 Subject: [PATCH] Added a cvar to control sniper behavior g_RQ3_sniperup. Def 0. if set yo 1 it makes players spawn with the sniper up. --- reaction/game/g_local.h | 5 +++++ reaction/game/g_main.c | 6 ++++++ reaction/game/g_teamplay.c | 8 +++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index 33ab5835..c652b67a 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.48 2002/02/24 18:12:19 jbravo +// Added a cvar to control sniper behavior g_RQ3_sniperup. Def 0. if set yo 1 +// it makes players spawn with the sniper up. +// // Revision 1.47 2002/02/10 21:21:23 slicer // Saving persistant and other data on some events.. // @@ -1085,6 +1089,7 @@ extern vmCvar_t g_RQ3_roundlimit; // JBravo: No. of rounds pr. map extern vmCvar_t g_RQ3_roundtimelimit; // JBravo: Time pr. round extern vmCvar_t g_RQ3_tgren; // JBravo: no. of team grenades extern vmCvar_t g_RQ3_limchasecam; // JBravo: 0 = no chasecam limit, 1 = limited to same team. +extern vmCvar_t g_RQ3_sniperup; // JBravo: 0 = snipers begin with pistol, 1 = begin with sniper extern vmCvar_t RQ3_lca; // JBravo: cvar to signal cgame that LCA is in progress //Slicer: Team Status Cvars for MM extern vmCvar_t RQ3_team1; diff --git a/reaction/game/g_main.c b/reaction/game/g_main.c index 7a6f8fc4..5eea3313 100644 --- a/reaction/game/g_main.c +++ b/reaction/game/g_main.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.24 2002/02/24 18:12:19 jbravo +// Added a cvar to control sniper behavior g_RQ3_sniperup. Def 0. if set yo 1 +// it makes players spawn with the sniper up. +// // Revision 1.23 2002/02/10 04:55:28 jbravo // Fix #1 to zcam jitter. More is probably needed. // @@ -124,6 +128,7 @@ vmCvar_t g_RQ3_roundlimit; vmCvar_t g_RQ3_roundtimelimit; vmCvar_t g_RQ3_tgren; vmCvar_t g_RQ3_limchasecam; +vmCvar_t g_RQ3_sniperup; vmCvar_t RQ3_lca; //Slicer: Team Status Cvars for MM vmCvar_t RQ3_team1; @@ -248,6 +253,7 @@ static cvarTable_t gameCvarTable[] = { { &g_RQ3_roundtimelimit, "g_RQ3_roundtimelimit", "2", 0, 0, qtrue}, { &g_RQ3_tgren, "g_RQ3_tgren", "0", 0, 0, qtrue}, { &g_RQ3_limchasecam, "g_RQ3_limchasecam", "0", 0, 0, qtrue}, + { &g_RQ3_sniperup, "g_RQ3_sniperup", "0", 0, 0, qtrue}, { &RQ3_lca, "RQ3_lca", "0", CVAR_SYSTEMINFO, 0, qfalse}, //Slicer: Team Status Cvars for MM { &RQ3_team1, "RQ3_team1", "0", CVAR_SYSTEMINFO, 0, qfalse}, diff --git a/reaction/game/g_teamplay.c b/reaction/game/g_teamplay.c index d16f3c1a..34f5e377 100644 --- a/reaction/game/g_teamplay.c +++ b/reaction/game/g_teamplay.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.19 2002/02/24 18:12:19 jbravo +// Added a cvar to control sniper behavior g_RQ3_sniperup. Def 0. if set yo 1 +// it makes players spawn with the sniper up. +// // Revision 1.18 2002/02/24 17:56:44 jbravo // Cleaned up EquipPlayer() and made snipers spawn with pistol in hand // @@ -594,7 +598,9 @@ void EquipPlayer (gentity_t *ent) switch(ent->client->ps.weapon) { case WP_SSG3000: - ent->client->ps.weapon = WP_PISTOL; + if (g_RQ3_sniperup.integer == 0) { + ent->client->ps.weapon = WP_PISTOL; + } ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_PISTOL ); ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE ); ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SSG3000 );