attempting to fix judo bug with aiming and grenades

This commit is contained in:
Finny Merrill 2003-12-02 03:37:29 +00:00
parent 6e03505c11
commit e63ce1578a
3 changed files with 19 additions and 2 deletions

View file

@ -246,6 +246,7 @@
//SB
#define TFSTATE_C4THROW 524288 // we're priming the detpack
#define TFSTATE_ASSAULTCANNON 1048576 // we're firing an assault cannon
#define TFSTATE_DISARMED 2097152 // We've been disarmed.
// Defines used by TF_T_Damage (see combat.qc)

View file

@ -560,6 +560,8 @@ void() JudokaRearm =
self.enemy.weaponframe = 0;
}
self.owner.tfstate &= ~TFSTATE_DISARMED;
self.think = SUB_Remove;
self.nextthink = time + 0.1;
};
@ -624,6 +626,10 @@ void() JobJudoka =
trace_ent.current_weapon = WEAP_SNIPER_RIFLE;
#endif
trace_ent.tfstate &= ~(TFSTATE_AIMING | TFSTATE_RL_LASER);
trace_ent.tfstate |= TFSTATE_DISARMED;
//If already reloading, remove that timer
te = find(NIL, netname, "reloadtimer");
while (te)

View file

@ -1159,7 +1159,17 @@ void() TeamFortress_GrenadePrimed =
user = self.owner;
if (!(user.tfstate & TFSTATE_GRENTHROWING) && !user.deadflag) {
local float isdrop = FALSE;
if (((user.tfstate & TFSTATE_DISARMED) && user.attack_finished > time) || user.deadflag)
isdrop = TRUE;
local float isthrowing = FALSE;
if (isdrop || (user.tfstate & TFSTATE_GRENTHROWING))
isthrowing = TRUE;
if (!isthrowing) {
self.nextthink = time + 0.1;
if (!self.think)
@ -1194,7 +1204,7 @@ void() TeamFortress_GrenadePrimed =
// set grenade speed
makevectors (user.v_angle);
if (user.deadflag) {
if (isdrop) {
// if user is dead, throw grenade directly up
newmis.velocity = '0 0 200';
} else {