mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-23 20:52:29 +00:00
fix SUB_UseTargets so it doesn't wind up nuking everything
This commit is contained in:
parent
5a29efb8e2
commit
1d74a0e909
2 changed files with 8 additions and 3 deletions
5
subs.qc
5
subs.qc
|
@ -179,8 +179,10 @@ void() SUB_CalcAngleMoveDone =
|
|||
|
||||
void() DelayThink =
|
||||
{
|
||||
local integer rem = self.killtarget != self.targetname;
|
||||
activator = self.enemy;
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
dremove(self);
|
||||
};
|
||||
|
||||
|
@ -252,10 +254,11 @@ void() SUB_UseTargets =
|
|||
// kill the killtagets
|
||||
if (self.killtarget)
|
||||
{
|
||||
local string kt = self.killtarget;
|
||||
t = NIL;
|
||||
do
|
||||
{
|
||||
t = find (t, targetname, self.killtarget);
|
||||
t = find (t, targetname, kt);
|
||||
if (!t)
|
||||
return;
|
||||
remove (t);
|
||||
|
|
|
@ -629,8 +629,10 @@ void() trigger_onlyregistered_touch =
|
|||
self.attack_finished = time + 2;
|
||||
if (cvar("registered"))
|
||||
{
|
||||
local integer rem = self.targetname != self.killtarget;
|
||||
self.message = "";
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
remove (self);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue