Revert "Remove ZPolyobject due to licensing concerns."

This reverts commit f134375f7e.

Library is now MIT licensed and can be included.
This commit is contained in:
Mari the Deer 2022-10-08 15:55:42 +02:00
commit 0fbbb91b8e
15 changed files with 566 additions and 20 deletions

View file

@ -50,7 +50,7 @@ Class BustPoint
Class BusterWall : Thinker
{
Sector hitsector;
//swwm_PolyobjectHandle hitpoly;
swwm_PolyobjectHandle hitpoly;
int accdamage;
Array<int> acchits;
int hitplane;
@ -91,11 +91,11 @@ Class BusterWall : Thinker
private void SpawnDebris( bool initial = false )
{
/*if ( hitpoly )
if ( hitpoly )
{
SpawnDebrisPoly(initial);
return;
}*/
}
double x, y, z;
for ( z=boundsmin.z; z<boundsmax.z; z+=step.z )
for ( y=boundsmin.y; y<boundsmax.y; y+=step.y )
@ -134,7 +134,7 @@ Class BusterWall : Thinker
}
}
/*private void SpawnDebrisPoly( bool initial = false )
private void SpawnDebrisPoly( bool initial = false )
{
for ( int i=0; i<polygrid.Size(); i++ ) for ( double z=boundsmin.z; z<boundsmax.z; z+=step.z )
{
@ -168,7 +168,7 @@ Class BusterWall : Thinker
s.A_SetTranslation('Rubble');
}
}
}*/
}
private static bool IsIOSWall( Line l )
{
@ -275,7 +275,7 @@ Class BusterWall : Thinker
return Bust(faketracer.Results,accdamage,instigator,x,hitz);
}
/*static bool BustPolyobj( swwm_PolyobjectHandle p, int accdamage, Actor instigator, Vector3 x )
static bool BustPolyobj( swwm_PolyobjectHandle p, int accdamage, Actor instigator, Vector3 x )
{
let ti = ThinkerIterator.Create("BusterWall",STAT_USER);
BusterWall iter, bust = null;
@ -391,7 +391,7 @@ Class BusterWall : Thinker
for ( int i=0; i<bust.acchits.Size(); i++ )
SWWMDamNum.Spawn(bust.acchits[i],level.Vec3Offset(bcenter,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.),'Wallbust');
return true;
}*/
}
static bool Bust( TraceResults d, int accdamage, Actor instigator, Vector3 x, double hitz )
{
@ -402,8 +402,8 @@ Class BusterWall : Thinker
if ( d.HitType == TRACE_HitWall )
{
// check if it's a polyobject line, if so, switch to the other bust method
//swwm_PolyObjectHandle p;
//if ( SWWMUtility.IsPolyLine(d.HitLine,p) ) return BustPolyobj(p,accdamage,instigator,x);
swwm_PolyObjectHandle p;
if ( SWWMUtility.IsPolyLine(d.HitLine,p) ) return BustPolyobj(p,accdamage,instigator,x);
// no busting the goat
if ( IsIOSWall(d.HitLine) ) return false;
// onesided wall? no bust