From 95a7df6ba539c633d277214df9ee902dc65d8a17 Mon Sep 17 00:00:00 2001 From: Lev Date: Sun, 19 Mar 2017 19:50:38 +0500 Subject: [PATCH] Reset edict flags on client disconnect. --- rehlds/engine/host.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rehlds/engine/host.cpp b/rehlds/engine/host.cpp index c3c8891..12b2379 100644 --- a/rehlds/engine/host.cpp +++ b/rehlds/engine/host.cpp @@ -519,6 +519,13 @@ void SV_DropClient_internal(client_t *cl, qboolean crash, const char *string) cl->connection_started = realtime; cl->proxy = FALSE; COM_ClearCustomizationList(&cl->customdata, FALSE); +#ifdef REHLDS_FIXES + // Reset flags + cl->edict->v.flags = 0; + // Since the edict doesn't get deleted, fix it so it doesn't interfere. + cl->edict->v.takedamage = DAMAGE_NO; // don't attract autoaim + cl->edict->v.solid = SOLID_NOT; +#endif // REHLDS_FIXES cl->edict = NULL; Q_memset(cl->userinfo, 0, sizeof(cl->userinfo)); Q_memset(cl->physinfo, 0, sizeof(cl->physinfo));