Merge branch 'experimental' into devel

This commit is contained in:
Marisa the Magician 2019-09-11 15:46:30 +02:00
commit 0b4767d7de
9 changed files with 108 additions and 20 deletions

View file

@ -273,6 +273,7 @@ Class BioGel : Actor
// align self to what surface was hit, currently does not support 3d floors + slopes properly
virtual void AlignSelf()
{
F3DFloor ff;
bINTERPOLATEANGLES = false;
bHITOWNER = true;
A_NoGravity();
@ -384,9 +385,17 @@ Class BioGel : Actor
}
else if ( BlockingFloor )
{
// find closest 3d floor for its normal
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
{
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
ff = CurSector.Get3DFLoor(i);
break;
}
if ( ff ) normal = -ff.top.Normal;
else normal = BlockingFloor.floorplane.Normal;
atsector = BlockingFloor;
atplane = 0;
normal = BlockingFloor.floorplane.Normal;
pitch = asin(-normal.z);
angle = atan2(normal.y,normal.x);
roll = FRandom[GES](0,360);
@ -396,9 +405,17 @@ Class BioGel : Actor
}
else if ( BlockingCeiling )
{
// find closest 3d floor for its normal
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
{
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
ff = CurSector.Get3DFloor(i);
break;
}
if ( ff ) normal = -ff.bottom.Normal;
else normal = BlockingCeiling.ceilingplane.Normal;
atsector = BlockingCeiling;
atplane = 1;
normal = BlockingCeiling.ceilingplane.Normal;
pitch = asin(-normal.z);
angle = atan2(normal.y,normal.x);
roll = FRandom[GES](0,360);

View file

@ -358,8 +358,16 @@ Class Enforcer : UTWeapon
else if ( d.HitType != TRACE_HitNone )
{
Vector3 hitnormal = -d.HitDir;
if ( d.HitType == TRACE_HitFloor ) hitnormal = d.HitSector.floorplane.Normal;
else if ( d.HitType == TRACE_HitCeiling ) hitnormal = d.HitSector.ceilingplane.Normal;
if ( d.HitType == TRACE_HitFloor )
{
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.top.Normal;
else hitnormal = d.HitSector.floorplane.Normal;
}
else if ( d.HitType == TRACE_HitCeiling )
{
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.bottom.Normal;
else hitnormal = d.HitSector.ceilingplane.Normal;
}
else if ( d.HitType == TRACE_HitWall )
{
hitnormal = (-d.HitLine.delta.y,d.HitLine.delta.x,0).unit();

View file

@ -239,8 +239,31 @@ Class FlakChunk : Actor
// chunks in vanilla have a special variation on the standard reflect formula that causes them to bounce differently when hitting a surface head-on
// (0.5 to 0.8 reduction perpendicular to the surface normal, to be specific)
Vector3 HitNormal = -vel.unit();
if ( BlockingFloor ) HitNormal = BlockingFloor.floorplane.Normal;
else if ( BlockingCeiling ) HitNormal = BlockingCeiling.ceilingplane.Normal;
F3DFloor ff;
if ( BlockingFloor )
{
// find closest 3d floor for its normal
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
{
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
ff = CurSector.Get3DFloor(i);
break;
}
if ( ff ) HitNormal = -ff.top.Normal;
else HitNormal = BlockingFloor.floorplane.Normal;
}
else if ( BlockingCeiling )
{
// find closest 3d floor for its normal
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
{
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
ff = CurSector.Get3DFloor(i);
break;
}
if ( ff ) HitNormal = -ff.bottom.Normal;
else HitNormal = BlockingCeiling.ceilingplane.Normal;
}
else if ( BlockingLine )
{
HitNormal = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit();

View file

@ -132,8 +132,16 @@ Class Minigun : UTWeapon
else if ( d.HitType != TRACE_HitNone )
{
Vector3 hitnormal = -d.HitDir;
if ( d.HitType == TRACE_HitFloor ) hitnormal = d.HitSector.floorplane.Normal;
else if ( d.HitType == TRACE_HitCeiling ) hitnormal = d.HitSector.ceilingplane.Normal;
if ( d.HitType == TRACE_HitFloor )
{
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.top.Normal;
else hitnormal = d.HitSector.floorplane.Normal;
}
else if ( d.HitType == TRACE_HitCeiling )
{
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.bottom.Normal;
else hitnormal = d.HitSector.ceilingplane.Normal;
}
else if ( d.HitType == TRACE_HitWall )
{
hitnormal = (-d.HitLine.delta.y,d.HitLine.delta.x,0).unit();

View file

@ -384,8 +384,16 @@ Class PulseBolt : Actor
if ( t.Results.Side ) norm *= -1;
t.Results.HitLine.RemoteActivate(tracer,t.Results.Side,SPAC_Impact,t.Results.HitPos);
}
else if ( t.Results.HitType == TRACE_HitFloor ) norm = t.Results.HitSector.floorplane.Normal;
else if ( t.Results.HitType == TRACE_HitCeiling ) norm = t.Results.HitSector.ceilingplane.Normal;
else if ( t.Results.HitType == TRACE_HitFloor )
{
if ( t.Results.ffloor ) norm = -t.Results.ffloor.top.Normal;
else norm = t.Results.HitSector.floorplane.Normal;
}
else if ( t.Results.HitType == TRACE_HitCeiling )
{
if ( t.Results.ffloor ) norm = -t.Results.ffloor.bottom.Normal;
else norm = t.Results.HitSector.ceilingplane.Normal;
}
int numpt = Random[Pulse](10,20)*!Random[Pulse](0,2);
for ( int i=0; i<numpt; i++ )
{

View file

@ -391,9 +391,15 @@ Class ShockBeam : Actor
if ( t.Results.Side == 0 ) HitNormal *= -1;
}
else if ( t.Results.HitType == TRACE_HitFloor )
HitNormal = t.Results.HitSector.floorplane.Normal;
{
if ( t.Results.ffloor ) HitNormal = -t.Results.ffloor.top.Normal;
else HitNormal = t.Results.HitSector.floorplane.Normal;
}
else if ( t.Results.HitType == TRACE_HitCeiling )
HitNormal = t.Results.HitSector.ceilingplane.Normal;
{
if ( t.Results.ffloor ) HitNormal = -t.Results.ffloor.bottom.Normal;
else HitNormal = t.Results.HitSector.ceilingplane.Normal;
}
let r = Spawn("ShockBeamRing",pos);
r.angle = atan2(HitNormal.y,HitNormal.x);
r.pitch = asin(-HitNormal.z);
@ -627,9 +633,15 @@ Class SuperShockBeam : Actor
if ( t.Results.Side == 1 ) HitNormal *= -1;
}
else if ( t.Results.HitType == TRACE_HitFloor )
HitNormal = t.Results.HitSector.floorplane.Normal;
{
if ( t.Results.ffloor ) HitNormal = -t.Results.ffloor.top.Normal;
else HitNormal = t.Results.HitSector.floorplane.Normal;
}
else if ( t.Results.HitType == TRACE_HitCeiling )
HitNormal = t.Results.HitSector.ceilingplane.Normal;
{
if ( t.Results.ffloor ) HitNormal = -t.Results.ffloor.bottom.Normal;
else HitNormal = t.Results.HitSector.ceilingplane.Normal;
}
let r = Spawn("SuperShockBeamRing",pos);
r.angle = atan2(HitNormal.y,HitNormal.x);
r.pitch = asin(-HitNormal.z);

View file

@ -131,8 +131,16 @@ Class SniperRifle : UTWeapon
else if ( d.HitType != TRACE_HitNone )
{
Vector3 hitnormal = -d.HitDir;
if ( d.HitType == TRACE_HitFloor ) hitnormal = d.HitSector.floorplane.Normal;
else if ( d.HitType == TRACE_HitCeiling ) hitnormal = d.HitSector.ceilingplane.Normal;
if ( d.HitType == TRACE_HitFloor )
{
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.top.Normal;
else hitnormal = d.HitSector.floorplane.Normal;
}
else if ( d.HitType == TRACE_HitCeiling )
{
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.bottom.Normal;
else hitnormal = d.HitSector.ceilingplane.Normal;
}
else if ( d.HitType == TRACE_HitWall )
{
hitnormal = (-d.HitLine.delta.y,d.HitLine.delta.x,0).unit();

View file

@ -26,7 +26,10 @@ Class OptionMenuItemUTHudPreview : OptionMenuItem
{
int xpos = indent + CursorSpace();
int ypos = y+OptionMenuSettings.mLinespacing*CleanYfac_1;
<<<<<<< HEAD
Screen.DrawFrame(xpos,ypos,64*CleanXFac_1,64*CleanYFac_1);
=======
>>>>>>> experimental
Screen.DrawTexture(tex[0],false,xpos,ypos,DTA_CleanNoMove_1,true);
Color tintcolor = Color("White");
switch ( mColorP.GetInt() )
@ -49,6 +52,7 @@ Class OptionMenuItemUTHudPreview : OptionMenuItem
Screen.DrawTexture(tex[1],false,xpos,ypos,DTA_CleanNoMove_1,true,DTA_FillColor,tintcolor,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded);
return -1;
}
<<<<<<< HEAD
}
// changes to Tahoma
@ -84,3 +88,6 @@ Class UTMessageBox : MessageBoxMenu
mMessage = textFont.BreakLines(Stringtable.Localize(message),generic_ui?600:300);
}
}
=======
}
>>>>>>> experimental