From b8c5fa2d6146322ae3a7816c2a9c041190b3d2b1 Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Mon, 27 Nov 2023 20:25:23 -0500 Subject: [PATCH] SERVER: More efficient teleporter kills --- source/server/entities/teleporter.qc | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/source/server/entities/teleporter.qc b/source/server/entities/teleporter.qc index 222a0bb..80fdcc5 100644 --- a/source/server/entities/teleporter.qc +++ b/source/server/entities/teleporter.qc @@ -297,27 +297,15 @@ void() teleport_touch = people.tele_target = find(world, targetname, self.target); people.movetype = MOVETYPE_NONE; } - people = people.chain; - } - - entity zod = findradius(self.origin, self.stance); - while (zod != world) - { - if (zod.classname == "ai_zombie_head" || zod.classname == "ai_zombie_rarm" - || zod.classname == "ai_zombie_larm") - { - // If we're a limb, grab our body. - zod = zod.owner; - } - if (zod.classname == "ai_zombie" && !zod.electro_targeted) + else if (people.aistatus == "1" && !people.electro_targeted) { tempe = self; - self = zod; + self = people; Z_ElectroShock(); self = tempe; } - zod = zod.chain; - } + people = people.chain; + } if (!other.tele_target) objerror("Couldn't find target!");