From fb371874f09d0785f2ad0ee8b64d42ccbdc44619 Mon Sep 17 00:00:00 2001 From: jeefo Date: Fri, 19 Jan 2024 21:54:55 +0300 Subject: [PATCH] fix: do not allow to execute client commands on dormant entity --- src/linkage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linkage.cpp b/src/linkage.cpp index 8cc4c9e..444f9f6 100644 --- a/src/linkage.cpp +++ b/src/linkage.cpp @@ -49,7 +49,7 @@ namespace Hooks { // sometimes actually by their side, that's why we strongly recommend to check it here too. In // case it's a bot asking for a client command, we handle it like we do for bot commands - if (game.isNullEntity (ent)) { + if (game.isNullEntity (ent) || (!game.isNullEntity (ent) && (ent->v.flags & FL_DORMANT))) { if (game.is (GameFlags::Metamod)) { RETURN_META (MRES_SUPERCEDE); } @@ -63,7 +63,7 @@ namespace Hooks { vsnprintf (buffer, StringBuffer::StaticBufferSize, format, ap); va_end (ap); - if (util.isFakeClient (ent) && !(ent->v.flags & FL_DORMANT)) { + if (util.isFakeClient (ent)) { auto bot = bots[ent]; if (bot) {