You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -142,6 +144,7 @@ CON_COMMAND_F_COMPLETION(p2mm_map, "Starts up a P2:MM session with a requested m
142
144
UpdateMapsList();
143
145
return;
144
146
}
147
+
145
148
V_strcpy(requestedMap, p2mm_lastmap.GetString());
146
149
Log(INFO, true, "P2MM_LASTMAP called! Running Last Map: \"%s\"", requestedMap);
147
150
}
@@ -204,13 +207,13 @@ CON_COMMAND(p2mm_respawnall, "Respawns all players.")
204
207
}
205
208
}
206
209
207
-
staticboolm_ConVarConCommandsShown = false; // Bool to track if the hidden ConVars and ConCommands are showing.
210
+
staticboolcvccShown = false; // Bool to track if the hidden ConVars and ConCommands are showing.
208
211
static std::vector<ConCommandBase*> toggledCVCCs; // List of toggled ConVars and ConCommands with the FCVAR_DEVELOPMENTONLY and FCVAR_HIDDEN ConVar flags removed.
209
212
CON_COMMAND_F(p2mm_toggle_dev_cc_cvars, "Toggle showing any ConVars and ConCommands that have the FCVAR_DEVELOPMENTONLY and FCVAR_HIDDEN ConVar flags.", FCVAR_HIDDEN)
210
213
{
211
214
int iToggleCount = 0; // To tell the user how many ConVars and ConCommands where toggle to show or hide.
212
215
213
-
if (m_ConVarConCommandsShown)
216
+
if (cvccShown)
214
217
{
215
218
// Hide the ConVars and ConCommands
216
219
for (ConCommandBase* pCommandVarName : toggledCVCCs)
@@ -219,11 +222,11 @@ CON_COMMAND_F(p2mm_toggle_dev_cc_cvars, "Toggle showing any ConVars and ConComma
219
222
iToggleCount++;
220
223
}
221
224
toggledCVCCs.clear();
222
-
m_ConVarConCommandsShown = false;
225
+
cvccShown = false;
223
226
}
224
227
else
225
228
{
226
-
//Unhide the ConVars and ConCommands
229
+
//Remove development and hidden flags from the ConVars and ConCommands
227
230
FOR_ALL_CONSOLE_COMMANDS(pCommandVarName)
228
231
{
229
232
if (pCommandVarName->IsFlagSet(FCVAR_DEVELOPMENTONLY) || pCommandVarName->IsFlagSet(FCVAR_HIDDEN))
@@ -233,10 +236,10 @@ CON_COMMAND_F(p2mm_toggle_dev_cc_cvars, "Toggle showing any ConVars and ConComma
// Purpose: VScript instance to void*. void* because we can not assume that the returned instance is a CBaseEntity* because VScript instances can be
227
+
// Purpose: VScript instance to void*. void* because we can not assume that the returned instance is a CBaseEntity* because VScript instances can be a different class type.
if (unsupportedGame && CommandLine()->FindParm("-forcep2mmload"))
231
233
{
232
-
MessageBox(this->m_hWnd, "P2:MM is being run with a unsupported Source Engine/Portal 2 branch game!\n\"-forcep2mmload\" has been specified to stop the plugin shutting down the game.\nProceed with caution as crashes and bugs could occur!", "Unsupported P2:MM Game", MB_OK | MB_ICONEXCLAMATION);
234
+
if (this->m_hWnd)
235
+
MessageBox(this->m_hWnd, "P2:MM is being run with a unsupported Source Engine/Portal 2 branch game!\n\"-forcep2mmload\" has been specified to stop the plugin shutting down the game.\nProceed with caution as crashes and bugs could occur!", "Unsupported P2:MM Game", MB_OK | MB_ICONEXCLAMATION);
233
236
Log(WARNING, false, R"(P2:MM is being run with a unsupported Source Engine/Portal 2 branch game! "-forcep2mmload" has been specified to stop the plugin shutting down the game. Proceed with caution as crashes and bugs could occur!)");
Log(ERRORR, false, "P2:MM failed to unload!\nGame has to be shutdown as possibly some other patches/hooks are still connected which can cause issues!");
0 commit comments