diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 386b1c841..3f2c656b3 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3577,7 +3577,7 @@ void impulsePlaySoundTrigger(NLMISC::CBitMemStream& impulse) else { NLMISC::CVector pos; - NLMISC::CEntityId eid = SoundPosition.getEntityId(); + TDataSetIndex compressedIndex = SoundPosition.getEntityId(); diff --git a/code/ryzom/common/src/game_share/position_or_entity_type.h b/code/ryzom/common/src/game_share/position_or_entity_type.h index 339e00515..0772662e3 100644 --- a/code/ryzom/common/src/game_share/position_or_entity_type.h +++ b/code/ryzom/common/src/game_share/position_or_entity_type.h @@ -39,7 +39,7 @@ public: Position = position; } - TPositionOrEntity(const NLMISC::CEntityId& eid) + TPositionOrEntity(const TDataSetIndex& eid) { _isPosition = 0; EntityId = eid; @@ -82,7 +82,7 @@ public: Position = position; } - void setEntityId(const NLMISC::CEntityId& eid) + void setEntityId(const TDataSetIndex& eid) { _isPosition = 0; EntityId = eid; @@ -105,10 +105,10 @@ public: return Position; } - NLMISC::CEntityId getEntityId() const + TDataSetIndex getEntityId() const { if (!isEntityId()) - return NLMISC::CEntityId(); + return TDataSetIndex(); return EntityId; } @@ -129,7 +129,7 @@ public: private: char _isPosition; NLMISC::CVector Position; - NLMISC::CEntityId EntityId; + TDataSetIndex EntityId; }; diff --git a/code/ryzom/server/src/entities_game_service/camera_animation_manager/position_or_entity_type_helper.cpp b/code/ryzom/server/src/entities_game_service/camera_animation_manager/position_or_entity_type_helper.cpp index 6494803b7..0a9742f56 100644 --- a/code/ryzom/server/src/entities_game_service/camera_animation_manager/position_or_entity_type_helper.cpp +++ b/code/ryzom/server/src/entities_game_service/camera_animation_manager/position_or_entity_type_helper.cpp @@ -16,6 +16,10 @@ // #include "camera_animation_manager/position_or_entity_type_helper.h" +#include "monitor_service/mirrors.h" +#include "game_share/mirror.h" +#include "game_share/mirrored_data_set.h" +#include "game_share/base_types.h" const TPositionOrEntity CPositionOrEntityHelper::Invalid = TPositionOrEntity(); @@ -26,7 +30,7 @@ TPositionOrEntity CPositionOrEntityHelper::fromString(const std::string& s) std::vector res; NLMISC::splitString(str, ";", res); - // If we don't have 3 components, it's an entityid + // If we don't have 3 components, it's an entity if (res.size() != 3) { std::vector res; @@ -48,8 +52,9 @@ TPositionOrEntity CPositionOrEntityHelper::fromString(const std::string& s) nlerror("TPositionOrentityHelper : invalid entity id from alias %d", alias); return TPositionOrEntity(); } + TDataSetIndex compressedId = TheDataset.getDataSetRow(eid).getCompressedIndex(); - return TPositionOrEntity(eid); + return TPositionOrEntity(compressedId); } else {