Fix: Rifle burst fire should have wide spread.
This commit is contained in:
parent
a1d57e3a77
commit
76688ed747
1 changed files with 6 additions and 4 deletions
|
|
@ -134,14 +134,16 @@ Class URifle : UnrealWeapon
|
||||||
}
|
}
|
||||||
let l = Spawn("SniperLight",pos);
|
let l = Spawn("SniperLight",pos);
|
||||||
l.target = self;
|
l.target = self;
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z, x2, y2, z2, dir;
|
||||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
|
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
|
||||||
if ( !zoomed ) origin = level.Vec3Offset(origin,-y*3-z*2);
|
if ( !zoomed ) origin = level.Vec3Offset(origin,-y*3-z*2);
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
double pt = BulletSlope();
|
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||||
LineTrace(angle,10000,pt,TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
if ( alt ) dir = dt_Utility.ConeSpread(x2,y2,z2,FRandom[Rifle](0,360),FRandom[Rifle](0.,.25));
|
||||||
UTBulletTrail.DoTrail(self,origin,dt_Utility.Vec3FromAngle(angle,pt),10000,alt?3:1);
|
else dir = x2;
|
||||||
|
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
UTBulletTrail.DoTrail(self,origin,dir,10000,alt?3:1);
|
||||||
if ( d.HitType == TRACE_HitActor )
|
if ( d.HitType == TRACE_HitActor )
|
||||||
{
|
{
|
||||||
int dmg = 45;
|
int dmg = 45;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue