mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
Fixed bandage bugs ( i hope )
This commit is contained in:
parent
3627e23e3a
commit
d477614a01
8 changed files with 68 additions and 22 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.34 2002/03/18 19:19:08 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.33 2002/03/17 13:41:28 jbravo
|
||||
// Added a debug cmd to print out stuff when bugs occor
|
||||
//
|
||||
|
@ -94,7 +97,8 @@ static void CG_DropWeapon_f (void) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ((cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK)
|
||||
// if ((cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK)
|
||||
if(cg.snap->ps.weaponstate == WEAPON_BANDAGING)
|
||||
{
|
||||
CG_Printf("You are too busy bandaging!\n");
|
||||
return;
|
||||
|
@ -160,7 +164,8 @@ static void CG_Bandage_f (void) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(cg.snap->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
CG_Printf("You are already bandaging!\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.55 2002/03/18 19:19:08 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.54 2002/03/16 21:48:39 niceass
|
||||
// All new shell ejection code
|
||||
//
|
||||
|
@ -1997,7 +2000,8 @@ void CG_NextWeapon_f( void ) {
|
|||
}
|
||||
|
||||
//Elder: added
|
||||
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(cg.snap->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
CG_Printf("You are too busy bandaging...\n");
|
||||
return;
|
||||
}
|
||||
|
@ -2064,7 +2068,8 @@ void CG_PrevWeapon_f( void ) {
|
|||
}
|
||||
|
||||
//Elder: added
|
||||
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(cg.snap->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
CG_Printf("You are too busy bandaging...\n");
|
||||
return;
|
||||
}
|
||||
|
@ -2138,7 +2143,8 @@ void CG_SpecialWeapon_f( void ) {
|
|||
}
|
||||
|
||||
//Elder: added
|
||||
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(cg.snap->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
CG_Printf("You are too busy bandaging...\n");
|
||||
return;
|
||||
}
|
||||
|
@ -2353,7 +2359,8 @@ void CG_Weapon_f( void ) {
|
|||
}
|
||||
|
||||
//Elder: added to prevent weapon switching while bandaging
|
||||
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(cg.snap->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
CG_Printf("You are too busy bandaging...\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.62 2002/03/18 19:18:39 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.61 2002/03/11 01:45:46 jbravo
|
||||
// Bye bye backflips! :)
|
||||
//
|
||||
|
@ -2165,7 +2168,11 @@ static void PM_Reload( void )
|
|||
}
|
||||
|
||||
// check for bandaging
|
||||
if (pm->ps->stats[STAT_RQ3] & RQ3_BANDAGE_WORK)
|
||||
/* if (pm->ps->stats[STAT_RQ3] & RQ3_BANDAGE_WORK)
|
||||
return;
|
||||
*/
|
||||
//Slicer
|
||||
if(pm->ps->weaponstate == WEAPON_BANDAGING)
|
||||
return;
|
||||
|
||||
// check for full clip or non-reloadable weapons
|
||||
|
@ -2668,7 +2675,7 @@ static void PM_Weapon( void ) {
|
|||
|
||||
|
||||
// change weapon if time
|
||||
if ( pm->ps->weaponstate == WEAPON_DROPPING ) {
|
||||
if ( pm->ps->weaponstate == WEAPON_DROPPING || pm->ps->weaponstate == WEAPON_BANDAGING ) {
|
||||
PM_FinishWeaponChange();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.59 2002/03/18 19:18:39 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.58 2002/03/02 12:24:30 jbravo
|
||||
// Removed some debugging messages
|
||||
//
|
||||
|
@ -704,7 +707,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) {
|
|||
ent->client->bleedtick = 0;
|
||||
ent->client->bleedBandageCount = 0;
|
||||
//Elder: remove bandage work
|
||||
ent->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_WORK;
|
||||
// ent->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_WORK;
|
||||
//Elder: moved from somewhere - err, g_cmds.c I think
|
||||
ent->client->ps.stats[STAT_RQ3] &= ~RQ3_LEGDAMAGE;
|
||||
// ent->client->ps.weaponstate = WEAPON_RAISING;
|
||||
|
@ -1810,7 +1813,7 @@ void ClientEndFrame( gentity_t *ent ) {
|
|||
}
|
||||
else {
|
||||
ent->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_NEED;
|
||||
ent->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_WORK;
|
||||
// ent->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_WORK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.79 2002/03/18 19:18:39 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.78 2002/03/18 13:39:24 jbravo
|
||||
// Spectators in TP can now use callvote
|
||||
//
|
||||
|
@ -2001,7 +2004,12 @@ void Cmd_Bandage (gentity_t *ent)
|
|||
return;
|
||||
|
||||
//Elder: added so you can't "rebandage"
|
||||
if ((ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
/* if ((ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"You are already bandaging!\n\""));
|
||||
return;
|
||||
}
|
||||
*/
|
||||
if (ent->client->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"You are already bandaging!\n\""));
|
||||
return;
|
||||
}
|
||||
|
@ -2012,7 +2020,7 @@ void Cmd_Bandage (gentity_t *ent)
|
|||
Cmd_Unzoom(ent);
|
||||
|
||||
//Elder: added
|
||||
ent->client->ps.stats[STAT_RQ3] |= RQ3_BANDAGE_WORK;
|
||||
// ent->client->ps.stats[STAT_RQ3] |= RQ3_BANDAGE_WORK;
|
||||
|
||||
//Elder: drop the primed grenade
|
||||
//Moved weapon switch to bg_pmove.c
|
||||
|
@ -2021,8 +2029,9 @@ void Cmd_Bandage (gentity_t *ent)
|
|||
FireWeapon(ent);
|
||||
ent->client->ps.ammo[WP_GRENADE]--;
|
||||
}
|
||||
|
||||
ent->client->ps.weaponstate = WEAPON_DROPPING;
|
||||
//slicer
|
||||
// ent->client->ps.weaponstate = WEAPON_DROPPING;
|
||||
ent->client->ps.weaponstate = WEAPON_BANDAGING;
|
||||
|
||||
if (ent->client->ps.weapon == WP_KNIFE && !(ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)) {
|
||||
ent->client->ps.generic1 = ( ( ent->client->ps.generic1 & ANIM_TOGGLEBIT )
|
||||
|
@ -2063,7 +2072,8 @@ void Cmd_Reload( gentity_t *ent )
|
|||
//G_Printf("(%i) Cmd_Reload: Attempting reload\n", ent->s.clientNum);
|
||||
|
||||
//Elder: added for redundant check but shouldn't need to come here - handled in cgame
|
||||
if ( (ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(ent->client->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
ent->client->fastReloads = 0;
|
||||
ent->client->reloadAttempts = 0;
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"You are too busy bandaging...\n\""));
|
||||
|
@ -2483,7 +2493,8 @@ void Cmd_Weapon(gentity_t *ent)
|
|||
|
||||
//Elder: added since cgame doesn't actually know if its bandaging
|
||||
//if (ent->client->isBandaging == qtrue) {
|
||||
if ( (ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ( (ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(ent->client->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"You'll get to your weapon when you are finished bandaging!\n\""));
|
||||
return;
|
||||
}
|
||||
|
@ -2683,7 +2694,8 @@ void Cmd_DropWeapon_f( gentity_t *ent ) {
|
|||
if (ent->client->ps.pm_type == PM_SPECTATOR)
|
||||
return;
|
||||
// JBravo: no dropping stuff while bandaging. Fix dedicated to GoKu and JesterRace :)
|
||||
if ((ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ((ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(ent->client->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"You are too busy bandaging...\n\""));
|
||||
return;
|
||||
}
|
||||
|
@ -2705,7 +2717,8 @@ void Cmd_DropItem_f( gentity_t *ent )
|
|||
return;
|
||||
|
||||
// JBravo: no dropping stuff while bandaging. Fix dedicated to GoKu and JesterRace :)
|
||||
if ((ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
// if ((ent->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
||||
if(ent->client->ps.weaponstate == WEAPON_BANDAGING) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"You are too busy bandaging...\n\""));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.53 2002/03/18 19:18:39 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.52 2002/03/18 12:25:10 jbravo
|
||||
// Live players dont get fraglines, except their own. Cleanups and some
|
||||
// hacks to get bots to stop using knives only.
|
||||
|
@ -628,7 +631,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
|||
self->client->bleeding = 0;
|
||||
self->client->bleed_remain = 0;
|
||||
//Elder: added;
|
||||
self->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_WORK;
|
||||
// self->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_WORK;
|
||||
self->client->ps.stats[STAT_RQ3] &= ~RQ3_BANDAGE_NEED;
|
||||
self->client->killStreak = 0;
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.23 2002/03/18 19:18:39 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.22 2002/03/12 04:55:31 blaze
|
||||
// stats should only be recored when the round is in progress
|
||||
//
|
||||
|
@ -775,7 +778,8 @@ gentity_t *fire_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
|
|||
// Elder: Statistics tracking
|
||||
if (level.team_round_going) self->client->pers.records[REC_GRENADESHOTS]++;
|
||||
if ( self->client->ps.stats[STAT_HEALTH] <= 0 ||
|
||||
(self->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK ||
|
||||
// (self->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK ||
|
||||
self->client->ps.weaponstate == WEAPON_BANDAGING ||
|
||||
// NiceAss: Should catch any case of switching weapons with a grenade "cocked"
|
||||
self->client->ps.weaponstate == WEAPON_DROPPING ) {
|
||||
//Always drop close range if dead or about to bandage
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.13 2002/03/18 19:18:39 slicer
|
||||
// Fixed bandage bugs ( i hope )
|
||||
//
|
||||
// Revision 1.12 2002/01/11 19:48:30 jbravo
|
||||
// Formatted the source in non DOS format.
|
||||
//
|
||||
|
@ -46,7 +49,8 @@ void CheckBleeding(gentity_t *targ)
|
|||
if (targ->client->bleed_remain >= realBleedTime)
|
||||
{
|
||||
//G_Printf("Bleed Remain: %i Server Time: %i\n", targ->client->bleed_remain, level.time);
|
||||
if ( (targ->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK &&
|
||||
// if ( (targ->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK &&
|
||||
if( targ->client->ps.weaponstate == WEAPON_BANDAGING &&
|
||||
targ->client->bleedBandageCount < 1)
|
||||
{
|
||||
//Elder: skip damage being dealt
|
||||
|
@ -59,7 +63,7 @@ void CheckBleeding(gentity_t *targ)
|
|||
}
|
||||
|
||||
//Elder: hack to count off health so we only lose 6 health on a bandage
|
||||
if ( (targ->client->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK)
|
||||
if ( targ->client->ps.weaponstate == WEAPON_BANDAGING)
|
||||
{
|
||||
//Start hack enforcement once we've ramped down to 1 health/second
|
||||
if (targ->client->bleed_remain <= 10)
|
||||
|
|
Loading…
Reference in a new issue