about summary refs log tree commit diff
path: root/src/game/client/gameclient.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-11-16 15:10:57 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-11-16 15:10:57 +0000
commitb6f6f4799747636acb1e2da029f44a2d3d155f62 (patch)
treefe1ab580a9fde69ce154790bed114c0d0bc37563 /src/game/client/gameclient.cpp
parentd640ede2a6a87c65292b6eae1929e869294ba1f3 (diff)
downloadzcatch-b6f6f4799747636acb1e2da029f44a2d3d155f62.tar.gz
zcatch-b6f6f4799747636acb1e2da029f44a2d3d155f62.zip
fixed issues when pausing the game and added pause and unpause console commands
Diffstat (limited to 'src/game/client/gameclient.cpp')
-rw-r--r--src/game/client/gameclient.cpp12
1 files changed, 11 insertions, 1 deletions
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;