about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/ec_client.c3
-rw-r--r--src/engine/client/ec_inp.c6
-rw-r--r--src/engine/e_interface.h22
3 files changed, 31 insertions, 0 deletions
diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c
index 6a3b4220..5957312a 100644
--- a/src/engine/client/ec_client.c
+++ b/src/engine/client/ec_client.c
@@ -1193,6 +1193,9 @@ int editor_main(int argc, char **argv);
 
 int main(int argc, char **argv)
 {
+	/* preinit the mod */
+	modc_preinit();
+
 	/* init the engine */
 	dbg_msg("client", "starting...");
 	engine_init("Teewars", argc, argv);
diff --git a/src/engine/client/ec_inp.c b/src/engine/client/ec_inp.c
index cac69669..57216ac4 100644
--- a/src/engine/client/ec_inp.c
+++ b/src/engine/client/ec_inp.c
@@ -177,6 +177,12 @@ int inp_mouse_doubleclick()
 	return release_delta < (time_freq() >> 2);
 }
 
+void inp_clear_key_states()
+{
+	mem_zero(keyboard_state, sizeof(keyboard_state));
+	mem_zero(input_count, sizeof(input_count));
+}
+
 int inp_key_presses(int key)
 {
 	return input_count[input_current][key].presses;
diff --git a/src/engine/e_interface.h b/src/engine/e_interface.h
index 534c29e1..73d2e01e 100644
--- a/src/engine/e_interface.h
+++ b/src/engine/e_interface.h
@@ -845,6 +845,15 @@ void mods_postsnap();
 /*
 	Group: Client Callbacks
 */
+
+/*
+	Function: modc_preinit
+		Called when the client starts, but before the engine is initialized.
+	
+	Remarks:
+*/
+void modc_preinit();
+
 /*
 	Function: modc_init
 		Called when the client starts.
@@ -1233,6 +1242,19 @@ int inp_mouse_doubleclick();
 	See Also:
 		<other_func>
 */
+void inp_clear_key_states();
+
+/*
+	Function: TODO
+	
+	Arguments:
+		arg1 - desc
+	
+	Returns:
+
+	See Also:
+		<other_func>
+*/
 int inp_key_presses(int key);
 
 /*