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

@ -76,7 +76,7 @@ struct PlayerData: public ShapeBaseData {
/// that we don't create a TSThread on the player if we don't
/// need to.
DECLARE_SHAPEASSET_ARRAY(PlayerData, ShapeFP, ShapeBase::MaxMountedImages); ///< Used to render with mounted images in first person [optional]
DECLARE_SHAPEASSET_ARRAY(PlayerData, ShapeFP, ShapeBase::MaxMountedImages, onShapeChanged); ///< Used to render with mounted images in first person [optional]
DECLARE_ASSET_ARRAY_SETGET(PlayerData, ShapeFP);
StringTableEntry imageAnimPrefixFP; ///< Passed along to mounted images to modify
@ -366,6 +366,11 @@ struct PlayerData: public ShapeBaseData {
void packData(BitStream* stream) override;
void unpackData(BitStream* stream) override;
void onShapeChanged()
{
reloadOnLocalClient();
}
/// @name Callbacks
/// @{
DECLARE_CALLBACK( void, onPoseChange, ( Player* obj, const char* oldPose, const char* newPose ) );