From 523ee2ad97d51a1b9ce4387ee7070b53a6bf3ae8 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sun, 23 Apr 2023 22:11:06 +0500 Subject: [PATCH] Clear client flags in ClientDisconnect, because engine doesn't clear them before calling ClientConnect, but only before ClientPutInServer, on next connection to this slot. Same as https://github.com/LevShisterov/BugfixedHL/commit/5caf49f06373a05dbac8d84f8009fb185badc5f9 --- dlls/client.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/client.cpp b/dlls/client.cpp index 179719bf..c27b22d1 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -126,6 +126,7 @@ void ClientDisconnect( edict_t *pEntity ) pEntity->v.takedamage = DAMAGE_NO;// don't attract autoaim pEntity->v.solid = SOLID_NOT;// nonsolid pEntity->v.effects = 0;// clear any effects + pEntity->v.flags = 0;// clear any flags UTIL_SetOrigin( &pEntity->v, pEntity->v.origin ); g_pGameRules->ClientDisconnected( pEntity );