diff options
Diffstat (limited to 'src/client/camera.cc')
-rw-r--r-- | src/client/camera.cc | 8 |
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()) |