From dd21ae1bc7a648138d33727628983a3b25a07570 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 19 Jan 2008 10:57:25 +0000 Subject: large commit. documented a bit. editor updates. general cleanup of everything --- src/engine/docs/client_time.txt | 4 ++++ src/engine/docs/prediction.txt | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/engine/docs/client_time.txt create mode 100644 src/engine/docs/prediction.txt (limited to 'src/engine/docs') diff --git a/src/engine/docs/client_time.txt b/src/engine/docs/client_time.txt new file mode 100644 index 00000000..24ca2be5 --- /dev/null +++ b/src/engine/docs/client_time.txt @@ -0,0 +1,4 @@ +Title: Time on the client + +tick, intratick +predtick, predintratick diff --git a/src/engine/docs/prediction.txt b/src/engine/docs/prediction.txt new file mode 100644 index 00000000..d5771d1a --- /dev/null +++ b/src/engine/docs/prediction.txt @@ -0,0 +1,19 @@ +Title: Prediction + +The engine calls when reprediction is required. This happens usally when new data has arrived from the server. should to prediction from the current snapshot and current snapshot tick ( + 1) upto and including the tick returned by . + +Predicted input sent to the server can be retrived by calling with the corresponding tick that you want the input for. Here is a simple example of how it might look. + +> void modc_predict() +> { +> int tick; +> prediction_reset(); +> +> for(tick = client_tick()+1; tick <= client_predtick(); tick++) +> { +> MY_INPUT *input = (MY_INPUT *)client_get_input(); +> if(input) +> prediction_apply_input(input); +> prediction_tick(); +> } +> } -- cgit 1.4.1