mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 01:21:12 +00:00
Added allweap and allitem funtionality.
This commit is contained in:
parent
c8afc97acc
commit
8bed310305
5 changed files with 46 additions and 0 deletions
Binary file not shown.
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.119 2002/10/26 18:29:17 jbravo
|
||||
// Added allweap and allitem funtionality.
|
||||
//
|
||||
// Revision 1.118 2002/10/21 21:00:39 slicer
|
||||
// New MM features and bug fixes
|
||||
//
|
||||
|
@ -1832,6 +1835,33 @@ void ClientSpawn(gentity_t * ent)
|
|||
ClientEndFrame(ent);
|
||||
ent->client->noHead = qfalse;
|
||||
|
||||
// JBravo: adding allweapons.
|
||||
if (g_RQ3_allWeapons.integer) {
|
||||
ent->client->ps.stats[STAT_WEAPONS] = (1 << WP_NUM_WEAPONS) - 1 - (1 << WP_NONE);
|
||||
ent->client->weaponCount[WP_SSG3000] = 1;
|
||||
ent->client->weaponCount[WP_MP5] = 1;
|
||||
ent->client->weaponCount[WP_M3] = 1;
|
||||
ent->client->weaponCount[WP_M4] = 1;
|
||||
ent->client->weaponCount[WP_AKIMBO] = 1;
|
||||
ent->client->weaponCount[WP_HANDCANNON] = 1;
|
||||
ent->client->uniqueWeapons = 5;
|
||||
for (i = 0; i < MAX_WEAPONS; i++) {
|
||||
ent->client->ps.ammo[i] = ClipAmountForAmmo(i);
|
||||
Add_Ammo(ent, i, 100, 1);
|
||||
}
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= (1 << WP_GRENADE) | (1 << WP_KNIFE);
|
||||
}
|
||||
|
||||
// JBravo: adding allitems.
|
||||
if (g_RQ3_allItems.integer) {
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] = (1 << HI_KEVLAR);
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_LASER);
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SILENCER);
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_BANDOLIER);
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SLIPPERS);
|
||||
ent->client->uniqueItems = 5;
|
||||
}
|
||||
|
||||
// JBravo: lock the player down
|
||||
if (g_gametype.integer == GT_CTF && ent->client->sess.sessionTeam == TEAM_SPECTATOR &&
|
||||
(ent->client->sess.savedTeam == TEAM_RED || ent->client->sess.savedTeam == TEAM_BLUE) &&
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.173 2002/10/26 18:29:17 jbravo
|
||||
// Added allweap and allitem funtionality.
|
||||
//
|
||||
// Revision 1.172 2002/10/26 00:37:18 jbravo
|
||||
// New multiple item code and added PB support to the UI
|
||||
//
|
||||
|
@ -732,6 +735,7 @@ void Cmd_Give_f(gentity_t * ent)
|
|||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SILENCER);
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_BANDOLIER);
|
||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SLIPPERS);
|
||||
ent->client->uniqueItems = 5;
|
||||
}
|
||||
|
||||
if (give_all || Q_stricmp(name, "ammo") == 0) {
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.128 2002/10/26 18:29:17 jbravo
|
||||
// Added allweap and allitem funtionality.
|
||||
//
|
||||
// Revision 1.127 2002/10/26 00:37:18 jbravo
|
||||
// New multiple item code and added PB support to the UI
|
||||
//
|
||||
|
@ -1382,6 +1385,8 @@ extern vmCvar_t g_RQ3_ppl_idletime; // JBravo: Seconds Idle before playing an in
|
|||
extern vmCvar_t g_RQ3_idleaction; // JBravo: what to do with Idlers. 0 = sound, 1 = team none, 2 = kick
|
||||
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
|
||||
|
||||
//Slicer: Team Status Cvars for MM
|
||||
//extern vmCvar_t g_RQ3_team1ready;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.123 2002/10/26 18:29:17 jbravo
|
||||
// Added allweap and allitem funtionality.
|
||||
//
|
||||
// Revision 1.122 2002/10/26 00:37:18 jbravo
|
||||
// New multiple item code and added PB support to the UI
|
||||
//
|
||||
|
@ -449,6 +452,8 @@ vmCvar_t g_RQ3_ppl_idletime;
|
|||
vmCvar_t g_RQ3_idleaction;
|
||||
vmCvar_t g_RQ3_weaponban;
|
||||
vmCvar_t g_RQ3_ctb_respawndelay;
|
||||
vmCvar_t g_RQ3_allWeapons;
|
||||
vmCvar_t g_RQ3_allItems;
|
||||
|
||||
// aasimon: Ref System for MM
|
||||
vmCvar_t g_RQ3_AllowRef;
|
||||
|
@ -590,6 +595,8 @@ static cvarTable_t gameCvarTable[] = {
|
|||
{&g_RQ3_tkbanrounds, "g_RQ3_tkbanrounds", "2", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_ppl_idletime, "g_RQ3_ppl_idletime", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&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_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
|
||||
|
|
Loading…
Reference in a new issue