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,9 +183,11 @@ void() SUB_CalcAngleMoveDone =
void() DelayThink =
{
local float rem = self.killtarget != self.targetname;
activator = self.enemy;
SUB_UseTargets ();
remove(self);
if (rem)
remove(self);
};
/*
@ -245,10 +247,11 @@ void() SUB_UseTargets =
//
if (self.killtarget)
{
local string kt = self.killtarget;
t = world;
do
{
t = find (t, targetname, self.killtarget);
t = find (t, targetname, kt);
if (!t)
return;
remove (t);

View file

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

View file

@ -74,4 +74,4 @@ void() path_corner =
{
movetarget_f ();
};
//============================================================================
//============================================================================

View file

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

View file

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