Try to fix handling a kart finishing the race.
This commit is contained in:
parent
85f15d7221
commit
e1892bc4fd
@ -135,17 +135,10 @@ void GameEventsProtocol::kartFinishedRace(AbstractKart *kart, float time)
|
||||
{
|
||||
NetworkString *ns = getNetworkString(20);
|
||||
ns->setSynchronous(true);
|
||||
const std::vector<STKPeer*> &peers = STKHost::get()->getPeers();
|
||||
|
||||
// FIXME - TODO THIS APPEARS COMPLETELY BROKEN!!!
|
||||
for (unsigned int i = 0; i < peers.size(); i++)
|
||||
{
|
||||
ns->addUInt32(peers[i]->getClientServerToken())
|
||||
.addUInt8(GE_KART_FINISHED_RACE)
|
||||
.addUInt8(kart->getWorldKartId()).addFloat(time);
|
||||
peers[i]->sendPacket(ns, /*reliable*/true);
|
||||
delete ns;
|
||||
} // for i in peers
|
||||
ns->addUInt8(GE_KART_FINISHED_RACE).addUInt8(kart->getWorldKartId())
|
||||
.addFloat(time);
|
||||
sendMessageToPeersChangingToken(ns, /*reliable*/true);
|
||||
delete ns;
|
||||
} // kartFinishedRace
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user