Dash bump condition fixes.
This commit is contained in:
parent
7201fa417a
commit
07818d07b4
2 changed files with 19 additions and 5 deletions
|
|
@ -1002,8 +1002,22 @@ Class Demolitionist : PlayerPawn
|
|||
if ( !CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) continue;
|
||||
Vector3 diff = level.Vec3Diff(pos,a.pos);
|
||||
Vector3 dirto = diff.unit();
|
||||
if ( dir dot dirto < .1 ) continue;
|
||||
if ( a.bACTLIKEBRIDGE && (diff.z <= -a.Height) ) continue; // don't bump bridges if hit by above
|
||||
Vector3 otherdir = (a.vel.length()>0.)?a.vel.unit():-dirto;
|
||||
if ( (dir dot dirto < .1) || (dir dot otherdir > .35) ) continue;
|
||||
if ( (diff.z <= -a.height) && (lastvelz < -25) ) continue;
|
||||
if ( (diff.z <= -a.height) && !isdashing ) continue;
|
||||
// don't bump bridges if hit at a specific angle
|
||||
if ( a.bACTLIKEBRIDGE )
|
||||
{
|
||||
Vector3 bnorm = -dirto;
|
||||
if ( diff.z <= -a.height ) continue; // no bump from above
|
||||
else if ( diff.z >= Height ) bnorm = (0,0,-1);
|
||||
else if ( diff.x > a.Radius+Radius ) bnorm = (-1,0,0);
|
||||
else if ( diff.x < -(a.Radius+Radius) ) bnorm = (1,0,0);
|
||||
else if ( diff.y > a.Radius+Radius ) bnorm = (0,-1,0);
|
||||
else if ( diff.y < -(a.Radius+Radius) ) bnorm = (0,1,0);
|
||||
if ( dir dot bnorm > -.6 ) continue;
|
||||
}
|
||||
// large monsters will stop the player (unless hit from above if we're going at ground pound speed)
|
||||
A_QuakeEx(4,4,4,10,0,128,"",QF_RELATIVE|QF_SCALEDOWN);
|
||||
A_AlertMonsters(swwm_uncapalert?0:800);
|
||||
|
|
@ -1011,7 +1025,7 @@ Class Demolitionist : PlayerPawn
|
|||
a.A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
|
||||
bumptic = gametic+int(20+spd/4.);
|
||||
lastbump *= .8;
|
||||
if ( (diff.z < a.height) && (lastvelz >= -25) && (a.bDONTTHRUST || a.bACTLIKEBRIDGE || (a.Mass >= maxmass) || (!a.bSHOOTABLE && !a.bPUSHABLE && (a.Health > 0))) && a.bSOLID && (dir dot dirto > .65) )
|
||||
if ( (a.bDONTTHRUST || a.bACTLIKEBRIDGE || (a.Mass >= maxmass) || (!a.bSHOOTABLE && !a.bPUSHABLE && (a.Health > 0))) && a.bSOLID && (dir dot dirto > .65) )
|
||||
{
|
||||
if ( bumped ) continue;
|
||||
bumped = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue