Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-16 16:34:15 +0000
committerStijn Buys <ingar@osirion.org>2008-10-16 16:34:15 +0000
commit1a28393dabf4f4696bf433ddde52e7a25253c955 (patch)
tree4d4fa4034f30fc882a78ab6ea148a32e83b9e88c /src/core/netconnection.cc
parent1e0df536c2fae85c317ce9c3cc17603d5f98c911 (diff)
various user interface related updates
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r--src/core/netconnection.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc
index ae1118f..704551b 100644
--- a/src/core/netconnection.cc
+++ b/src/core/netconnection.cc
@@ -23,6 +23,7 @@ NetConnection::NetConnection()
{
connection_timeout = core::application()->time();
connection_state = Connecting;
+ connection_timestamp = 0;
receive_compressed = false;
received_compressed_size = 0;
@@ -233,7 +234,7 @@ void NetConnection::receive()
}
-void NetConnection::frame(float seconds)
+void NetConnection::frame()
{
timeval timeout;
timeout.tv_sec = 0;
@@ -458,9 +459,9 @@ void NetConnection::parse_incoming_message(const std::string & message)
} else if (command == "ping") {
} else if (command == "frame") {
- float timestamp, prevtimestamp;
- if ((msgstream >> timestamp) && (msgstream >> prevtimestamp)) {
- game()->reset_clientstate(timestamp, prevtimestamp);
+ unsigned long timestamp;
+ if ((msgstream >> timestamp)) {
+ connection_timestamp = timestamp;
}
} else if (command == "die") {