mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-26 14:11:22 +00:00
I finally fixed snipers spawning with pistol up. g_RQ3_sniperup has been
reinstated.
This commit is contained in:
parent
ce5910d3bc
commit
12f1252314
2 changed files with 39 additions and 46 deletions
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.61 2002/03/23 21:29:42 jbravo
|
||||
// I finally fixed snipers spawning with pistol up. g_RQ3_sniperup has been
|
||||
// reinstated.
|
||||
//
|
||||
// Revision 1.60 2002/03/23 05:17:42 jbravo
|
||||
// Major cleanup of game -> cgame communication with LCA vars.
|
||||
//
|
||||
|
@ -1037,29 +1041,15 @@ int ThrowWeapon( gentity_t *ent, qboolean forceThrow )
|
|||
usercmd_t *ucmd;
|
||||
gitem_t *xr_item;
|
||||
gentity_t *xr_drop;
|
||||
// byte i;
|
||||
// int amount;
|
||||
int weap;
|
||||
|
||||
client = ent->client;
|
||||
ucmd = &ent->client->pers.cmd;
|
||||
|
||||
//if( client->ps.weapon == WP_KNIFE || client->ps.weapon == WP_PISTOL || client->ps.weapon == WP_GRENADE || ( ucmd->buttons & BUTTON_ATTACK ))
|
||||
// return;
|
||||
|
||||
//Elder: TODO: have to add a reloading case:
|
||||
//weaponTime > 0 or weaponState == weapon_dropping? Or both?
|
||||
//Still firing
|
||||
if (!forceThrow)
|
||||
if ( (ucmd->buttons & BUTTON_ATTACK) || client->ps.weaponTime > 0)
|
||||
if ((ucmd->buttons & BUTTON_ATTACK) || client->ps.weaponTime > 0)
|
||||
return 0;
|
||||
|
||||
//Elder: Bandaging case -- handled in cgame
|
||||
//else if (client->isBandaging) {
|
||||
//if ( (ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
//trap_SendServerCommand( ent-g_entities, va("print \"You are too busy bandaging...\n\""));
|
||||
//return;
|
||||
//}
|
||||
//Elder: remove zoom bits
|
||||
Cmd_Unzoom(ent);
|
||||
|
||||
|
@ -1085,18 +1075,12 @@ int ThrowWeapon( gentity_t *ent, qboolean forceThrow )
|
|||
weap = WP_SSG3000;
|
||||
if (weap == 0 )
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
weap = client->ps.weapon;
|
||||
}
|
||||
|
||||
xr_item = BG_FindItemForWeapon( weap );
|
||||
|
||||
//Elder: Send a server command instead of force-setting
|
||||
//client->ps.weapon = WP_PISTOL;
|
||||
//Elder: Don't reset the weapon ammo
|
||||
//client->ps.ammo[ weap ] = 0;
|
||||
client->pers.hadUniqueWeapon[weap] = qtrue;
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.42 2002/03/23 21:29:42 jbravo
|
||||
// I finally fixed snipers spawning with pistol up. g_RQ3_sniperup has been
|
||||
// reinstated.
|
||||
//
|
||||
// Revision 1.41 2002/03/23 05:17:43 jbravo
|
||||
// Major cleanup of game -> cgame communication with LCA vars.
|
||||
//
|
||||
|
@ -716,78 +720,83 @@ void EquipPlayer (gentity_t *ent)
|
|||
|
||||
switch(ent->client->teamplayWeapon) {
|
||||
case WP_SSG3000:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_SSG3000 );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SSG3000 );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE );
|
||||
ent->client->numClips[ WP_SSG3000 ] = RQ3_SSG3000_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[ WP_SSG3000 ] = RQ3_SSG3000_AMMO;
|
||||
ent->client->ps.weapon = WP_SSG3000;
|
||||
ent->client->ps.weaponTime = RQ3_SSG3000_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->numClips[WP_SSG3000] = RQ3_SSG3000_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_SSG3000] = RQ3_SSG3000_AMMO;
|
||||
if (g_RQ3_sniperup.integer == 1) {
|
||||
ent->client->ps.weapon = WP_SSG3000;
|
||||
ent->client->ps.weaponTime = RQ3_SSG3000_ACTIVATE_DELAY;
|
||||
} else {
|
||||
ent->client->ps.weapon = WP_PISTOL;
|
||||
ent->client->ps.weaponTime = RQ3_PISTOL_ACTIVATE_DELAY;
|
||||
}
|
||||
ent->client->weaponCount[WP_SSG3000] = 1;
|
||||
ent->client->uniqueWeapons = 1;
|
||||
break;
|
||||
case WP_MP5:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_MP5 );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE );
|
||||
ent->client->numClips[ WP_MP5 ] = RQ3_MP5_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[ WP_MP5 ] = RQ3_MP5_AMMO;
|
||||
ent->client->numClips[WP_MP5] = RQ3_MP5_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_MP5] = RQ3_MP5_AMMO;
|
||||
ent->client->ps.weapon = WP_MP5;
|
||||
ent->client->ps.weaponTime = RQ3_MP5_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->weaponCount[WP_MP5] = 1;
|
||||
ent->client->uniqueWeapons = 1;
|
||||
break;
|
||||
case WP_M3:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_M3 );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE );
|
||||
ent->client->numClips[ WP_M3 ] = RQ3_M3_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[ WP_M3 ] = RQ3_M3_AMMO;
|
||||
ent->client->numClips[WP_M3] = RQ3_M3_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_M3] = RQ3_M3_AMMO;
|
||||
ent->client->ps.weapon = WP_M3;
|
||||
ent->client->ps.weaponTime = RQ3_M3_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->weaponCount[WP_M3] = 1;
|
||||
ent->client->uniqueWeapons = 1;
|
||||
break;
|
||||
case WP_M4:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_M4 );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE );
|
||||
ent->client->numClips[ WP_M4 ] = RQ3_M4_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[ WP_M4 ] = RQ3_M4_AMMO;
|
||||
ent->client->numClips[WP_M4] = RQ3_M4_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_M4] = RQ3_M4_AMMO;
|
||||
ent->client->ps.weapon = WP_M4;
|
||||
ent->client->ps.weaponTime = RQ3_M4_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->weaponCount[WP_M4] = 1;
|
||||
ent->client->uniqueWeapons = 1;
|
||||
break;
|
||||
case WP_AKIMBO:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_AKIMBO );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE );
|
||||
ent->client->numClips[ WP_AKIMBO ] = RQ3_AKIMBO_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[ WP_AKIMBO ] = RQ3_AKIMBO_AMMO;
|
||||
ent->client->numClips[WP_AKIMBO] = RQ3_AKIMBO_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_AKIMBO] = RQ3_AKIMBO_AMMO;
|
||||
ent->client->ps.weapon = WP_AKIMBO;
|
||||
ent->client->ps.weaponTime = RQ3_AKIMBO_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->weaponCount[WP_AKIMBO] = 1;
|
||||
ent->client->uniqueWeapons = 0;
|
||||
break;
|
||||
case WP_HANDCANNON:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_HANDCANNON );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_KNIFE );
|
||||
ent->client->numClips[ WP_HANDCANNON ] = RQ3_HANDCANNON_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[ WP_HANDCANNON ] = RQ3_HANDCANNON_AMMO;
|
||||
ent->client->numClips[WP_HANDCANNON] = RQ3_HANDCANNON_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_HANDCANNON] = RQ3_HANDCANNON_AMMO;
|
||||
ent->client->ps.weapon = WP_HANDCANNON;
|
||||
ent->client->ps.weaponTime = RQ3_HANDCANNON_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->weaponCount[WP_HANDCANNON] = 1;
|
||||
ent->client->uniqueWeapons = 1;
|
||||
break;
|
||||
case WP_KNIFE:
|
||||
ent->client->ps.stats[STAT_WEAPONS] = ( 1 << WP_KNIFE );
|
||||
ent->client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PISTOL );
|
||||
ent->client->ps.ammo[ WP_KNIFE ] = RQ3_KNIVES_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.ammo[WP_KNIFE] = RQ3_KNIVES_EXTRA_AMMO * bandolierFactor;
|
||||
ent->client->ps.weapon = WP_KNIFE;
|
||||
ent->client->ps.weaponTime = RQ3_KNIFE_ACTIVATE_DELAY;
|
||||
ent->client->weaponCount[ent->client->ps.weapon] = 1;
|
||||
ent->client->weaponCount[WP_KNIFE] = 1;
|
||||
ent->client->uniqueWeapons = 0;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue