more SUB_UseTargets fixes and a trailing \n

This commit is contained in:
Bill Currie 2002-04-26 20:10:46 +00:00
parent 59ec64557a
commit ec46bd7cb7
5 changed files with 17 additions and 7 deletions

View file

@ -183,8 +183,10 @@ void() SUB_CalcAngleMoveDone =
void() DelayThink = void() DelayThink =
{ {
local float rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem)
remove(self); remove(self);
}; };
@ -245,10 +247,11 @@ void() SUB_UseTargets =
// //
if (self.killtarget) if (self.killtarget)
{ {
local string kt = self.killtarget;
t = world; t = world;
do do
{ {
t = find (t, targetname, self.killtarget); t = find (t, targetname, kt);
if (!t) if (!t)
return; return;
remove (t); remove (t);

View file

@ -520,8 +520,10 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar("registered")) if (cvar("registered"))
{ {
local float rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem)
remove (self); remove (self);
} }
else else

View file

@ -152,8 +152,10 @@ void() SUB_CalcAngleMoveDone =
//============================================================================= //=============================================================================
void() DelayThink = void() DelayThink =
{ {
local integer rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem)
remove(self); remove(self);
}; };
/* /*
@ -206,10 +208,11 @@ void() SUB_UseTargets =
// //
if (self.killtarget) if (self.killtarget)
{ {
local string kt = self.killtarget;
t = world; t = world;
do do
{ {
t = find (t, targetname, self.killtarget); t = find (t, targetname, kt);
if (!t) if (!t)
return; return;
remove (t); remove (t);

View file

@ -441,8 +441,10 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar("registered")) if (cvar("registered"))
{ {
local integer rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem)
remove (self); remove (self);
} }
else else