mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
follow up to asset data management
This commit is contained in:
parent
74638c0f2c
commit
34a8e5ef52
3 changed files with 63 additions and 34 deletions
|
|
@ -311,8 +311,7 @@ SimSoundAssetEvent::SimSoundAssetEvent(StringTableEntry assetId, const MatrixF*
|
|||
|
||||
void SimSoundAssetEvent::pack(NetConnection* con, BitStream* stream)
|
||||
{
|
||||
NetStringHandle assetIdStr = mAsset->getAssetId();
|
||||
con->packNetStringHandleU(stream, assetIdStr);
|
||||
AssetDatabase.packUpdateAsset(con, 0, stream, mAsset.getAssetId());
|
||||
|
||||
SFXDescription* ad = mAsset->getSfxDescription();
|
||||
if (stream->writeFlag(sentTransform))
|
||||
|
|
@ -348,14 +347,7 @@ void SimSoundAssetEvent::write(NetConnection* con, BitStream* stream)
|
|||
void SimSoundAssetEvent::unpack(NetConnection* con, BitStream* stream)
|
||||
{
|
||||
|
||||
StringTableEntry temp = StringTable->insert(con->unpackNetStringHandleU(stream).getString());
|
||||
if (AssetDatabase.isDeclaredAsset(temp))
|
||||
{
|
||||
AssetPtr<SoundAsset> tempSoundAsset;
|
||||
tempSoundAsset = temp;
|
||||
|
||||
mAsset = temp;
|
||||
}
|
||||
mAsset = AssetDatabase.unpackUpdateAsset(con, stream);
|
||||
|
||||
sentTransform = stream->readFlag();
|
||||
if (sentTransform) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue