I think you may need to either wait until the first packet is sent to write the second one, or create a separate m_EntityUpdate object for the second packet. It hasn't sent the first one before you write over it with the second one.
On Wed, Aug 11, 2010 at 3:31 PM, Richard Becker <[email protected]>wrote: > Can someone please tell me why the following code will not work? The send > function is just an abstraction for ease of use. basically the first > argument tells enet to broadcast, the bools at the end are for flags, in > this case we are asking for sequenced only (not reliable). > Both of these calls occur in the same "frame" or update() call. The problem > is my client only gets the last message with the value of 3 for the number > of entities? Any help here would be greatly appreciated - Richard > > m_EntityUpdate.uiNumEntities = 5; > SendPacket(-1, &m_EntityUpdate, sizeof(tServerEntityUpdate), > CHANNEL_WORLD_UPDATE, false, true, false); > > m_EntityUpdate.uiNumEntities = 3; > SendPacket(-1, &m_EntityUpdate, sizeof(tServerEntityUpdate), > CHANNEL_WORLD_UPDATE, false, true, false); > >
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
