initial commit

change the macro to use the refactor (exact same structure as the imageasset macro)
This commit is contained in:
marauder2k7 2025-06-19 13:34:07 +01:00
parent 61a75ada1e
commit ca1604170d
29 changed files with 700 additions and 457 deletions

View file

@ -56,7 +56,7 @@ class SFXSource;
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
// afxMagicMissileData
class afxMagicMissileData : public GameBaseData
class afxMagicMissileData : public GameBaseData, protected AssetPtrCallback
{
typedef GameBaseData Parent;
@ -66,16 +66,10 @@ protected:
public:
enum { MaxLifetimeTicks = 4095 };
void onShapeChanged()
{
reloadOnLocalClient();
}
public:
// variables set in datablock definition:
// Shape related
DECLARE_SHAPEASSET(afxMagicMissileData, ProjectileShape, onShapeChanged);
DECLARE_ASSET_SETGET(afxMagicMissileData, ProjectileShape);
DECLARE_SHAPEASSET_REFACTOR(afxMagicMissileData, ProjectileShape)
//StringTableEntry projectileShapeName;
//bool hasLight;
@ -228,6 +222,12 @@ public:
afxMagicMissileData* cloneAndPerformSubstitutions(const SimObject*, S32 index=0);
bool allowSubstitutions() const override { return true; }
void gather_cons_defs(Vector<afxConstraintDef>& defs);
protected:
void onAssetRefreshed(AssetPtrBase* pAssetPtrBase) override
{
reloadOnLocalClient();
}
};
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//