- formatting the rest of break.cpp

This commit is contained in:
Christoph Oelckers 2022-09-04 22:29:14 +02:00
parent 0644add7be
commit 19e703aaed

View file

@ -643,13 +643,19 @@ int AutoBreakWall(walltype* wallp, const DVector3& hit_pos, DAngle ang, int type
else
{
wallp->picnum = break_info->breaknum;
if ((int16_t)wallp->hitag < 0)
if (wallp->hitag < 0)
DoWallBreakSpriteMatch(wallp->hitag);
}
}
return true;
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
bool UserBreakWall(walltype* wp)
{
int match = wp->hitag;
@ -737,6 +743,12 @@ bool UserBreakWall(walltype* wp)
return false;
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int WallBreakPosition(walltype* wp, sectortype** sectp, DVector3& pos, DAngle& ang)
{
int nx,ny;
@ -787,7 +799,12 @@ int WallBreakPosition(walltype* wp, sectortype** sectp, DVector3& pos, DAngle& a
return true;
}
//---------------------------------------------------------------------------
//
// If the tough parameter is not set, then it can't break tough walls and sprites
//
//---------------------------------------------------------------------------
bool HitBreakWall(walltype* wp, DVector3 hitpos, DAngle ang, int type)
{
int match = wp->hitag;
@ -808,9 +825,11 @@ bool HitBreakWall(walltype* wp, DVector3 hitpos, DAngle ang, int type)
return true;
}
//---------------------------------------------------------------------------
//
// SPRITE
//
//
//---------------------------------------------------------------------------
int KillBreakSprite(DSWActor* breakActor)
{
@ -844,6 +863,11 @@ int KillBreakSprite(DSWActor* breakActor)
return 0;
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int UserBreakSprite(DSWActor* breakActor)
{
@ -915,6 +939,12 @@ int UserBreakSprite(DSWActor* breakActor)
return false;
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int AutoBreakSprite(DSWActor* breakActor, int type)
{
BREAK_INFO* break_info;
@ -980,6 +1010,12 @@ int AutoBreakSprite(DSWActor* breakActor, int type)
return false;
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
bool NullActor(DSWActor* actor)
{
// a Null Actor is defined as an actor that has no real controlling programming attached
@ -999,6 +1035,12 @@ bool NullActor(DSWActor* actor)
return false;
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int HitBreakSprite(DSWActor* breakActor, int type)
{
if (TEST_BOOL1(breakActor))
@ -1023,6 +1065,12 @@ int HitBreakSprite(DSWActor* breakActor, int type)
return AutoBreakSprite(breakActor, type);
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
void DoWallBreakMatch(int match)
{
sectortype* sect = nullptr;
@ -1041,6 +1089,12 @@ void DoWallBreakMatch(int match)
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
static void DoWallBreakSpriteMatch(int match)
{
SWStatIterator it(STAT_ENEMY);
@ -1052,4 +1106,5 @@ static void DoWallBreakSpriteMatch(int match)
}
}
}
END_SW_NS