code duplication prune. should aid in stability

This commit is contained in:
AzaezelX 2021-10-03 02:56:26 -05:00
parent 10f2453cee
commit 98a079a797
123 changed files with 632 additions and 966 deletions

View file

@ -74,7 +74,7 @@ PhysicsDebrisData::PhysicsDebrisData()
lifetime = 5.0f;
lifetimeVariance = 0.0f;
INIT_SHAPEASSET(Shape);
INIT_ASSET(Shape);
}
bool PhysicsDebrisData::onAdd()
@ -215,7 +215,7 @@ void PhysicsDebrisData::packData(BitStream* stream)
stream->write( waterDampingScale );
stream->write( buoyancyDensity );
PACKDATA_SHAPEASSET(Shape);
PACKDATA_ASSET(Shape);
}
void PhysicsDebrisData::unpackData(BitStream* stream)
@ -236,7 +236,7 @@ void PhysicsDebrisData::unpackData(BitStream* stream)
stream->read( &waterDampingScale );
stream->read( &buoyancyDensity );
UNPACKDATA_SHAPEASSET(Shape);
UNPACKDATA_ASSET(Shape);
}
DefineEngineMethod( PhysicsDebrisData, preload, void, (), ,

View file

@ -87,7 +87,7 @@ public:
bool castShadows;
DECLARE_SHAPEASSET(PhysicsDebrisData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(PhysicsDebrisData, Shape);
DECLARE_ASSET_SETGET(PhysicsDebrisData, Shape);
PhysicsDebrisData();

View file

@ -78,7 +78,7 @@ PhysicsShapeData::PhysicsShapeData()
buoyancyDensity( 0.0f ),
simType( SimType_ClientServer )
{
INIT_SHAPEASSET(Shape);
INIT_ASSET(Shape);
}
PhysicsShapeData::~PhysicsShapeData()
@ -180,7 +180,7 @@ void PhysicsShapeData::packData( BitStream *stream )
{
Parent::packData( stream );
PACKDATA_SHAPEASSET(Shape);
PACKDATA_ASSET(Shape);
stream->write( mass );
stream->write( dynamicFriction );
@ -204,7 +204,7 @@ void PhysicsShapeData::unpackData( BitStream *stream )
{
Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(Shape);
UNPACKDATA_ASSET(Shape);
stream->read( &mass );
stream->read( &dynamicFriction );

View file

@ -75,7 +75,7 @@ public:
public:
DECLARE_SHAPEASSET(PhysicsShapeData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(PhysicsShapeData, Shape);
DECLARE_ASSET_SETGET(PhysicsShapeData, Shape);
/// The shared unscaled collision shape.
PhysicsCollisionRef colShape;