mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
code duplication prune. should aid in stability
This commit is contained in:
parent
10f2453cee
commit
98a079a797
123 changed files with 632 additions and 966 deletions
|
|
@ -186,7 +186,6 @@ PlayerData::ActionAnimationDef PlayerData::ActionAnimationList[NumTableActionAni
|
|||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef PlayerData::Sounds playerSoundsEnum;
|
||||
|
|
@ -216,6 +215,8 @@ EndImplementEnumType;
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_CO_DATABLOCK_V1(PlayerData);
|
||||
|
||||
ConsoleDocClass( PlayerData,
|
||||
|
|
@ -297,7 +298,7 @@ PlayerData::PlayerData()
|
|||
imageAnimPrefixFP = StringTable->EmptyString();
|
||||
for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i)
|
||||
{
|
||||
INIT_SHAPEASSET_ARRAY(ShapeFP, i);
|
||||
INIT_ASSET_ARRAY(ShapeFP, i);
|
||||
mCRCFP[i] = 0;
|
||||
mValidShapeFP[i] = false;
|
||||
}
|
||||
|
|
@ -422,7 +423,7 @@ PlayerData::PlayerData()
|
|||
boxHeadFrontPercentage = 1;
|
||||
|
||||
for (S32 i = 0; i < MaxSounds; i++)
|
||||
INIT_SOUNDASSET_ARRAY(PlayerSound, i);
|
||||
INIT_ASSET_ARRAY(PlayerSound, i);
|
||||
|
||||
footPuffEmitter = NULL;
|
||||
footPuffID = 0;
|
||||
|
|
@ -1048,9 +1049,7 @@ void PlayerData::initPersistFields()
|
|||
endGroup( "Interaction: Footsteps" );
|
||||
|
||||
addGroup( "Interaction: Sounds" );
|
||||
|
||||
INITPERSISTFIELD_SOUNDASSET_ENUMED(PlayerSound, playerSoundsEnum, PlayerData::Sounds::MaxSounds, PlayerData, "Sounds related to player interaction.");
|
||||
|
||||
endGroup( "Interaction: Sounds" );
|
||||
|
||||
addGroup( "Interaction: Splashes" );
|
||||
|
|
@ -1275,7 +1274,7 @@ void PlayerData::packData(BitStream* stream)
|
|||
stream->write(minLateralImpactSpeed);
|
||||
|
||||
for (U32 i = 0; i < MaxSounds; i++)
|
||||
PACKDATA_SOUNDASSET_ARRAY_ENUMED(PlayerSound, PlayerData::Sounds, i);
|
||||
PACKDATA_ASSET_ARRAY(PlayerSound, i);
|
||||
|
||||
mathWrite(*stream, boxSize);
|
||||
mathWrite(*stream, crouchBoxSize);
|
||||
|
|
@ -1343,7 +1342,7 @@ void PlayerData::packData(BitStream* stream)
|
|||
stream->writeString(imageAnimPrefixFP);
|
||||
for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i)
|
||||
{
|
||||
PACKDATA_SHAPEASSET_ARRAY(ShapeFP, i);
|
||||
PACKDATA_ASSET_ARRAY(ShapeFP, i);
|
||||
|
||||
// computeCRC is handled in ShapeBaseData
|
||||
if (computeCRC)
|
||||
|
|
@ -1456,7 +1455,7 @@ void PlayerData::unpackData(BitStream* stream)
|
|||
stream->read(&minLateralImpactSpeed);
|
||||
|
||||
for (U32 i = 0; i < MaxSounds; i++)
|
||||
UNPACKDATA_SOUNDASSET_ARRAY_ENUMED(PlayerSound, PlayerData::Sounds, i);
|
||||
UNPACKDATA_ASSET_ARRAY(PlayerSound, i);
|
||||
|
||||
mathRead(*stream, &boxSize);
|
||||
mathRead(*stream, &crouchBoxSize);
|
||||
|
|
@ -1523,7 +1522,7 @@ void PlayerData::unpackData(BitStream* stream)
|
|||
imageAnimPrefixFP = stream->readSTString();
|
||||
for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i)
|
||||
{
|
||||
UNPACKDATA_SHAPEASSET_ARRAY(ShapeFP, i);
|
||||
UNPACKDATA_ASSET_ARRAY(ShapeFP, i);
|
||||
|
||||
// computeCRC is handled in ShapeBaseData
|
||||
if (computeCRC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue