mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:56:29 +02:00
Fix packet version conflict
This commit is contained in:
parent
8a291f16ff
commit
eaa2b9fda8
4 changed files with 5 additions and 10 deletions
|
@ -516,7 +516,7 @@ void AssetServer::handleGetAllMappingOperation(ReceivedMessage& message, SharedN
|
||||||
for (auto it = _fileMappings.cbegin(); it != _fileMappings.cend(); ++ it) {
|
for (auto it = _fileMappings.cbegin(); it != _fileMappings.cend(); ++ it) {
|
||||||
replyPacket.writeString(it.key());
|
replyPacket.writeString(it.key());
|
||||||
replyPacket.write(QByteArray::fromHex(it.value().toString().toUtf8()));
|
replyPacket.write(QByteArray::fromHex(it.value().toString().toUtf8()));
|
||||||
replyPacket.writePrimitive(getAssetStatus(it.value().toString()));
|
replyPacket.writePrimitive(getAssetStatus(it.key(), it.value().toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1157,7 +1157,7 @@ bool AssetServer::createMetaFile(AssetHash originalAssetHash) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetServer::setBakingEnabled(const AssetPathList& paths, bool enabled) {
|
bool AssetServer::setBakingEnabled(const AssetPathList& paths, bool enabled) {
|
||||||
for (const auto& path : paths) {
|
for (const auto& path : paths) {
|
||||||
auto it = _fileMappings.find(path);
|
auto it = _fileMappings.find(path);
|
||||||
if (it != _fileMappings.end()) {
|
if (it != _fileMappings.end()) {
|
||||||
|
@ -1189,4 +1189,5 @@ void AssetServer::setBakingEnabled(const AssetPathList& paths, bool enabled) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ private:
|
||||||
/// Rename mapping from `oldPath` to `newPath`. Returns true if successful
|
/// Rename mapping from `oldPath` to `newPath`. Returns true if successful
|
||||||
bool renameMapping(AssetPath oldPath, AssetPath newPath);
|
bool renameMapping(AssetPath oldPath, AssetPath newPath);
|
||||||
|
|
||||||
void setBakingEnabled(const AssetPathList& paths, bool enabled);
|
bool setBakingEnabled(const AssetPathList& paths, bool enabled);
|
||||||
|
|
||||||
/// Delete any unmapped files from the local asset directory
|
/// Delete any unmapped files from the local asset directory
|
||||||
void cleanupUnmappedFiles();
|
void cleanupUnmappedFiles();
|
||||||
|
|
|
@ -42,6 +42,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
return static_cast<PacketVersion>(MessageDataVersion::TextOrBinaryData);
|
return static_cast<PacketVersion>(MessageDataVersion::TextOrBinaryData);
|
||||||
case PacketType::ICEServerHeartbeat:
|
case PacketType::ICEServerHeartbeat:
|
||||||
return 18; // ICE Server Heartbeat signing
|
return 18; // ICE Server Heartbeat signing
|
||||||
|
case PacketType::AssetMappingOperation:
|
||||||
case PacketType::AssetMappingOperationReply:
|
case PacketType::AssetMappingOperationReply:
|
||||||
return static_cast<PacketVersion>(AssetServerPacketVersion::RedirectedMappings);
|
return static_cast<PacketVersion>(AssetServerPacketVersion::RedirectedMappings);
|
||||||
case PacketType::AssetGetInfo:
|
case PacketType::AssetGetInfo:
|
||||||
|
@ -67,9 +68,6 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
case PacketType::MicrophoneAudioWithEcho:
|
case PacketType::MicrophoneAudioWithEcho:
|
||||||
case PacketType::AudioStreamStats:
|
case PacketType::AudioStreamStats:
|
||||||
return static_cast<PacketVersion>(AudioVersion::HighDynamicRangeVolume);
|
return static_cast<PacketVersion>(AudioVersion::HighDynamicRangeVolume);
|
||||||
case PacketType::AssetMappingOperation:
|
|
||||||
case PacketType::AssetMappingOperationReply:
|
|
||||||
return static_cast<PacketVersion>(AssetMappingOperationVersion::SetBakingEnabledOperation);
|
|
||||||
default:
|
default:
|
||||||
return 17;
|
return 17;
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,8 +337,4 @@ enum class MessageDataVersion : PacketVersion {
|
||||||
TextOrBinaryData = 18
|
TextOrBinaryData = 18
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class AssetMappingOperationVersion : PacketVersion {
|
|
||||||
SetBakingEnabledOperation = 18
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // hifi_PacketHeaders_h
|
#endif // hifi_PacketHeaders_h
|
||||||
|
|
Loading…
Reference in a new issue