diff --git a/src/command.h b/src/command.h
index 7078c333a1ff1abedfe36a0fceff587b4251e809..554c1131b1ceb1faa971bbb5d9621a9693c6bd52 100644
--- a/src/command.h
+++ b/src/command.h
@@ -25,6 +25,7 @@ enum
 {
 	COM_ADMIN       = 1,
 	COM_SPLITSCREEN = 2,
+	COM_LOCAL       = 4,
 };
 
 typedef void (*com_func_t)(void);
diff --git a/src/dehacked.c b/src/dehacked.c
index 7d473bd5152888face6a48e0543f701351e7b8c7..b3a8ed1dd5bb42c054a72c1d023fa5d1e3661f24 100644
--- a/src/dehacked.c
+++ b/src/dehacked.c
@@ -9735,6 +9735,7 @@ struct {
 	// Lua command registration flags
 	{"COM_ADMIN",COM_ADMIN},
 	{"COM_SPLITSCREEN",COM_SPLITSCREEN},
+	{"COM_LOCAL",COM_LOCAL},
 
 	// cvflags_t
 	{"CV_SAVE",CV_SAVE},
diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c
index cbfa42f87ef3bbe057856a8cd22b387f17806da7..f40b63ac6340de45c4231c74d0efbd3a6dfe8fa9 100644
--- a/src/lua_consolelib.c
+++ b/src/lua_consolelib.c
@@ -132,7 +132,7 @@ void COM_Lua_f(void)
 		}
 	}
 
-	if (netgame)
+	if (netgame && !( flags & COM_LOCAL ))/* don't send local commands */
 	{ // Send the command through the network
 		UINT8 argc;
 		lua_pop(gL, 1); // pop command info table