Enable HITOWNER on bounce for grenades (small hack was required), flak shrapnel, ripper blades.
Enable HITOWNER on biosludge after colliding with a surface. Not needed, but just done for the sake of it. Enable HITOWNER on guided redeemer missiles after they're far away from the shooter.
This commit is contained in:
parent
27017feed2
commit
0c8a16807f
6 changed files with 14 additions and 1 deletions
|
|
@ -303,6 +303,7 @@ Class BioGel : Actor
|
||||||
// align self to what surface was hit, currently does not support 3d floors + slopes properly
|
// align self to what surface was hit, currently does not support 3d floors + slopes properly
|
||||||
virtual void AlignSelf()
|
virtual void AlignSelf()
|
||||||
{
|
{
|
||||||
|
bHITOWNER = true;
|
||||||
A_NoGravity();
|
A_NoGravity();
|
||||||
A_Stop();
|
A_Stop();
|
||||||
if ( bAMBUSH )
|
if ( bAMBUSH )
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,7 @@ Class UTGrenade : UTRocket
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
DamageType 'GrenadeDeath';
|
DamageType 'GrenadeDeath';
|
||||||
|
Damage 1; // needs to be nonzero for self-hit to work (might send a PR to fix this later)
|
||||||
-NOGRAVITY;
|
-NOGRAVITY;
|
||||||
+USEBOUNCESTATE;
|
+USEBOUNCESTATE;
|
||||||
-BOUNCEAUTOOFF;
|
-BOUNCEAUTOOFF;
|
||||||
|
|
@ -229,6 +230,7 @@ Class UTGrenade : UTRocket
|
||||||
rollvel = FRandom[Eightball](-16,16);
|
rollvel = FRandom[Eightball](-16,16);
|
||||||
pitchvel = FRandom[Eightball](-16,16);
|
pitchvel = FRandom[Eightball](-16,16);
|
||||||
anglevel = FRandom[Eightball](-16,16);
|
anglevel = FRandom[Eightball](-16,16);
|
||||||
|
bHITOWNER = true;
|
||||||
}
|
}
|
||||||
Goto Spawn;
|
Goto Spawn;
|
||||||
Death:
|
Death:
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,7 @@ Class FlakChunk : Actor
|
||||||
}
|
}
|
||||||
action void A_HandleBounce()
|
action void A_HandleBounce()
|
||||||
{
|
{
|
||||||
|
bHITOWNER = true;
|
||||||
A_SprayDecal("WallCrack",-8);
|
A_SprayDecal("WallCrack",-8);
|
||||||
int numpt = Random[Flak](2,3);
|
int numpt = Random[Flak](2,3);
|
||||||
if ( frame < 10 )
|
if ( frame < 10 )
|
||||||
|
|
@ -399,6 +400,7 @@ Class FlakSlug : Actor
|
||||||
for ( int i=0; i<6; i++ )
|
for ( int i=0; i<6; i++ )
|
||||||
{
|
{
|
||||||
p = Spawn("FlakChunk",pos);
|
p = Spawn("FlakChunk",pos);
|
||||||
|
p.bHITOWNER = true;
|
||||||
a = FRandom[Flak](0,360);
|
a = FRandom[Flak](0,360);
|
||||||
s = FRandom[Flak](0,0.2);
|
s = FRandom[Flak](0,0.2);
|
||||||
Vector3 dir = (x+y*cos(a)*s+z*sin(a)*s).unit();
|
Vector3 dir = (x+y*cos(a)*s+z*sin(a)*s).unit();
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ Class Razor2 : Actor
|
||||||
Bounce:
|
Bounce:
|
||||||
RAZB A 0
|
RAZB A 0
|
||||||
{
|
{
|
||||||
|
bHITOWNER = true;
|
||||||
Vector3 dir = vel.unit();
|
Vector3 dir = vel.unit();
|
||||||
A_SetAngle(atan2(dir.y,dir.x));
|
A_SetAngle(atan2(dir.y,dir.x));
|
||||||
A_SetPitch(asin(-dir.z));
|
A_SetPitch(asin(-dir.z));
|
||||||
|
|
|
||||||
|
|
@ -933,7 +933,7 @@ Class UTMainHandler : StaticEventHandler
|
||||||
while ( bi.Next() )
|
while ( bi.Next() )
|
||||||
{
|
{
|
||||||
Actor a = bi.Thing;
|
Actor a = bi.Thing;
|
||||||
if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) )
|
if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) || (Source.Distance3D(a) > ExplosionRadius) )
|
||||||
continue;
|
continue;
|
||||||
Vector3 midpoint = a.Vec3Offset(0,0,a.height*0.5);
|
Vector3 midpoint = a.Vec3Offset(0,0,a.height*0.5);
|
||||||
a.vel += Level.Vec3Diff(Source.pos,midpoint).unit()*(MomentumTransfer/(Thinker.TICRATE*a.mass));
|
a.vel += Level.Vec3Diff(Source.pos,midpoint).unit()*(MomentumTransfer/(Thinker.TICRATE*a.mass));
|
||||||
|
|
|
||||||
|
|
@ -357,15 +357,22 @@ Class GuidedWarShell : WarShell
|
||||||
{
|
{
|
||||||
double lagangle, lagpitch, lagroll, lagangle2, lagpitch2, lagroll2,
|
double lagangle, lagpitch, lagroll, lagangle2, lagpitch2, lagroll2,
|
||||||
guideangle, guidepitch, guideroll;
|
guideangle, guidepitch, guideroll;
|
||||||
|
bool justleft;
|
||||||
|
|
||||||
override void PostBeginPlay()
|
override void PostBeginPlay()
|
||||||
{
|
{
|
||||||
Super.PostBeginPlay();
|
Super.PostBeginPlay();
|
||||||
if ( target && target.player ) target.player.camera = self;
|
if ( target && target.player ) target.player.camera = self;
|
||||||
|
justleft = true;
|
||||||
}
|
}
|
||||||
override void Tick()
|
override void Tick()
|
||||||
{
|
{
|
||||||
Actor.Tick();
|
Actor.Tick();
|
||||||
|
if ( justleft && (Distance3D(target) > (2*max(target.radius,target.height))) )
|
||||||
|
{
|
||||||
|
justleft = false;
|
||||||
|
bHITOWNER = true;
|
||||||
|
}
|
||||||
if ( globalfreeze || level.frozen ) return;
|
if ( globalfreeze || level.frozen ) return;
|
||||||
if ( !bMISSILE ) return;
|
if ( !bMISSILE ) return;
|
||||||
if ( !target || !target.player || (target.Health <= 0) )
|
if ( !target || !target.player || (target.Health <= 0) )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue