physics shape and physics debris

This commit is contained in:
marauder2k7 2025-06-19 14:32:32 +01:00
parent 5d641929cf
commit 2b973abdcf
4 changed files with 47 additions and 43 deletions

View file

@ -51,7 +51,7 @@ class PhysicsDebrisData;
class ExplosionData;
class PhysicsShapeData : public GameBaseData
class PhysicsShapeData : public GameBaseData, protected AssetPtrCallback
{
typedef GameBaseData Parent;
@ -74,8 +74,7 @@ public:
public:
DECLARE_SHAPEASSET(PhysicsShapeData, Shape, onShapeChanged);
DECLARE_ASSET_SETGET(PhysicsShapeData, Shape);
DECLARE_SHAPEASSET_REFACTOR(PhysicsShapeData, Shape)
/// The shared unscaled collision shape.
PhysicsCollisionRef colShape;
@ -135,7 +134,8 @@ public:
SimObjectRef< ExplosionData > explosion;
SimObjectRef< PhysicsShapeData > destroyedShape;
void onShapeChanged()
protected:
void onAssetRefreshed(AssetPtrBase* pAssetPtrBase) override
{
reloadOnLocalClient();
}