From b6f6f4799747636acb1e2da029f44a2d3d155f62 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 16 Nov 2008 15:10:57 +0000 Subject: fixed issues when pausing the game and added pause and unpause console commands --- src/game/client/gameclient.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/game/client') diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 4ee92460..74b949d7 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -333,7 +333,7 @@ static void evolve(NETOBJ_CHARACTER *character, int tick) tempcore.move(); tempcore.quantize(); } - + tempcore.write(character); } @@ -637,6 +637,16 @@ void GAMECLIENT::on_predict() // we can't predict without our own id or own character if(snap.local_cid == -1 || !snap.characters[snap.local_cid].active) return; + + // don't predict anything if we are paused + if(snap.gameobj && snap.gameobj->paused) + { + if(snap.local_character) + predicted_char.read(snap.local_character); + if(snap.local_prev_character) + predicted_prev_char.read(snap.local_prev_character); + return; + } // repredict character WORLD_CORE world; -- cgit 1.4.1