Portal awareness adjustments to various vector operations.
Got rid of the deprecated Matrix4.GetAxes method. Next step is to get rid of more stuff by migrating to libeye. Mirrored Translocator model so it shows the actually detailed side. At some point in UT's development it got flipped around for some reason. Weapon code cleanup (most noticeable on states). Backported scope shader from Doomreal. Added optional "dummied out" Sniper zoom sounds from a dubious source.
This commit is contained in:
parent
cd72ee9688
commit
fb96c7523e
27 changed files with 445 additions and 777 deletions
|
|
@ -50,17 +50,29 @@ Class ImpactHammer : UTWeapon
|
|||
invoker.count = 0;
|
||||
invoker.FireEffect(); // intentional UT behavior
|
||||
}
|
||||
action void A_ChargeUp( int amt = 1 )
|
||||
action void A_ChargeUp()
|
||||
{
|
||||
invoker.chargesize += (0.75*amt)/TICRATE;
|
||||
invoker.count += double(amt)/TICRATE;
|
||||
if ( invoker.count > 0.2 )
|
||||
invoker.chargesize += .75/TICRATE;
|
||||
invoker.count += 1./TICRATE;
|
||||
if ( invoker.count > .2 )
|
||||
{
|
||||
invoker.count = 0;
|
||||
A_AlertMonsters();
|
||||
}
|
||||
A_QuakeEx(clamp(int(invoker.chargesize*3),0,3),clamp(int(invoker.chargesize*3),0,3),clamp(int(invoker.chargesize*3),0,3),amt+1,0,96,"",QF_RELATIVE,rollIntensity:clamp(invoker.chargesize*0.3,0,0.3));
|
||||
A_QuakeEx(clamp(int(invoker.chargesize*3),0,3),clamp(int(invoker.chargesize*3),0,3),clamp(int(invoker.chargesize*3),0,3),2,0,96,"",QF_RELATIVE,rollIntensity:clamp(invoker.chargesize*0.3,0,0.3));
|
||||
UTMainHandler.DoSwing(self,(FRandom[Impact](-1,1),FRandom[Impact](-1,1)),invoker.chargesize*0.1,0,1,SWING_Spring);
|
||||
if ( !(player.cmd.buttons&BT_ATTACK) )
|
||||
{
|
||||
player.SetPSprite(PSP_WEAPON,ResolveState("Release"));
|
||||
return;
|
||||
}
|
||||
FLineTraceData d;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z);
|
||||
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
|
||||
player.SetPSprite(PSP_WEAPON,ResolveState("Release"));
|
||||
}
|
||||
action void A_FireBlast()
|
||||
{
|
||||
|
|
@ -72,7 +84,7 @@ Class ImpactHammer : UTWeapon
|
|||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z);
|
||||
double realcharge = min(1.5,invoker.chargesize);
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,60,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -137,7 +149,7 @@ Class ImpactHammer : UTWeapon
|
|||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z);
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,120,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
double dscale = d.Distance/120.;
|
||||
|
|
@ -187,20 +199,6 @@ Class ImpactHammer : UTWeapon
|
|||
s.scale *= 0.4;
|
||||
}
|
||||
}
|
||||
action void A_ImpactRefire( statelabel flash = null )
|
||||
{
|
||||
FLineTraceData d;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
|
||||
{
|
||||
A_ClearRefire();
|
||||
return;
|
||||
}
|
||||
A_Refire(flash);
|
||||
}
|
||||
override void DetachFromOwner()
|
||||
{
|
||||
if ( Owner ) Owner.A_StopSound(CHAN_WEAPON);
|
||||
|
|
@ -237,75 +235,55 @@ Class ImpactHammer : UTWeapon
|
|||
A_WeaponReady();
|
||||
}
|
||||
Wait;
|
||||
Charging:
|
||||
TNT1 A 1 A_ChargeUp();
|
||||
Wait;
|
||||
Fire:
|
||||
IMPL A 0
|
||||
{
|
||||
A_ResetCharge();
|
||||
A_Overlay(-9999,"Charging");
|
||||
A_PlaySound("impact/pull",CHAN_WEAPON);
|
||||
}
|
||||
IMPL A 5 A_ChargeUp(5);
|
||||
IMPL B 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPL B 5 A_ChargeUp(5);
|
||||
IMPL C 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPL C 5 A_ChargeUp(5);
|
||||
IMPL D 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPL D 5 A_ChargeUp(5);
|
||||
IMPL E 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPL E 5 A_ChargeUp(5);
|
||||
IMPL E 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPL E 0 A_PlaySound("impact/loop",CHAN_WEAPON,looping:true);
|
||||
IMPL ABCDE 5;
|
||||
IMPR A 0 A_PlaySound("impact/loop",CHAN_WEAPON,looping:true);
|
||||
Goto Hold;
|
||||
Hold:
|
||||
IMPR A 1 A_ChargeUp();
|
||||
IMPR B 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR B 1 A_ChargeUp();
|
||||
IMPR C 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR C 1 A_ChargeUp();
|
||||
IMPR D 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR D 1 A_ChargeUp();
|
||||
IMPR E 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR E 1 A_ChargeUp();
|
||||
IMPR F 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR F 1 A_ChargeUp();
|
||||
IMPR G 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR G 1 A_ChargeUp();
|
||||
IMPR H 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR H 1 A_ChargeUp();
|
||||
IMPR I 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR I 1 A_ChargeUp();
|
||||
IMPR J 0 A_ImpactRefire(1);
|
||||
Goto Release;
|
||||
IMPR J 1 A_ChargeUp();
|
||||
IMPR A 0 A_ImpactRefire("Hold");
|
||||
Goto Release;
|
||||
IMPR ABCDEFGHIJ 1;
|
||||
Loop;
|
||||
Release:
|
||||
IMPF A 0
|
||||
{
|
||||
A_Overlay(-9999,null);
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayAttacking3();
|
||||
A_FireBlast();
|
||||
}
|
||||
IMPF AABCCDEEFGGHIIJKKLMMNOOP 1;
|
||||
// this is why we need a model animation overhaul
|
||||
IMPF A 2;
|
||||
IMPF B 1;
|
||||
IMPF C 2;
|
||||
IMPF D 1;
|
||||
IMPF E 2;
|
||||
IMPF F 1;
|
||||
IMPF G 2;
|
||||
IMPF H 1;
|
||||
IMPF I 2;
|
||||
IMPF J 1;
|
||||
IMPF K 2;
|
||||
IMPF L 1;
|
||||
IMPF M 2;
|
||||
IMPF N 1;
|
||||
IMPF O 2;
|
||||
IMPF P 1;
|
||||
Goto Idle;
|
||||
AltFire:
|
||||
IMPF A 0 A_FireAltBlast();
|
||||
IMPF ABCDEFGHIJKLMNOP 1;
|
||||
IMPF A 1 A_FireAltBlast();
|
||||
IMPF BCDEFGHIJKLMNOP 1;
|
||||
Goto Idle;
|
||||
Deselect:
|
||||
IMPD A 0 A_StopSound(CHAN_WEAPON);
|
||||
IMPD ABCDE 2;
|
||||
IMPD A 2 A_StopSound(CHAN_WEAPON);
|
||||
IMPD BCDE 2;
|
||||
IMPD E 1 A_Lower(int.max);
|
||||
Wait;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue