Don't send events if it trigger a rewind in server
This commit is contained in:
parent
175b932b13
commit
ff08a2ba16
@ -196,9 +196,10 @@ void GameProtocol::handleControllerAction(Event *event)
|
|||||||
}
|
}
|
||||||
if (NetworkConfig::get()->isServer())
|
if (NetworkConfig::get()->isServer())
|
||||||
{
|
{
|
||||||
// Send update to all clients except the original sender.
|
// Send update to all clients except the original sender if the event
|
||||||
STKHost::get()->sendPacketExcept(event->getPeer(),
|
// is after the server time
|
||||||
&data, false);
|
if (!will_trigger_rewind)
|
||||||
|
STKHost::get()->sendPacketExcept(event->getPeer(), &data, false);
|
||||||
|
|
||||||
if (not_rewound == 0 ||
|
if (not_rewound == 0 ||
|
||||||
m_initial_ticks.find(event->getPeer()) == m_initial_ticks.end())
|
m_initial_ticks.find(event->getPeer()) == m_initial_ticks.end())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user