kicked the reload bugs ass!

This commit is contained in:
Scott Brooks 2002-05-21 04:58:28 +00:00
parent 9bd6a0d156
commit dbd31ce8f2
4 changed files with 37 additions and 18 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.73 2002/05/11 19:18:20 makro
// Sand surfaceparm // Sand surfaceparm
// //
@ -1909,7 +1912,8 @@ static void PM_Reload( void )
// check for fast-reload interrupt // check for fast-reload interrupt
if (pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_SSG3000) 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 ) if ( pm->ps->stats[STAT_RQ3] & RQ3_LOCKRELOADS )
{ {
//Com_Printf("============= Locked out in fast-reload interrupt\n"); //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) && //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]) //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"); //Com_Printf("Hit fast-reload entrance\n");
// add to reload queue and enable fast-reloads flag // add to reload queue and enable fast-reloads flag
pm->ps->stats[STAT_RQ3] |= RQ3_FASTRELOADS; pm->ps->stats[STAT_RQ3] |= RQ3_FASTRELOADS;
pm->ps->stats[STAT_RELOADATTEMPTS]++; pm->ps->stats[STAT_RELOADATTEMPTS]++;
//Com_Printf("======== Reload attempts: %i ========\n", 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->weapon == WP_M3 || pm->ps->weapon == WP_SSG3000) {
if ((pm->ps->stats[STAT_RQ3] & RQ3_FASTRELOADS) && pm->ps->stats[STAT_RELOADATTEMPTS] > 0) 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) if (pm->ps->weapon == WP_M3)
{ {
// knock down reload time if doing fast-reloads // 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"); //Com_Printf("Reducing reload time\n");
pm->ps->stats[STAT_RELOADTIME] = RQ3_M3_FAST_RELOAD_DELAY; pm->ps->stats[STAT_RELOADTIME] = RQ3_M3_FAST_RELOAD_DELAY;
@ -2000,7 +2006,7 @@ static void PM_Reload( void )
else else
{ {
// knock down reload time if doing fast-reloads // 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"); //Com_Printf("Reducing reload time\n");
pm->ps->stats[STAT_RELOADTIME] = RQ3_SSG3000_FAST_RELOAD_DELAY; 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) if (pm->ps->stats[STAT_RELOADATTEMPTS] > 0)
{ {
PM_StartWeaponAnim(WP_ANIM_EXTRA1); PM_StartWeaponAnim( WP_ANIM_EXTRA1 );
//PM_StartWeaponAnim(WP_ANIM_RELOAD); //PM_StartWeaponAnim(WP_ANIM_RELOAD);
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.67 2002/05/19 21:27:28 blaze
// added force and buoyancy to breakables // 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_AKIMBO_RELOAD_DELAY 2500
#define RQ3_M3_RELOAD_DELAY 1100 #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_FAST_RELOAD_DELAY 500 // Fast reload time
//#define RQ3_M3_START_RELOAD_DELAY 300 // Start index point of fast reload //#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_M3_FINISH_RELOAD_DELAY 300 // Amount of time after all fast reloads
#define RQ3_SSG3000_RELOAD_DELAY 3100 #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_FAST_RELOAD_DELAY 600 // Fast reload time
//#define RQ3_SSG3000_START_RELOAD_DELAY 1700 // Start index point of fast reload //#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 #define RQ3_SSG3000_FINISH_RELOAD_DELAY 800 // Amount of time after all fast reloads

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.72 2002/05/06 21:41:01 slicer
// Added rq3_cmd // Added rq3_cmd
// //
@ -1490,15 +1493,17 @@ void ClientThink_real( gentity_t *ent ) {
//Elder: someone added //Elder: someone added
if ( bJumping ) JumpKick( ent ); if ( bJumping ) JumpKick( ent );
//Blaze: Remove all this stuff
/*
//Elder: added for akimbos and 3rb and sniper zoom //Elder: added for akimbos and 3rb and sniper zoom
switch( ent->client->ps.weapon ) { switch( ent->client->ps.weapon ) {
case WP_AKIMBO: case WP_AKIMBO:
/*
if ( ent->client->weaponfireNextTime != 0 && //if ( ent->client->weaponfireNextTime != 0 &&
level.time >= ent->client->weaponfireNextTime) { // level.time >= ent->client->weaponfireNextTime) {
FireWeapon( ent ); // FireWeapon( ent );
} //}
*/
break; break;
case WP_M3: case WP_M3:
//Elder: try to do a fast reload if it's queued //Elder: try to do a fast reload if it's queued
@ -1523,7 +1528,7 @@ void ClientThink_real( gentity_t *ent ) {
default: default:
break; break;
} }
*/
// save results of triggers and client events // save results of triggers and client events
if (ent->client->ps.eventSequence != oldEventSequence) { if (ent->client->ps.eventSequence != oldEventSequence) {
ent->eventTime = level.time; ent->eventTime = level.time;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.112 2002/05/19 17:50:33 jbravo
// Team fixes for DM // Team fixes for DM
// //
@ -2122,6 +2125,7 @@ void Cmd_Bandage (gentity_t *ent)
void Cmd_Reload_f (edict_t *ent) void Cmd_Reload_f (edict_t *ent)
================== ==================
*/ */
/* Dont need this code any more
void Cmd_Reload( gentity_t *ent ) void Cmd_Reload( gentity_t *ent )
{ {
int weapon, ammotoadd, delay = 0; int weapon, ammotoadd, delay = 0;
@ -2184,7 +2188,7 @@ void Cmd_Reload( gentity_t *ent )
if (ent->client->ps.weaponstate == WEAPON_RELOADING && ent->client->numClips[WP_M3] > 0) { if (ent->client->ps.weaponstate == WEAPON_RELOADING && ent->client->numClips[WP_M3] > 0) {
//Have we fast reloaded before? //Have we fast reloaded before?
if (ent->client->fastReloads) { 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 //not enough time has passed for a fast-reload attempt so ignore it
return; return;
} else if (level.time - ent->client->lastReloadTime <= RQ3_M3_RELOAD_DELAY) { } 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) { if (ent->client->ps.weaponstate == WEAPON_RELOADING && ent->client->numClips[WP_SSG3000] > 0) {
//Have we fast reloaded before? //Have we fast reloaded before?
if (ent->client->fastReloads) { 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 //not enough time has passed for a fast-reload attempt so ignore it
return; return;
} else if (level.time - ent->client->lastReloadTime <= RQ3_SSG3000_RELOAD_DELAY) { } else if (level.time - ent->client->lastReloadTime <= RQ3_SSG3000_RELOAD_DELAY) {
@ -2375,6 +2379,7 @@ void Cmd_Reload( gentity_t *ent )
} }
} }
} }
*/
/* /*
================== ==================