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);
|
NetworkString *ns = getNetworkString(20);
|
||||||
ns->setSynchronous(true);
|
ns->setSynchronous(true);
|
||||||
const std::vector<STKPeer*> &peers = STKHost::get()->getPeers();
|
ns->addUInt8(GE_KART_FINISHED_RACE).addUInt8(kart->getWorldKartId())
|
||||||
|
.addFloat(time);
|
||||||
// FIXME - TODO THIS APPEARS COMPLETELY BROKEN!!!
|
sendMessageToPeersChangingToken(ns, /*reliable*/true);
|
||||||
for (unsigned int i = 0; i < peers.size(); i++)
|
delete ns;
|
||||||
{
|
|
||||||
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
|
|
||||||
} // kartFinishedRace
|
} // kartFinishedRace
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user