SERVER: Allow .killtarget and .message to fire in SUB_UseTargets() without any normal targets set

This commit is contained in:
cypress 2023-08-26 14:56:48 -04:00
parent 742c9aad86
commit 763a7d75b5
1 changed files with 23 additions and 24 deletions

View File

@ -82,6 +82,29 @@ void() SUB_UseTargets =
if (self.target8)
tempcount = tempcount + 1;
//
// print the message
//
if (activator.classname == "player" && self.message != "")
{
centerprint (activator, self.message);
}
//
// kill the killtagets
//
if (self.killtarget)
{
t = world;
do
{
t = find (t, targetname, self.killtarget);
if (!t)
breakthis = true;
remove (t);
} while (!breakthis);
}
while(tempcount > temptotal)
{
temptotal = temptotal + 1;
@ -125,30 +148,6 @@ void() SUB_UseTargets =
return;
}
//
// print the message
//
if (activator.classname == "player" && self.message != "")
{
centerprint (activator, self.message);
}
//
// kill the killtagets
//
if (self.killtarget)
{
t = world;
do
{
t = find (t, targetname, self.killtarget);
if (!t)
breakthis = true;
remove (t);
} while (!breakthis);
}
//
// fire targets
//