mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 04:53:35 +02:00
going a different way, same packet version, but always send feature requests to old servers
This commit is contained in:
parent
7faf9c2f22
commit
be4bc7b2ca
4 changed files with 14 additions and 6 deletions
libraries
|
@ -38,11 +38,10 @@ const QSet<PacketType> RELIABLE_PACKETS = QSet<PacketType>();
|
|||
|
||||
PacketVersion versionForPacketType(PacketType packetType) {
|
||||
switch (packetType) {
|
||||
case PacketType::EntityQuery:
|
||||
case PacketType::EntityAdd:
|
||||
case PacketType::EntityEdit:
|
||||
case PacketType::EntityData:
|
||||
return VERSION_ENTITIES_DEFAULT_QUERY_BITS;
|
||||
return VERSION_ENTITIES_HAVE_PARENTS;
|
||||
case PacketType::AvatarData:
|
||||
case PacketType::BulkAvatarData:
|
||||
return 17;
|
||||
|
|
|
@ -161,6 +161,5 @@ const PacketVersion VERSION_ENTITIES_KEYLIGHT_PROPERTIES_GROUP_BIS = 48;
|
|||
const PacketVersion VERSION_ENTITIES_PARTICLES_ADDITIVE_BLENDING = 49;
|
||||
const PacketVersion VERSION_ENTITIES_POLYLINE_TEXTURE = 50;
|
||||
const PacketVersion VERSION_ENTITIES_HAVE_PARENTS = 51;
|
||||
const PacketVersion VERSION_ENTITIES_DEFAULT_QUERY_BITS = 52;
|
||||
|
||||
#endif // hifi_PacketHeaders_h
|
||||
|
|
|
@ -40,9 +40,15 @@ int OctreeQuery::getBroadcastData(unsigned char* destinationBuffer) {
|
|||
|
||||
// bitMask of less than byte wide items
|
||||
unsigned char bitItems = 0;
|
||||
// NOTE: we used to use these bits to set feature request items
|
||||
// if we need to extend the protocol with optional features
|
||||
// do it here with... setAtBit(bitItems, WANT_FEATURE_BIT);
|
||||
|
||||
// NOTE: we need to keep these here for new clients to talk to old servers. After we know that the clients and
|
||||
// servers and clients have all been updated we could remove these bits. New servers will always force these
|
||||
// features on old clients even if they don't ask for them. (which old clients will properly handle). New clients
|
||||
// will always ask for these so that old servers will use these features.
|
||||
setAtBit(bitItems, WANT_LOW_RES_MOVING_BIT);
|
||||
setAtBit(bitItems, WANT_COLOR_AT_BIT);
|
||||
setAtBit(bitItems, WANT_DELTA_AT_BIT);
|
||||
setAtBit(bitItems, WANT_COMPRESSION);
|
||||
|
||||
*destinationBuffer++ = bitItems;
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@ typedef unsigned long long quint64;
|
|||
|
||||
// First bitset
|
||||
const int WANT_LOW_RES_MOVING_BIT = 0;
|
||||
const int WANT_COLOR_AT_BIT = 1;
|
||||
const int WANT_DELTA_AT_BIT = 2;
|
||||
const int UNUSED_BIT_3 = 3; // unused... available for new feature
|
||||
const int WANT_COMPRESSION = 4; // 5th bit
|
||||
|
||||
class OctreeQuery : public NodeData {
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue