diff --git a/source/cgame/cg_event.c b/source/cgame/cg_event.c index b43b07c..bcad970 100644 --- a/source/cgame/cg_event.c +++ b/source/cgame/cg_event.c @@ -590,11 +590,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { vec3_t end = {0, 0, 1}; // Blub, blub, blub... - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 0, 20, 0 ); - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 0, 20, 0 ); - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 0, 20, 0 ); - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 0, 20, 0 ); - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 0, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, cent->lerpOrigin, end, 1, 20, 0 ); } break; case EV_WATER_CLEAR: diff --git a/source/cgame/cg_players.c b/source/cgame/cg_players.c index 56636c1..ba849a0 100644 --- a/source/cgame/cg_players.c +++ b/source/cgame/cg_players.c @@ -1540,15 +1540,13 @@ static void CG_HasteTrail( centity_t *cent, vec3_t endPos ) { // BFP - Second pa } #endif - cent->trailTime += 100; + cent->trailTime += 50; // BFP - Before: += 100 if ( cent->trailTime < cg.time ) { cent->trailTime = cg.time; } // BFP - Apply dash smoke particle for the trail, if the function were used directly, it would generate too many particles than we expected CG_ParticleDashSmoke( cent, cgs.media.hastePuffShader, endPos ); - CG_ParticleDashSmoke( cent, cgs.media.hastePuffShader, endPos ); - CG_ParticleDashSmoke( cent, cgs.media.hastePuffShader, endPos ); // BFP - No smoke puff effect #if 0 @@ -1888,25 +1886,30 @@ static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) { trap_CM_BoxTrace( &trace, cent->lerpOrigin, end, mins, maxs, 0, MASK_PLAYERSOLID ); - // no shadow if too high - if ( trace.fraction == 1.0 || trace.startsolid || trace.allsolid ) { - return qfalse; - } - - *shadowPlane = trace.endpos[2] + 1; - - // BFP - Dash smoke particles when using ki boost on the ground + // BFP - Dash smoke and bubble particles when using ki boost on the ground or above the water contents = CG_PointContents( trace.endpos, -1 ); if ( ( cent->currentState.eFlags & EF_AURA ) - && !( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) && ( ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_RUN || ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_BACK || ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_FLYA - || ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_FLYB ) + || ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_FLYB ) ) { + if ( !( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) && trace.fraction <= 0.70f ) { - CG_HasteTrail( cent, trace.endpos ); + CG_HasteTrail( cent, trace.endpos ); + } else if ( contents & CONTENTS_WATER ) { + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, end, trace.endpos, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, end, trace.endpos, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, end, trace.endpos, 1, 20, 0 ); + } } + // no shadow if too high + if ( trace.fraction == 1.0 || trace.startsolid || trace.allsolid ) { + return qfalse; + } + + *shadowPlane = trace.endpos[2] + 1; + if ( cg_shadows.integer != 1 ) { // no mark for stencil or projection shadows return qtrue; } @@ -2354,9 +2357,9 @@ void CG_Player( centity_t *cent ) { if ( ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_FLYA || ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_FLYB ) { - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, bubbleOrigin, trace.endpos, 0, 20, 0 ); - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, bubbleOrigin, trace.endpos, 0, 20, 0 ); - CG_ParticleBubble( cent, cgs.media.waterBubbleShader, bubbleOrigin, trace.endpos, 0, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, bubbleOrigin, trace.endpos, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, bubbleOrigin, trace.endpos, 1, 20, 0 ); + CG_ParticleBubble( cent, cgs.media.waterBubbleShader, bubbleOrigin, trace.endpos, 1, 20, 0 ); } else if ( ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_CHARGE ) { bubbleOrigin[2] += -10; // put the origin a little below diff --git a/source/cgame/cg_weapons.c b/source/cgame/cg_weapons.c index c40b9b3..e4d6916 100644 --- a/source/cgame/cg_weapons.c +++ b/source/cgame/cg_weapons.c @@ -326,11 +326,12 @@ static void CG_RocketTrail( centity_t *ent, const weaponInfo_t *wi ) { ent->trailTime = cg.time; if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) { - if ( contents & lastContents & CONTENTS_WATER ) { + if ( ( contents & lastContents & CONTENTS_WATER ) + && cg.frametime > 0.0f ) { // BFP - If paused, don't spawn bubble particles (cg_paused.integer < 1 is another solution, but not good enough for server responses) // BFP - Apply particle bubble effect in that case - CG_ParticleBubble( ent, cgs.media.waterBubbleShader, origin, lastPos, 0, 20, 0 ); - CG_ParticleBubble( ent, cgs.media.waterBubbleShader, origin, lastPos, 0, 20, 0 ); - CG_ParticleBubble( ent, cgs.media.waterBubbleShader, origin, lastPos, 0, 20, 0 ); + CG_ParticleBubble( ent, cgs.media.waterBubbleShader, origin, lastPos, 1, 20, 0 ); + CG_ParticleBubble( ent, cgs.media.waterBubbleShader, origin, lastPos, 1, 20, 0 ); + CG_ParticleBubble( ent, cgs.media.waterBubbleShader, origin, lastPos, 1, 20, 0 ); // CG_BubbleTrail( lastPos, origin, 8 ); } return;