synchronization protocol double/int conversion error fix
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13251 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
dc3b5fe35c
commit
ec65fb96aa
@ -68,8 +68,8 @@ void SynchronizationProtocol::notifyEvent(Event* event)
|
|||||||
Log::verbose("SynchronizationProtocol", "Answering sequence %u", sequence);
|
Log::verbose("SynchronizationProtocol", "Answering sequence %u", sequence);
|
||||||
if (event->data.size() == 12 && !m_listener->isServer()) // countdown time in the message
|
if (event->data.size() == 12 && !m_listener->isServer()) // countdown time in the message
|
||||||
{
|
{
|
||||||
uint16_t time_to_start = event->data.gui16(10);
|
short time_to_start = event->data.gui16(10);
|
||||||
Log::info("SynchronizationProtocol", "Starting game in %u.", time_to_start);
|
Log::info("SynchronizationProtocol", "Request to start game in %d.", time_to_start);
|
||||||
startCountdown(time_to_start);
|
startCountdown(time_to_start);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -123,7 +123,7 @@ void SynchronizationProtocol::asynchronousUpdate()
|
|||||||
// now add the countdown if necessary
|
// now add the countdown if necessary
|
||||||
if (m_countdown_activated)
|
if (m_countdown_activated)
|
||||||
{
|
{
|
||||||
ns.ai16(m_countdown);
|
ns.ai16((int)(m_countdown*1000.0));
|
||||||
Log::info("SynchronizationProtocol", "CNTActivated: Countdown value : %f", m_countdown);
|
Log::info("SynchronizationProtocol", "CNTActivated: Countdown value : %f", m_countdown);
|
||||||
}
|
}
|
||||||
Log::verbose("SynchronizationProtocol", "Added sequence number %u for peer %d", m_pings[i].size(), i);
|
Log::verbose("SynchronizationProtocol", "Added sequence number %u for peer %d", m_pings[i].size(), i);
|
||||||
|
@ -463,7 +463,7 @@ void RaceManager::startNextRace()
|
|||||||
}
|
}
|
||||||
|
|
||||||
StartGameProtocol* protocol = static_cast<StartGameProtocol*>(
|
StartGameProtocol* protocol = static_cast<StartGameProtocol*>(
|
||||||
ProtocolManager::getInstance()->getProtocol(PROTOCOL_SYNCHRONIZATION));
|
ProtocolManager::getInstance()->getProtocol(PROTOCOL_START_GAME));
|
||||||
if (protocol)
|
if (protocol)
|
||||||
protocol->ready();
|
protocol->ready();
|
||||||
} // startNextRace
|
} // startNextRace
|
||||||
|
Loading…
Reference in New Issue
Block a user