Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/camera.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/camera.cc b/src/client/camera.cc
index 808ff7e..573194a 100644
--- a/src/client/camera.cc
+++ b/src/client/camera.cc
@@ -169,7 +169,13 @@ void draw(float seconds)
if (mode == Overview)
set_mode(Track);
- target.assign(core::localcontrol()->location());
+ if (core::localcontrol()->state()) {
+ // client prediction has not been run yet
+ target = core::localcontrol()->state()->previouslocation()
+ + (core::localcontrol()->location() - core::localcontrol()->state()->previouslocation()) * core::game()->timeoffset();
+ }
+ else
+ target = core::localcontrol()->location();
if (mode == Track) {
if (core::localcontrol()->model())