mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Cleaned up implementation of #712
Also updates other game classes like the shapebase to utilize the sound asset hooks properly.
This commit is contained in:
parent
3812ce2e82
commit
15ef8b4fbe
12 changed files with 312 additions and 187 deletions
|
|
@ -39,6 +39,9 @@
|
|||
#include "core/stream/bitStream.h"
|
||||
#endif
|
||||
|
||||
#include "T3D/assets/SoundAsset.h"
|
||||
|
||||
|
||||
|
||||
class QuitEvent : public SimEvent
|
||||
{
|
||||
|
|
@ -102,6 +105,23 @@ class SimDataBlockEvent : public NetEvent
|
|||
DECLARE_CATEGORY( "Game Networking" );
|
||||
};
|
||||
|
||||
class SimSoundAssetEvent : public NetEvent
|
||||
{
|
||||
private:
|
||||
AssetPtr<SoundAsset> mAsset;
|
||||
MatrixF mTransform;
|
||||
|
||||
public:
|
||||
typedef NetEvent Parent;
|
||||
|
||||
SimSoundAssetEvent(AssetPtr<SoundAsset> asset = NULL, const MatrixF* mat = NULL);
|
||||
void pack(NetConnection*, BitStream* bstream);
|
||||
void write(NetConnection*, BitStream* bstream);
|
||||
void unpack(NetConnection*, BitStream* bstream);
|
||||
void process(NetConnection*);
|
||||
DECLARE_CONOBJECT(SimSoundAssetEvent);
|
||||
};
|
||||
|
||||
class Sim2DAudioEvent: public NetEvent
|
||||
{
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue