1.2 update, w/ GZDoom 4.9 stuff:
- Customizable player skins here too.
- Integrated re-skin add-ons ("Old Sounds" is still separate).
- The usual fixes and optimizations.
- All weapons are now left-handed, where possible.
This commit is contained in:
parent
5346b420e3
commit
a21aa43f35
1485 changed files with 1157 additions and 380 deletions
|
|
@ -136,12 +136,12 @@ Class OnFire : Thinker
|
|||
{
|
||||
let c = victim.Spawn("UFlameTrail",pos);
|
||||
c.scale *= max(.3,mult*0.5);
|
||||
c.vel = victim.vel*0.5+(cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[FlameT](.5,2.)*c.scale.x;
|
||||
c.vel = victim.vel*0.5+dt_Utility.Vec3FromAngle(ang,pt)*FRandom[FlameT](.5,2.)*c.scale.x;
|
||||
}
|
||||
let s = victim.Spawn("UTSmoke",pos);
|
||||
s.scale *= max(1.,1.6*mult);
|
||||
s.alpha *= min(amount+30,100)*0.02;
|
||||
s.vel = victim.vel*0.5+(cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[FlameT](.2,.6)*s.scale.x;
|
||||
s.vel = victim.vel*0.5+dt_Utility.Vec3FromAngle(ang,pt)*FRandom[FlameT](.2,.6)*s.scale.x;
|
||||
}
|
||||
if ( (!sting_flametspread && !forcespread) || (amount <= 0) ) return;
|
||||
// spread to nearby actors
|
||||
|
|
@ -274,6 +274,10 @@ Class UFlame : Actor
|
|||
OnFire.Apply(t,master,amt);
|
||||
}
|
||||
}
|
||||
override bool CanCollideWith( Actor Other, bool passive )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Default
|
||||
{
|
||||
RenderStyle "Add";
|
||||
|
|
@ -293,7 +297,7 @@ Class UFlame : Actor
|
|||
+DROPOFF;
|
||||
+NOBLOCKMONST;
|
||||
+DONTSPLASH;
|
||||
//+THRUIMPASSABLE; // gonna have to implement this
|
||||
+MBFBOUNCER;
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -740,7 +744,7 @@ Class UNapalmGlob : UNapalm
|
|||
|
||||
void SpawnSplash()
|
||||
{
|
||||
Vector3 ofs = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
Vector3 ofs = dt_Utility.Vec3FromAngle(angle,pitch);
|
||||
for ( int i=0; i<2; i++ )
|
||||
{
|
||||
if ( numsplash-- <= 0 ) return;
|
||||
|
|
@ -752,7 +756,7 @@ Class UNapalmGlob : UNapalm
|
|||
d.scale *= FRandom[FlameT](0.5,0.7);
|
||||
d.angle = atan2(dir.y,dir.x);
|
||||
d.pitch = -asin(dir.z);
|
||||
d.vel = (cos(d.angle)*cos(d.pitch),sin(d.angle)*cos(d.pitch),-sin(d.pitch))*d.speed*FRandom[FlameT](0.3,0.5)*scale.x;
|
||||
d.vel = dt_Utility.Vec3FromAngle(d.angle,d.pitch)*d.speed*FRandom[FlameT](0.3,0.5)*scale.x;
|
||||
d.vel.z -= 2;
|
||||
}
|
||||
}
|
||||
|
|
@ -764,7 +768,7 @@ Class UNapalmGlob : UNapalm
|
|||
}
|
||||
override void OnDestroy()
|
||||
{
|
||||
Vector3 ofs = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
Vector3 ofs = dt_Utility.Vec3FromAngle(angle,pitch);
|
||||
while ( numsplash > 0 ) SpawnSplash();
|
||||
}
|
||||
override void Tick()
|
||||
|
|
@ -784,11 +788,16 @@ Class UNapalmSplash : UNapalm
|
|||
}
|
||||
}
|
||||
|
||||
// MODELDEF fuckery
|
||||
Class UFlamethrowerAlt : Actor abstract {}
|
||||
|
||||
Class UFlamethrower : UnrealWeapon
|
||||
{
|
||||
bool bCharging;
|
||||
double ChargeSize, Count;
|
||||
|
||||
bool bOldSkin;
|
||||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
|
|
@ -797,6 +806,16 @@ Class UFlamethrower : UnrealWeapon
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_altflamet )
|
||||
{
|
||||
if ( !bOldSkin ) A_ChangeModel("UFlamethrowerAlt");
|
||||
bOldSkin = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( bOldSkin ) A_ChangeModel("UFlamethrower");
|
||||
bOldSkin = false;
|
||||
}
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
|
|
@ -867,30 +886,30 @@ Class UFlamethrower : UnrealWeapon
|
|||
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x+2.3*y-2.7*z);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x-2.3*y-2.7*z);
|
||||
for ( int i=0; i<2; i++ )
|
||||
{
|
||||
double a = FRandom[FlameT](0,360), s = FRandom[FlameT](0,.05);
|
||||
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
|
||||
Actor p = Spawn("UFlame",origin);
|
||||
if ( p.waterlevel > 0 )
|
||||
{
|
||||
p.Destroy();
|
||||
s = FRandom[FlameT](0,.12);
|
||||
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||
dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
|
||||
p = Spawn("UNapalmSplash",origin);
|
||||
p.scale *= 0.2;
|
||||
p.angle = atan2(dir.y,dir.x);
|
||||
p.pitch = asin(-dir.z);
|
||||
p.vel = vel*.5+(cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed*FRandom[FlameT](0.3,0.6);
|
||||
p.vel = vel*.5+dt_Utility.Vec3FromAngle(p.angle,p.pitch)*p.speed*FRandom[FlameT](0.3,0.6);
|
||||
p.vel.z -= 3;
|
||||
p.target = self;
|
||||
continue;
|
||||
}
|
||||
p.angle = atan2(dir.y,dir.x);
|
||||
p.pitch = asin(-dir.z);
|
||||
p.vel = vel*.1+(cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed*FRandom[FlameT](0.8,1.4);
|
||||
p.vel = vel*.1+dt_Utility.Vec3FromAngle(p.angle,p.pitch)*p.speed*FRandom[FlameT](0.8,1.4);
|
||||
p.master = self;
|
||||
}
|
||||
}
|
||||
|
|
@ -954,17 +973,17 @@ Class UFlamethrower : UnrealWeapon
|
|||
A_QuakeEx(1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),5+int(1.2*invoker.chargesize),0,64,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05+0.01*invoker.chargesize);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2.3*y-2.7*z);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2.3*y-2.7*z);
|
||||
Actor p = Spawn("UNapalmGlob",origin);
|
||||
p.A_SetScale(0.5+invoker.chargesize/3.5);
|
||||
p.angle = angle;
|
||||
p.pitch = BulletSlope();
|
||||
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
|
||||
p.vel = dt_Utility.Vec3FromAngle(p.angle,p.pitch)*p.speed;
|
||||
p.target = self;
|
||||
for ( int i=0; i<12; i++ )
|
||||
{
|
||||
let s = Spawn("UTViewSpark",origin);
|
||||
UTViewSpark(s).ofs = (10,2.3,-2.7);
|
||||
UTViewSpark(s).ofs = (10,-2.3,-2.7);
|
||||
s.target = self;
|
||||
UTViewSpark(s).vvel += (FRandom[FlameT](0.8,1.6),FRandom[FlameT](-0.5,0.5),FRandom[FlameT](-0.5,0.5));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue