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-03-16 14:51:37 +0000
committerStijn Buys <ingar@osirion.org>2008-03-16 14:51:37 +0000
commit7d7b9324f1f0db14648fb9fe32256d7942af77b9 (patch)
treeef2a60c275f22c6b1ab7430a299138597030b581 /src/core/gameconnection.cc
parent9a7ca1743f0c74042bca4d4903f7e56fe810edce (diff)
somewhat smoother network play, player assets, client pif updates
Diffstat (limited to 'src/core/gameconnection.cc')
-rw-r--r--src/core/gameconnection.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index 4c31f78..b307fee 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -123,6 +123,15 @@ void GameConnection::frame(float seconds)
//con_debug << netmsg.str();
}
+ if (localplayer()->dirty()) {
+ std::ostringstream osstream;
+ osstream << "pif ";
+ localplayer()->serialize_client_update(osstream);
+ osstream << '\n';
+ connection_network->send(osstream.str());
+ }
+
+ connection_network->transmit();
connection_frametime += f;
}