From 1c1677f02300e5ab10bca9c74ce7f49d4605b9d6 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 12 Jan 2008 12:08:26 +0000 Subject: merged 0.3.3 changes over to trunk --- src/engine/client/ec_client.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/engine/client/ec_client.c') diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index d35121de..b07edf78 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -304,6 +304,24 @@ int client_connection_problems() return netclient_gotproblems(net); } +void client_direct_input(int *input, int size) +{ + int i; + msg_pack_start_system(NETMSG_INPUT, 0); + msg_pack_int(ack_game_tick); + msg_pack_int(current_predtick); + msg_pack_int(size); + + for(i = 0; i < size/4; i++) + msg_pack_int(input[i]); + + msg_pack_end(); + client_send_msg(); + + dbg_msg("client", "sent direct input"); +} + + static void client_send_input() { int64 now = time_get(); @@ -312,7 +330,7 @@ static void client_send_input() if(current_predtick <= 0) return; - /* fetch input */ + /* fetch input */ size = modc_snap_input(inputs[current_input].data); msg_pack_start_system(NETMSG_INPUT, 0); @@ -1006,6 +1024,9 @@ static void client_run() /* update input */ inp_update(); + + /* update sound */ + snd_update(); /* refocus */ if(!gfx_window_active()) -- cgit 1.4.1