mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-29 07:32:25 +00:00
Don't use Soft Particles for particles at player-weapon
or at least if weaponDepthHack is set. That somehow broke muzzle flash effects in Dentonmod, see https://github.com/dhewm/dhewm3-sdk/issues/36
This commit is contained in:
parent
b0d7c12404
commit
227071bb9a
1 changed files with 3 additions and 1 deletions
|
@ -1443,7 +1443,9 @@ static void R_AddAmbientDrawsurfs( viewEntity_t *vEntity ) {
|
|||
float particle_radius = -1.0f; // Default = disallow softening, but allow modelDepthHack if specified in the decl.
|
||||
if ( r_useSoftParticles.GetBool() && r_enableDepthCapture.GetInteger() != 0
|
||||
&& !shader->ReceivesLighting() // don't soften surfaces that are meant to be solid
|
||||
&& tr.viewDef->renderView.viewID >= 0 ) // Skip during "invisible" rendering passes (e.g. lightgem)
|
||||
&& tr.viewDef->renderView.viewID >= 0 // Skip during "invisible" rendering passes (e.g. lightgem)
|
||||
// don't apply to particles spawned at the player-weapon (like muzzle flash)
|
||||
&& !vEntity->weaponDepthHack ) // to fix https://github.com/dhewm/dhewm3-sdk/issues/36
|
||||
{
|
||||
const idRenderModelPrt* prt = dynamic_cast<const idRenderModelPrt*>( def->parms.hModel ); // yuck.
|
||||
if ( prt )
|
||||
|
|
Loading…
Reference in a new issue