mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
kicked the reload bugs ass!
This commit is contained in:
parent
9bd6a0d156
commit
dbd31ce8f2
4 changed files with 37 additions and 18 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.74 2002/05/21 04:58:27 blaze
|
||||
// kicked the reload bugs ass!
|
||||
//
|
||||
// Revision 1.73 2002/05/11 19:18:20 makro
|
||||
// Sand surfaceparm
|
||||
//
|
||||
|
@ -1905,11 +1908,12 @@ static void PM_Reload( void )
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check for fast-reload interrupt
|
||||
if (pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_SSG3000)
|
||||
{
|
||||
if (pm->ps->stats[STAT_RELOADTIME] > 0) {
|
||||
if (pm->ps->stats[STAT_RELOADTIME] > 0)// && (pm->ps->weapon == WP_M3 && pm->ps->stats[STAT_RELOADTIME] < RQ3_M3_RELOAD_DELAY - RQ3_M3_ALLOW_FAST_RELOAD_DELAY || pm->ps->weapon == WP_SSG3000 && pm->ps->stats[STAT_RELOADTIME] < RQ3_SSG3000_RELOAD_DELAY - RQ3_SSG3000_ALLOW_FAST_RELOAD_DELAY))
|
||||
{
|
||||
if ( pm->ps->stats[STAT_RQ3] & RQ3_LOCKRELOADS )
|
||||
{
|
||||
//Com_Printf("============= Locked out in fast-reload interrupt\n");
|
||||
|
@ -1918,10 +1922,11 @@ static void PM_Reload( void )
|
|||
{
|
||||
//if (pm->ps->ammo[pm->ps->weapon] + pm->ps->stats[STAT_RELOADATTEMPTS] < ClipAmountForAmmo(pm->ps->weapon) &&
|
||||
//pm->ps->stats[STAT_RELOADATTEMPTS] < pm->ps->stats[STAT_CLIPS])
|
||||
if (pm->ps->stats[STAT_RELOADATTEMPTS] < ClipAmountForAmmo(pm->ps->weapon))
|
||||
if (pm->ps->stats[STAT_RELOADATTEMPTS] < (ClipAmountForAmmo(pm->ps->weapon) - pm->ps->ammo[pm->ps->weapon]) ) //only let them cue up enough shots to fill the gun
|
||||
{
|
||||
//Com_Printf("Hit fast-reload entrance\n");
|
||||
// add to reload queue and enable fast-reloads flag
|
||||
|
||||
pm->ps->stats[STAT_RQ3] |= RQ3_FASTRELOADS;
|
||||
pm->ps->stats[STAT_RELOADATTEMPTS]++;
|
||||
//Com_Printf("======== Reload attempts: %i ========\n", pm->ps->stats[STAT_RELOADATTEMPTS]);
|
||||
|
@ -1988,10 +1993,11 @@ static void PM_Reload( void )
|
|||
if (pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_SSG3000) {
|
||||
if ((pm->ps->stats[STAT_RQ3] & RQ3_FASTRELOADS) && pm->ps->stats[STAT_RELOADATTEMPTS] > 0)
|
||||
{
|
||||
//Com_Printf("reloadtime (%d)\n",pm->ps->stats[STAT_RELOADTIME]);
|
||||
if (pm->ps->weapon == WP_M3)
|
||||
{
|
||||
// knock down reload time if doing fast-reloads
|
||||
if (pm->ps->stats[STAT_RELOADTIME] > RQ3_M3_FAST_RELOAD_DELAY)
|
||||
if (pm->ps->stats[STAT_RELOADTIME] < RQ3_M3_ALLOW_FAST_RELOAD_DELAY && pm->ps->stats[STAT_RELOADTIME] > RQ3_M3_FAST_RELOAD_DELAY)
|
||||
{
|
||||
//Com_Printf("Reducing reload time\n");
|
||||
pm->ps->stats[STAT_RELOADTIME] = RQ3_M3_FAST_RELOAD_DELAY;
|
||||
|
@ -2000,7 +2006,7 @@ static void PM_Reload( void )
|
|||
else
|
||||
{
|
||||
// knock down reload time if doing fast-reloads
|
||||
if (pm->ps->stats[STAT_RELOADTIME] > RQ3_SSG3000_FAST_RELOAD_DELAY)
|
||||
if (pm->ps->stats[STAT_RELOADTIME] < RQ3_SSG3000_ALLOW_FAST_RELOAD_DELAY && pm->ps->stats[STAT_RELOADTIME] > RQ3_SSG3000_FAST_RELOAD_DELAY)
|
||||
{
|
||||
//Com_Printf("Reducing reload time\n");
|
||||
pm->ps->stats[STAT_RELOADTIME] = RQ3_SSG3000_FAST_RELOAD_DELAY;
|
||||
|
@ -2076,7 +2082,7 @@ static void PM_Reload( void )
|
|||
|
||||
if (pm->ps->stats[STAT_RELOADATTEMPTS] > 0)
|
||||
{
|
||||
PM_StartWeaponAnim(WP_ANIM_EXTRA1);
|
||||
PM_StartWeaponAnim( WP_ANIM_EXTRA1 );
|
||||
//PM_StartWeaponAnim(WP_ANIM_RELOAD);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.68 2002/05/21 04:58:27 blaze
|
||||
// kicked the reload bugs ass!
|
||||
//
|
||||
// Revision 1.67 2002/05/19 21:27:28 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
|
@ -367,13 +370,13 @@ extern radio_msg_t female_radio_msgs[];
|
|||
#define RQ3_AKIMBO_RELOAD_DELAY 2500
|
||||
|
||||
#define RQ3_M3_RELOAD_DELAY 1100
|
||||
#define RQ3_M3_ALLOW_FAST_RELOAD_DELAY 200 // 700 Time into reload to enable fast-reloads
|
||||
#define RQ3_M3_ALLOW_FAST_RELOAD_DELAY 700 // 700 Time into reload to enable fast-reloads
|
||||
#define RQ3_M3_FAST_RELOAD_DELAY 500 // Fast reload time
|
||||
//#define RQ3_M3_START_RELOAD_DELAY 300 // Start index point of fast reload
|
||||
#define RQ3_M3_FINISH_RELOAD_DELAY 300 // Amount of time after all fast reloads
|
||||
|
||||
#define RQ3_SSG3000_RELOAD_DELAY 3100
|
||||
#define RQ3_SSG3000_ALLOW_FAST_RELOAD_DELAY 1400 //2200 Time into reload to enable fast-reloads
|
||||
#define RQ3_SSG3000_ALLOW_FAST_RELOAD_DELAY 1800 //1100 Time into reload to enable fast-reloads
|
||||
#define RQ3_SSG3000_FAST_RELOAD_DELAY 600 // Fast reload time
|
||||
//#define RQ3_SSG3000_START_RELOAD_DELAY 1700 // Start index point of fast reload
|
||||
#define RQ3_SSG3000_FINISH_RELOAD_DELAY 800 // Amount of time after all fast reloads
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.73 2002/05/21 04:58:27 blaze
|
||||
// kicked the reload bugs ass!
|
||||
//
|
||||
// Revision 1.72 2002/05/06 21:41:01 slicer
|
||||
// Added rq3_cmd
|
||||
//
|
||||
|
@ -1490,15 +1493,17 @@ void ClientThink_real( gentity_t *ent ) {
|
|||
//Elder: someone added
|
||||
if ( bJumping ) JumpKick( ent );
|
||||
|
||||
//Blaze: Remove all this stuff
|
||||
/*
|
||||
//Elder: added for akimbos and 3rb and sniper zoom
|
||||
switch( ent->client->ps.weapon ) {
|
||||
case WP_AKIMBO:
|
||||
/*
|
||||
if ( ent->client->weaponfireNextTime != 0 &&
|
||||
level.time >= ent->client->weaponfireNextTime) {
|
||||
FireWeapon( ent );
|
||||
}
|
||||
*/
|
||||
|
||||
//if ( ent->client->weaponfireNextTime != 0 &&
|
||||
// level.time >= ent->client->weaponfireNextTime) {
|
||||
// FireWeapon( ent );
|
||||
//}
|
||||
|
||||
break;
|
||||
case WP_M3:
|
||||
//Elder: try to do a fast reload if it's queued
|
||||
|
@ -1523,7 +1528,7 @@ void ClientThink_real( gentity_t *ent ) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
*/
|
||||
// save results of triggers and client events
|
||||
if (ent->client->ps.eventSequence != oldEventSequence) {
|
||||
ent->eventTime = level.time;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.113 2002/05/21 04:58:28 blaze
|
||||
// kicked the reload bugs ass!
|
||||
//
|
||||
// Revision 1.112 2002/05/19 17:50:33 jbravo
|
||||
// Team fixes for DM
|
||||
//
|
||||
|
@ -2122,13 +2125,14 @@ void Cmd_Bandage (gentity_t *ent)
|
|||
void Cmd_Reload_f (edict_t *ent)
|
||||
==================
|
||||
*/
|
||||
/* Dont need this code any more
|
||||
void Cmd_Reload( gentity_t *ent )
|
||||
{
|
||||
int weapon, ammotoadd, delay = 0;
|
||||
|
||||
if (ent->client->ps.pm_type == PM_SPECTATOR)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
//Elder: added for redundant check but shouldn't need to come here - handled in cgame
|
||||
if(ent->client->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
|
@ -2184,7 +2188,7 @@ void Cmd_Reload( gentity_t *ent )
|
|||
if (ent->client->ps.weaponstate == WEAPON_RELOADING && ent->client->numClips[WP_M3] > 0) {
|
||||
//Have we fast reloaded before?
|
||||
if (ent->client->fastReloads) {
|
||||
if (level.time - ent->client->lastReloadTime < RQ3_M3_FAST_RELOAD_DELAY) {
|
||||
if (level.time - ent->client->lastReloadTime < RQ3_M3_ALLOW_FAST_RELOAD_DELAY) {
|
||||
//not enough time has passed for a fast-reload attempt so ignore it
|
||||
return;
|
||||
} else if (level.time - ent->client->lastReloadTime <= RQ3_M3_RELOAD_DELAY) {
|
||||
|
@ -2253,7 +2257,7 @@ void Cmd_Reload( gentity_t *ent )
|
|||
if (ent->client->ps.weaponstate == WEAPON_RELOADING && ent->client->numClips[WP_SSG3000] > 0) {
|
||||
//Have we fast reloaded before?
|
||||
if (ent->client->fastReloads) {
|
||||
if (level.time - ent->client->lastReloadTime < RQ3_SSG3000_FAST_RELOAD_DELAY) {
|
||||
if (level.time - ent->client->lastReloadTime < RQ3_SSG3000_ALLOW_FAST_RELOAD_DELAY) {
|
||||
//not enough time has passed for a fast-reload attempt so ignore it
|
||||
return;
|
||||
} else if (level.time - ent->client->lastReloadTime <= RQ3_SSG3000_RELOAD_DELAY) {
|
||||
|
@ -2375,6 +2379,7 @@ void Cmd_Reload( gentity_t *ent )
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
==================
|
||||
|
|
Loading…
Reference in a new issue