1
0
Fork 0
forked from fte/fteqw

Get stimpacks working in team-deathmatch.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1873 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-01-15 22:35:23 +00:00
parent d35e3d8147
commit d0f050da32

View file

@ -2629,6 +2629,7 @@ float(float iid) UseHealingChem =
local vector source;
local float heal;
local string x;
local float friendly;
if (self.attack_finished > time)
@ -2658,11 +2659,15 @@ float(float iid) UseHealingChem =
traceline (source, source + v_forward*64, 32, self);
if (trace_ent.classname == "player" && trace_ent.team == self.team)
{
if (trace_ent.health <= 0 && coop == 1)
if (coop)
friendly = true; //all players are friendly in coop
if (teamplay)
friendly = trace_ent.team == self.team;
if (trace_ent.health <= 0 && friendly)
{
return RevivePlayer(self, trace_ent);
}
if (trace_ent.health <= 0 && coop == 0)
if (!friendly)
return false;
if (trace_ent.regen >= 1)