From 6ae30c9b15fcc200c7b642016e7adbfdf9b979f4 Mon Sep 17 00:00:00 2001 From: BobTheBob9 Date: Tue, 12 Jul 2022 14:05:02 +0100 Subject: move exploit prevention and limits code out of serverauthentication, and have actual defs for CBasePlayer --- NorthstarDLL/playlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'NorthstarDLL/playlist.cpp') diff --git a/NorthstarDLL/playlist.cpp b/NorthstarDLL/playlist.cpp index c6bee74d..0eb0e1d2 100644 --- a/NorthstarDLL/playlist.cpp +++ b/NorthstarDLL/playlist.cpp @@ -4,6 +4,7 @@ #include "concommand.h" #include "convar.h" #include "squirrel.h" +#include "hoststate.h" AUTOHOOK_INIT() @@ -21,9 +22,8 @@ ConVar* Cvar_ns_use_clc_SetPlaylistVarOverride; AUTOHOOK(clc_SetPlaylistVarOverride__Process, engine.dll + 0x222180, char,, (void* a1, void* a2)) { - // the private_match playlist is the only situation where there should be any legitimate sending of this netmessage - // todo: check map == mp_lobby here too - if (!Cvar_ns_use_clc_SetPlaylistVarOverride->GetBool() || strcmp(R2::GetCurrentPlaylistName(), "private_match")) + // the private_match playlist on mp_lobby is the only situation where there should be any legitimate sending of this netmessage + if (!Cvar_ns_use_clc_SetPlaylistVarOverride->GetBool() || strcmp(R2::GetCurrentPlaylistName(), "private_match") || strcmp(R2::g_pHostState->m_levelName, "mp_lobby")) return 1; return clc_SetPlaylistVarOverride__Process(a1, a2); -- cgit v1.2.3