mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
bandage bug fix
This commit is contained in:
parent
46cb527995
commit
f715343ee5
4 changed files with 14 additions and 68 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.81 2002/06/23 19:27:52 niceass
|
||||
// bandage bug fix
|
||||
//
|
||||
// Revision 1.80 2002/06/19 18:13:57 jbravo
|
||||
// New TNG spawning system :)
|
||||
//
|
||||
|
@ -657,7 +660,6 @@ void ClientTimerActions(gentity_t * ent, int msec)
|
|||
ent->client->bleed_remain = 0;
|
||||
ent->client->bleeding = 0;
|
||||
ent->client->bleedtick = 0;
|
||||
ent->client->bleedBandageCount = 0;
|
||||
//Elder: moved from somewhere - err, g_cmds.c I think
|
||||
ent->client->ps.stats[STAT_RQ3] &= ~RQ3_LEGDAMAGE;
|
||||
// NiceAss: clear last player to hit you.
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.142 2002/06/23 19:27:18 niceass
|
||||
// bandage bug fix
|
||||
//
|
||||
// Revision 1.141 2002/06/23 15:22:53 slicer
|
||||
// Future 2.1 Matchmode Features - PART II
|
||||
//
|
||||
|
@ -2283,8 +2286,6 @@ void Cmd_Bandage(gentity_t * ent)
|
|||
|
||||
ent->client->ps.weaponTime += BLEED_BANDAGE_TIME;
|
||||
ent->client->bleedtick = 4;
|
||||
//Elder: added to track health to bleed off
|
||||
ent->client->bleedBandageCount = BLEED_BANDAGE;
|
||||
} else {
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"No need to bandage.\n\""));
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.104 2002/06/23 19:25:11 niceass
|
||||
// bandage bug fix
|
||||
//
|
||||
// Revision 1.103 2002/06/23 19:12:17 slicer
|
||||
// More Matchmode work
|
||||
//
|
||||
|
@ -612,7 +615,6 @@ struct gclient_s {
|
|||
//qboolean isBleeding; // Blaze: is client bleeding
|
||||
// int legDamage; // Blaze: Client has leg damage - holds number of hits too
|
||||
int bleedtick; // Blaze: Holds # of seconds till bleeding stops.
|
||||
int bleedBandageCount; // Elder: hack to restrict amount of bleeding to 3 points
|
||||
int headShotTime; // Elder: got headshot?
|
||||
//Elder: server only needs to know for sniper spread - ARGH
|
||||
// int zoomed; // Hawkins (SSG zoom)
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.15 2002/06/23 19:24:19 niceass
|
||||
// bandage bug fix
|
||||
//
|
||||
// Revision 1.14 2002/06/16 20:06:14 jbravo
|
||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||
//
|
||||
|
@ -52,20 +55,7 @@ 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.weaponstate == WEAPON_BANDAGING && targ->client->bleedBandageCount < 1) {
|
||||
//Elder: skip damage being dealt
|
||||
//TODO: check bleed_remain again -- if it's > 11, then reset bleedBandageCount?
|
||||
//That would probably remove the long-time AQ2 headshot bandage bug
|
||||
} else {
|
||||
targ->health -= damage;
|
||||
}
|
||||
|
||||
//Elder: hack to count off health so we only lose 6 health on a bandage
|
||||
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)
|
||||
targ->client->bleedBandageCount--;
|
||||
}
|
||||
targ->health -= damage;
|
||||
|
||||
if (targ->health <= 0) {
|
||||
player_die(targ, &g_entities[targ->client->lasthurt_client],
|
||||
|
@ -93,53 +83,4 @@ void CheckBleeding(gentity_t * targ)
|
|||
void StartBandage(gentity_t * ent)
|
||||
{
|
||||
ent->client->bleeding = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
int damage;
|
||||
int temp;
|
||||
vec3_t norm;
|
||||
VectorSet(norm, 0.0, 0.0, 0.0 );
|
||||
if ( !(ent->client->bleeding) || (ent->health <= 0) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
temp = (int)(ent->client->bleeding * .2);
|
||||
ent->client->bleeding -= temp;
|
||||
if ( temp <= 0 )
|
||||
temp = 1;
|
||||
ent->client->bleed_remain += temp;
|
||||
damage = (int)(ent->client->bleed_remain/realBleedTime);
|
||||
if ( ent->client->bleed_remain >= realBleedTime )
|
||||
{
|
||||
ent->health -= damage;
|
||||
if ( damage > 1 )
|
||||
{
|
||||
// action doens't do this
|
||||
//ent->client->damage_blood += damage; // for feedback
|
||||
}
|
||||
if ( ent->health <= 0 )
|
||||
{
|
||||
meansOfDeath = ent->client->attacker_mod;
|
||||
locOfDeath = ent->client->attacker_loc;
|
||||
Killed(ent, ent->client->attacker, ent->client->attacker, damage, ent->s.origin);
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->client->bleed_remain %= realBleedTime;
|
||||
}
|
||||
if (ent->client->bleeddelay <= level.time)
|
||||
{
|
||||
vec3_t pos;
|
||||
ent->client->bleeddelay = level.time + 2; // 2 seconds
|
||||
VectorAdd(ent->client->bleedloc_offset, ent->absmax, pos);
|
||||
//gi.cprintf(ent, PRINT_HIGH, "Bleeding now.\n");
|
||||
EjectBlooder(ent, pos, pos);
|
||||
|
||||
// do bleeding
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
Loading…
Reference in a new issue