about summary refs log tree commit diff
path: root/src/engine/client/client.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-07-15 13:25:10 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-07-15 13:25:10 +0000
commitf2611cad8bf1c1f4664ae5f328ffa6934a4d1d16 (patch)
tree89d1dd650f4f57428ff87c8771d5b6c3c6c94e19 /src/engine/client/client.cpp
parent07c8ff2e537958c6f6217b4fd48ddaa85882e068 (diff)
downloadzcatch-f2611cad8bf1c1f4664ae5f328ffa6934a4d1d16.tar.gz
zcatch-f2611cad8bf1c1f4664ae5f328ffa6934a4d1d16.zip
fixed so that the editor works again
Diffstat (limited to 'src/engine/client/client.cpp')
-rw-r--r--src/engine/client/client.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index 7c1fda54..68e93fbe 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -412,6 +412,13 @@ public:
 			if(input::pressed(input::lctrl) && input::pressed('Q'))
 				break;
 				
+			// editor invoke
+			/*
+			if(input::pressed(input::lctrl) && input::pressed('O'))
+			{
+				disconnect();
+			}*/
+				
 			// pump the network
 			pump_network();
 			
@@ -634,6 +641,8 @@ public:
 	}	
 };
 
+int editor_main(int argc, char **argv);
+
 int main(int argc, char **argv)
 {
 	dbg_msg("client", "starting...");
@@ -645,6 +654,7 @@ int main(int argc, char **argv)
 	//const char *name = "nameless jerk";
 	bool connect_at_once = false;
 	bool fullscreen = true;
+	bool editor = false;
 
 	// init network, need to be done first so we can do lookups
 	net_init();
@@ -686,11 +696,20 @@ int main(int argc, char **argv)
 			// -w
 			fullscreen = false;
 		}
+		else if(argv[i][0] == '-' && argv[i][1] == 'e' && argv[i][2] == 0)
+		{
+			editor = true;
+		}
 	}
 	
-	// start the server
-	client c;
-	c.set_fullscreen(fullscreen);
-	c.run(connect_at_once ? &server_address : 0x0);
+	if(editor)
+		editor_main(argc, argv);
+	else
+	{
+		// start the client
+		client c;
+		c.set_fullscreen(fullscreen);
+		c.run(connect_at_once ? &server_address : 0x0);
+	}
 	return 0;
 }