Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r--src/core/netconnection.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc
index 2bcd6dc..22614d2 100644
--- a/src/core/netconnection.cc
+++ b/src/core/netconnection.cc
@@ -307,9 +307,9 @@ void NetConnection::parse_incoming_message(const std::string & message)
} else if (command == "ping") {
} else if (command == "frame") {
- float timestamp;
- if (msgstream >> timestamp) {
- game()->reset_clientstate(timestamp);
+ float timestamp, prevtimestamp;
+ if ((msgstream >> timestamp) && (msgstream >> prevtimestamp)) {
+ game()->reset_clientstate(timestamp, prevtimestamp);
}
} else if (command == "die") {
@@ -329,16 +329,16 @@ void NetConnection::parse_incoming_message(const std::string & message)
switch (type)
{
case Entity::Default:
- new Entity(msgstream);
+ game()->update_entity_clientstate(new Entity(msgstream));
break;
case Entity::Dynamic:
- new EntityDynamic(msgstream);
+ game()->update_entity_clientstate(new EntityDynamic(msgstream));
break;
case Entity::Controlable:
- new EntityControlable(msgstream);
+ game()->update_entity_clientstate(new EntityControlable(msgstream));
break;
case Entity::Globe:
- new EntityGlobe(msgstream);
+ game()->update_entity_clientstate(new EntityGlobe(msgstream));
break;
default:
con_warn << "Create for unknown entity type " << type << std::endl;