projectile

This commit is contained in:
marauder2k7 2025-06-19 16:29:59 +01:00
parent 51f4255c14
commit 1949ff9d7b
2 changed files with 19 additions and 21 deletions

View file

@ -63,7 +63,7 @@ class Projectile;
//--------------------------------------------------------------------------
/// Datablock for projectiles. This class is the base class for all other projectiles.
class ProjectileData : public GameBaseData
class ProjectileData : public GameBaseData, protected AssetPtrCallback
{
typedef GameBaseData Parent;
@ -71,8 +71,7 @@ protected:
bool onAdd() override;
public:
DECLARE_SHAPEASSET(ProjectileData, ProjectileShape, onShapeChanged);
DECLARE_ASSET_SETGET(ProjectileData, ProjectileShape);
DECLARE_SHAPEASSET_REFACTOR(ProjectileData, ProjectileShape)
/// Set to true if it is a billboard and want it to always face the viewer, false otherwise
bool faceViewer;
@ -154,7 +153,8 @@ public:
ProjectileData(const ProjectileData&, bool = false);
bool allowSubstitutions() const override { return true; }
void onShapeChanged()
protected:
void onAssetRefreshed(AssetPtrBase* pAssetPtrBase) override
{
reloadOnLocalClient();
}