From 5c62807d6a3a2e9129df74693322220a61e21e66 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 31 May 2022 19:55:12 +0200 Subject: ConCommandBase::IsCommand improvements If the vtable pointer points to ConVar its not a command --- NorthstarDedicatedTest/concommand.cpp | 2 +- NorthstarDedicatedTest/convar.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NorthstarDedicatedTest/concommand.cpp b/NorthstarDedicatedTest/concommand.cpp index 1bdda91b..6ddc6881 100644 --- a/NorthstarDedicatedTest/concommand.cpp +++ b/NorthstarDedicatedTest/concommand.cpp @@ -38,7 +38,7 @@ bool ConCommand::IsCommand(void) const //----------------------------------------------------------------------------- bool ConCommandBase::IsCommand(void) const { - return true; + return m_pConCommandBaseVTable != g_pConVar_Vtable; } //----------------------------------------------------------------------------- diff --git a/NorthstarDedicatedTest/convar.h b/NorthstarDedicatedTest/convar.h index b1424fb7..90e38e94 100644 --- a/NorthstarDedicatedTest/convar.h +++ b/NorthstarDedicatedTest/convar.h @@ -5,6 +5,7 @@ #include "concommand.h" // taken directly from iconvar.h +extern void* g_pConVar_Vtable; // The default, no flags at all #define FCVAR_NONE 0 -- cgit v1.2.3