Hotfix to prevent trees and stuff from being knocked around by projectiles.
This commit is contained in:
parent
32df2efc86
commit
607dbe972f
1 changed files with 2 additions and 2 deletions
|
|
@ -2951,7 +2951,7 @@ Class UTMainHandler : EventHandler
|
||||||
while ( bi.Next() )
|
while ( bi.Next() )
|
||||||
{
|
{
|
||||||
Actor a = bi.Thing;
|
Actor a = bi.Thing;
|
||||||
if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) || (Source.Distance3D(a) > ExplosionRadius) )
|
if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) || (Source.Distance3D(a) > ExplosionRadius) || a.bCANNOTPUSH || (a.Mass >= 10000000) )
|
||||||
continue;
|
continue;
|
||||||
Vector3 midpoint = a.Vec3Offset(0,0,a.height*0.5);
|
Vector3 midpoint = a.Vec3Offset(0,0,a.height*0.5);
|
||||||
Vector3 dir = Level.Vec3Diff(Source.pos,midpoint);
|
Vector3 dir = Level.Vec3Diff(Source.pos,midpoint);
|
||||||
|
|
@ -2967,7 +2967,7 @@ Class UTMainHandler : EventHandler
|
||||||
// Same for this
|
// Same for this
|
||||||
static void DoKnockback( Actor Victim, Vector3 HitDirection, double MomentumTransfer )
|
static void DoKnockback( Actor Victim, Vector3 HitDirection, double MomentumTransfer )
|
||||||
{
|
{
|
||||||
if ( !Victim ) return;
|
if ( !Victim || !Victim.bSHOOTABLE || Victim.bCANNOTPUSH || (Victim.Mass >= 10000000) ) return;
|
||||||
if ( (Victim is 'ShredCorpseHitbox') && Victim.target )
|
if ( (Victim is 'ShredCorpseHitbox') && Victim.target )
|
||||||
Victim.target.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.target.Mass));
|
Victim.target.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.target.Mass));
|
||||||
else Victim.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.Mass));
|
else Victim.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.Mass));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue