Use CORRECTPIXELSTRETCH where needed.
This commit is contained in:
parent
7be1793900
commit
02dd50101e
32 changed files with 136 additions and 18 deletions
|
|
@ -819,6 +819,7 @@ Class MisterRifle : SWWMWeapon
|
|||
b = Spawn("MisterRailBeam",sstart);
|
||||
b.target = self;
|
||||
b.frame = 1;
|
||||
b.speed = 32;
|
||||
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,32);
|
||||
MisterRailBeam(b).mrc = mrc;
|
||||
mrc.effectors.Push(b);
|
||||
|
|
@ -832,6 +833,7 @@ Class MisterRifle : SWWMWeapon
|
|||
b.frame = 1;
|
||||
}
|
||||
b.target = self;
|
||||
b.speed = sdist;
|
||||
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist);
|
||||
MisterRailBeam(b).mrc = mrc;
|
||||
mrc.effectors.Push(b);
|
||||
|
|
@ -849,6 +851,7 @@ Class MisterRifle : SWWMWeapon
|
|||
b = Spawn("MisterRailBeam",sstart);
|
||||
b.target = self;
|
||||
b.frame = 1;
|
||||
b.speed = 32;
|
||||
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,32);
|
||||
MisterRailBeam(b).mrc = mrc;
|
||||
mrc.effectors.Push(b);
|
||||
|
|
@ -864,6 +867,7 @@ Class MisterRifle : SWWMWeapon
|
|||
}
|
||||
else b = Spawn("MisterRailBeam",sstart);
|
||||
b.target = self;
|
||||
b.speed = sdist;
|
||||
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist);
|
||||
MisterRailBeam(b).mrc = mrc;
|
||||
mrc.effectors.Push(b);
|
||||
|
|
@ -875,6 +879,7 @@ Class MisterRifle : SWWMWeapon
|
|||
sdir /= sdist;
|
||||
b = Spawn("MisterRailBeam",sstart);
|
||||
b.target = self;
|
||||
b.speed = sdist;
|
||||
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist);
|
||||
MisterRailBeam(b).mrc = mrc;
|
||||
mrc.effectors.Push(b);
|
||||
|
|
|
|||
|
|
@ -1797,7 +1797,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
pos = SWWMUtility.LerpVector2(t.target.prev.xy,t.target.pos.xy,FracTic);
|
||||
angle = t.target.angle;
|
||||
radius = t.isybeam?(t.target.scale.y*cos(t.target.pitch-90)):t.isbeam?(t.target.speed*cos(t.target.pitch)):t.target.radius;
|
||||
radius = t.isybeam?(t.target.speed*cos(t.target.pitch-90)):t.isbeam?(t.target.speed*cos(t.target.pitch)):t.target.radius;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ Class SWWMSimpleTracker play
|
|||
if ( !target ) return;
|
||||
isbeam = SWWMUtility.IsBeamProj(target);
|
||||
isybeam = isbeam&&SWWMUtility.IsYBeam(target);
|
||||
radius = isybeam?(target.scale.y*cos(target.pitch+90)):isbeam?(target.speed*cos(target.pitch)):target.radius;
|
||||
radius = isybeam?(target.speed*cos(target.pitch+90)):isbeam?(target.speed*cos(target.pitch)):target.radius;
|
||||
angle = target.angle;
|
||||
pos = target.pos;
|
||||
isplayer = target.player;
|
||||
|
|
|
|||
|
|
@ -592,6 +592,7 @@ Class SuperFancySparkle : SWWMNonInteractiveActor
|
|||
let t = Spawn("SuperFancyTrail",pos);
|
||||
t.alpha = alpha*.5;
|
||||
t.scale.x *= scale.x;
|
||||
t.speed = dist;
|
||||
[t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(dir,dist);
|
||||
t.SetState(t.SpawnState+frame);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -517,6 +517,7 @@ Class SWWMSpark : SWWMNonInteractiveActor
|
|||
taildir /= taillen;
|
||||
let t = Spawn("SWWMSparkTrail",newpos);
|
||||
t.alpha = alpha*.3;
|
||||
t.speed = taillen;
|
||||
[t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(taildir,taillen);
|
||||
}
|
||||
SetOrigin(newpos,true);
|
||||
|
|
|
|||
|
|
@ -1463,7 +1463,7 @@ Class SWWMUtility
|
|||
if ( a is 'MisterRailBeam' ) return true;
|
||||
return false;
|
||||
}
|
||||
// is this a YBeam type? (real pitch is pitch-90, scale.y == length)
|
||||
// is this a YBeam type? (real pitch is pitch-90)
|
||||
static play bool IsYBeam( Actor a )
|
||||
{
|
||||
if ( a is 'MisterRailBeam' ) return true;
|
||||
|
|
@ -1473,17 +1473,20 @@ Class SWWMUtility
|
|||
// calculate angle, pitch and yscale of YBeam based on direction vector and length
|
||||
static clearscope double, double, double CalcYBeam( Vector3 dir, double dist )
|
||||
{
|
||||
// new code post pixelstretch bug fix, don't use yet
|
||||
/*dir *= level.pixelstretch;
|
||||
if ( level.pixelstretch == 1. )
|
||||
{
|
||||
// ez modo
|
||||
double angle = atan2(dir.y,dir.x);
|
||||
double pitch = asin(-dir.z)+90;
|
||||
return angle, pitch, dist;
|
||||
}
|
||||
dir *= level.pixelstretch;
|
||||
double len = dir.length();
|
||||
dir /= len;
|
||||
double angle = atan2(dir.y,dir.z);
|
||||
double pitch = asin(-dir.z)+90;
|
||||
double yscale = dist*len;
|
||||
return angle, pitch, yscale;*/
|
||||
double angle = atan2(dir.y,dir.x);
|
||||
double pitch = asin(-dir.z)+90;
|
||||
return angle, pitch, dist;
|
||||
return angle, pitch, yscale;
|
||||
}
|
||||
|
||||
static clearscope bool IdentifyingDog( Actor a )
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ Class EvisceratorChunk : Actor
|
|||
dir /= dist;
|
||||
let t = Spawn("EvisceratorChunkTrail",pos);
|
||||
t.alpha = alph;
|
||||
t.speed = dist;
|
||||
[t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(dir,dist);
|
||||
t.SetState(t.SpawnState+trailcolor);
|
||||
if ( trailcolor > 0 )
|
||||
|
|
|
|||
|
|
@ -1900,6 +1900,7 @@ Class YnykronVoidSparkle : SWWMNonInteractiveActor
|
|||
let t = Spawn("YnykronVoidSparkleTrail",newpos);
|
||||
t.alpha = alpha*.5;
|
||||
t.scale.x *= scale.x;
|
||||
t.speed = len;
|
||||
[t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(dir,len);
|
||||
}
|
||||
SetOrigin(newpos,true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue