diff options
author | Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> | 2022-05-31 19:55:12 +0200 |
---|---|---|
committer | Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> | 2022-05-31 19:55:12 +0200 |
commit | 5c62807d6a3a2e9129df74693322220a61e21e66 (patch) | |
tree | 30aa504e66c52ae16ab04a6be25b4f2e61b2109d | |
parent | 8d47d3b9757f963201aca7b593f03949c2a88081 (diff) | |
download | NorthstarLauncher-5c62807d6a3a2e9129df74693322220a61e21e66.tar.gz NorthstarLauncher-5c62807d6a3a2e9129df74693322220a61e21e66.zip |
ConCommandBase::IsCommand improvements
If the vtable pointer points to ConVar its not a command
-rw-r--r-- | NorthstarDedicatedTest/concommand.cpp | 2 | ||||
-rw-r--r-- | NorthstarDedicatedTest/convar.h | 1 |
2 files changed, 2 insertions, 1 deletions
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 |