SYNC_ACC CMOD_ACC GLOBALS

This commit is contained in:
MarcEricMartel
2023-12-13 14:27:11 -05:00
parent 2dbaf84844
commit fd1fe66d13
4 changed files with 23 additions and 22 deletions

View File

@@ -91,8 +91,8 @@ void Connection::sendPacks(SOCKET sock, std::unordered_map<uint64_t, Connection*
outs += out.timestamp + last;
if (outs >= 200) {
outs -= 200;
if (outs >= 50) {
outs -= 50;
Sync sync;
sync.hp = player->GetHP();
sync.timestamp = out.timestamp;
@@ -117,15 +117,15 @@ Timestamp Connection::Run(World* world) {
if (m_input_manifest.size() < 2)
return tstamp;
//if (player->AmIDead()) {
// m_input_manifest.clear();
// return tstamp;
//}
while (m_last_in < m_input_vector.size() - 1) {
in = m_input_vector.at(m_last_in + 1);
last = m_input_vector.at(m_last_in);
if (in.timestamp <= m_tstamp) {
++m_last_in;
continue;
}
el = (double)(in.timestamp - last.timestamp) / 1000.;
if (m_shoot_acc > 0.) {
@@ -190,7 +190,7 @@ Timestamp Connection::Run(World* world) {
out.id = m_playinfo.id;
m_output_manifest[out.timestamp] = out;
m_output_vector.push_back(out);
tstamp = out.timestamp;
m_tstamp = tstamp = out.timestamp;
++m_last_in;
}