mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Adds handling for datablocks to be reloaded if the assets they utilize have their files directly edited.
This commit is contained in:
parent
0eafadb1a0
commit
f31acf774e
23 changed files with 121 additions and 37 deletions
|
|
@ -143,7 +143,10 @@ public:
|
|||
ExplosionData* cloneAndPerformSubstitutions(const SimObject*, S32 index=0);
|
||||
bool allowSubstitutions() const override { return true; }
|
||||
|
||||
void onShapeChanged() {}
|
||||
void onShapeChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ protected:
|
|||
RectF mBillboardRects[MAX_COVERTYPES];
|
||||
|
||||
/// The cover shape filenames.
|
||||
DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES);
|
||||
DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES, onShapeChanged);
|
||||
DECLARE_ASSET_ARRAY_NET_SETGET(GroundCover, Shape, -1);
|
||||
|
||||
/// The cover shape instances.
|
||||
|
|
@ -409,6 +409,8 @@ protected:
|
|||
S32 randSeed );
|
||||
|
||||
void _debugRender( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat );
|
||||
|
||||
void onShapeChanged(){}
|
||||
};
|
||||
|
||||
#endif // _GROUNDCOVER_H_
|
||||
|
|
|
|||
|
|
@ -92,7 +92,10 @@ class ParticleData : public SimDataBlock
|
|||
static bool protectedSetSizes(void* object, const char* index, const char* data);
|
||||
static bool protectedSetTimes(void* object, const char* index, const char* data);
|
||||
|
||||
void onImageChanged() {}
|
||||
void onImageChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
|
||||
public:
|
||||
ParticleData();
|
||||
|
|
|
|||
|
|
@ -69,8 +69,14 @@ class PrecipitationData : public GameBaseData
|
|||
void packData(BitStream* stream) override;
|
||||
void unpackData(BitStream* stream) override;
|
||||
|
||||
void onDropChanged() {}
|
||||
void onSplashChanged() {}
|
||||
void onDropChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
void onSplashChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
};
|
||||
|
||||
struct Raindrop
|
||||
|
|
|
|||
|
|
@ -124,7 +124,10 @@ public:
|
|||
|
||||
DECLARE_IMAGEASSET_ARRAY(SplashData, Texture, NUM_TEX, onTextureChanged);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(SplashData, Texture)
|
||||
void onTextureChanged() {}
|
||||
void onTextureChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
|
||||
ExplosionData* explosion;
|
||||
S32 explosionId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue