Adds handling for datablocks to be reloaded if the assets they utilize have their files directly edited.

This commit is contained in:
JeffR 2025-04-24 00:58:20 -05:00
parent 0eafadb1a0
commit f31acf774e
23 changed files with 121 additions and 37 deletions

View file

@ -378,7 +378,7 @@ struct ShapeBaseImageData: public GameBaseData {
F32 scriptAnimTransitionTime; ///< The amount of time to transition between the previous sequence and new sequence
///< when the script prefix has changed.
DECLARE_SHAPEASSET_ARRAY(ShapeBaseImageData, Shape, MaxShapes); ///< Name of shape to render.
DECLARE_SHAPEASSET_ARRAY(ShapeBaseImageData, Shape, MaxShapes, onShapeChanged); ///< Name of shape to render.
DECLARE_ASSET_ARRAY_SETGET(ShapeBaseImageData, Shape);
//DECLARE_SHAPEASSET(ShapeBaseImageData, ShapeFP); ///< Name of shape to render in first person (optional).
@ -505,6 +505,11 @@ struct ShapeBaseImageData: public GameBaseData {
void handleStateSoundTrack(const U32& stateId);
void onShapeChanged()
{
reloadOnLocalClient();
}
/// @}
/// @name Callbacks
@ -681,8 +686,8 @@ public:
Vector<TextureTagRemapping> txr_tag_remappings;
bool silent_bbox_check;
void onShapeChanged() {}
void onDebrisChanged() {}
void onShapeChanged();
void onDebrisChanged();
public:
ShapeBaseData(const ShapeBaseData&, bool = false);
};