mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 16:13:45 +00:00
SFX and soundasset safeties and fixe
adress several insatnaces of things like ServerPlay2D et al either not emitting sound at all, or doing so only at scene origin
This commit is contained in:
parent
66766006d3
commit
b12cd00b74
5 changed files with 69 additions and 46 deletions
|
|
@ -1566,7 +1566,11 @@ void GameConnection::play2D(StringTableEntry assetId)
|
|||
{
|
||||
if (AssetDatabase.isDeclaredAsset(assetId))
|
||||
{
|
||||
postNetEvent(new SimSoundAssetEvent(assetId));
|
||||
AssetPtr<SoundAsset> tempSoundAsset = assetId;
|
||||
if (tempSoundAsset && tempSoundAsset->is3D())
|
||||
{
|
||||
postNetEvent(new SimSoundAssetEvent(assetId, SFX->getListener(0).getTransform()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue