Merge branch 'experimental' into devel
This commit is contained in:
commit
0b4767d7de
9 changed files with 108 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue