mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-18 23:42:26 +00:00
Soft particles: Disable Particle Stage "softeningRadius" keyword
this avoid breaking the game DLL ABI (framework/DeclParticle.h is part of the SDK), and for now doesn't make a difference, because that keyword was introduced by TDM and thus is only used in their particle defs. When we break the game ABI/API anyway (probably for high FPS support), this commit can just be reverted
This commit is contained in:
parent
b86d2c587d
commit
2e0b093c79
3 changed files with 17 additions and 6 deletions
|
@ -410,7 +410,10 @@ idParticleStage *idDeclParticle::ParseParticleStage( idLexer &src ) {
|
|||
continue;
|
||||
}
|
||||
if ( !token.Icmp( "softeningRadius" ) ) { // #3878 soft particles
|
||||
stage->softeningRadius = src.ParseFloat();
|
||||
common->Warning( "Particle %s from %s has stage with \"softeningRadius\" attribute, which is currently ignored (we soften all suitable particles)\n",
|
||||
this->GetName(), src.GetFileName() );
|
||||
// DG: disable this for now to avoid breaking the game ABI
|
||||
//stage->softeningRadius = src.ParseFloat();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -737,7 +740,9 @@ idParticleStage::idParticleStage( void ) {
|
|||
hidden = false;
|
||||
boundsExpansion = 0.0f;
|
||||
bounds.Clear();
|
||||
softeningRadius = -2.0f; // -2 means "auto" - #3878 soft particles
|
||||
// DG: disable softeningRadius for now to avoid breaking the game ABI
|
||||
// (will always behave like if softeningRadius = -2.0f)
|
||||
//softeningRadius = -2.0f; // -2 means "auto" - #3878 soft particles
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -811,7 +816,8 @@ void idParticleStage::Default() {
|
|||
randomDistribution = true;
|
||||
entityColor = false;
|
||||
cycleMsec = ( particleLife + deadTime ) * 1000;
|
||||
softeningRadius = -2.0f; // -2 means "auto" - #3878 soft particles
|
||||
// DG: disable softeningRadius for now to avoid breaking game ABI
|
||||
//softeningRadius = -2.0f; // -2 means "auto" - #3878 soft particles
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -202,7 +202,9 @@ public:
|
|||
This is more flexible even when not using soft particles, as modelDepthHack
|
||||
can be turned off for specific stages to stop them poking through walls.
|
||||
*/
|
||||
float softeningRadius;
|
||||
// DG: disable this for now because it breaks the game DLL's ABI (re-enable in dhewm3 1.6.0 or 2.0.0)
|
||||
// (this header is part of the SDK)
|
||||
//float softeningRadius;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -310,11 +310,14 @@ void idRenderModelPrt::SetSofteningRadii()
|
|||
for ( int i = 0; i < particleSystem->stages.Num(); ++i )
|
||||
{
|
||||
const idParticleStage* ps = particleSystem->stages[i];
|
||||
if ( ps->softeningRadius > -2.0f ) // User has specified a setting
|
||||
// DG: for now softeningRadius isn't configurable to avoid breaking the game DLL's ABI
|
||||
// => always behave like if ps->softeningRadius == -2, which means "auto"
|
||||
// (doesn't make a difference, so far only TDM particles set the softeningRadius)
|
||||
/* if ( ps->softeningRadius > -2.0f ) // User has specified a setting
|
||||
{
|
||||
softeningRadii[i] = ps->softeningRadius;
|
||||
}
|
||||
else if ( ps->orientation == POR_VIEW ) // Only view-aligned particle stages qualify for softening
|
||||
else */ if ( ps->orientation == POR_VIEW ) // Only view-aligned particle stages qualify for softening
|
||||
{
|
||||
float diameter = Max( ps->size.from, ps->size.to );
|
||||
float scale = Max( ps->aspect.from, ps->aspect.to );
|
||||
|
|
Loading…
Reference in a new issue