Minigun implemented. Some minor adjustments to weapon model offsets.
Allow armor/pads to replace shield belt when it's not at max capacity (emulating UT behavior).
This commit is contained in:
parent
def0e317f3
commit
4f0cb3e73f
24 changed files with 756 additions and 32 deletions
|
|
@ -285,27 +285,17 @@ Class Enforcer : UTWeapon replaces Pistol
|
|||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
double a;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x;
|
||||
int ydir = slave?-1:1;
|
||||
if ( alt ) origin = origin-z*9.0+ydir*y*1.0;
|
||||
else origin = origin-z*2.0+ydir*y*6.0;
|
||||
double ang = angle;
|
||||
double pt = BulletSlope();
|
||||
if ( alt )
|
||||
{
|
||||
ang += FRandom[Enforcer](-3,3);
|
||||
pt += FRandom[Enforcer](-3,3);
|
||||
}
|
||||
else
|
||||
{
|
||||
ang += FRandom[Enforcer](-0.4,0.4);
|
||||
pt += FRandom[Enforcer](-0.4,0.4);
|
||||
}
|
||||
double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?0.08:0.004);
|
||||
[x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||
FLineTraceData d;
|
||||
LineTrace(ang,10000,pt,TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = Random[Enforcer](15,20);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue