CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
This commit is contained in:
@@ -36,7 +36,6 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt, cChunk &
|
||||
|
||||
|
||||
|
||||
|
||||
void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
|
||||
{
|
||||
if (!a_Player->CanMobsTarget())
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cChicken::cChicken(void) :
|
||||
super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", 0.4, 0.7),
|
||||
m_EggDropTimer(0)
|
||||
@@ -20,6 +18,7 @@ cChicken::cChicken(void) :
|
||||
|
||||
|
||||
|
||||
|
||||
void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
super::Tick(a_Dt, a_Chunk);
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cCow::cCow(void) :
|
||||
super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3)
|
||||
{
|
||||
|
||||
@@ -97,6 +97,7 @@ void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
|
||||
|
||||
|
||||
|
||||
void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk)
|
||||
{
|
||||
if (GetTarget() != nullptr)
|
||||
|
||||
@@ -27,6 +27,8 @@ void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AString cMagmaCube::GetSizeName(int a_Size)
|
||||
{
|
||||
if (a_Size == 1)
|
||||
|
||||
@@ -1079,7 +1079,6 @@ int cMonster::GetSpawnDelay(cMonster::eFamily a_MobFamily)
|
||||
|
||||
|
||||
|
||||
|
||||
/** Sets the target. */
|
||||
void cMonster::SetTarget (cPawn * a_NewTarget)
|
||||
{
|
||||
@@ -1347,6 +1346,7 @@ void cMonster::HandleDaylightBurning(cChunk & a_Chunk, bool WouldBurn)
|
||||
|
||||
|
||||
|
||||
|
||||
bool cMonster::WouldBurnAt(Vector3d a_Location, cChunk & a_Chunk)
|
||||
{
|
||||
// If the Y coord is out of range, return the most logical result without considering anything else:
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cMooshroom::cMooshroom(void) :
|
||||
super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3)
|
||||
{
|
||||
|
||||
@@ -66,6 +66,10 @@ cPath::cPath(
|
||||
ProcessCell(GetCell(m_Source), nullptr, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cPath::cPath() : m_IsValid(false)
|
||||
{
|
||||
|
||||
@@ -73,6 +77,8 @@ cPath::cPath() : m_IsValid(false)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ePathFinderStatus cPath::CalculationStep(cChunk & a_Chunk)
|
||||
{
|
||||
m_Chunk = &a_Chunk;
|
||||
|
||||
@@ -182,6 +182,7 @@ void cVillager::HandleFarmerTryHarvestCrops()
|
||||
|
||||
|
||||
|
||||
|
||||
void cVillager::HandleFarmerPlaceCrops()
|
||||
{
|
||||
// Check if there is still farmland at the spot where the crops were.
|
||||
|
||||
@@ -88,6 +88,10 @@ void cWolf::NotifyAlliesOfFight(cPawn * a_Opponent)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool cWolf::Attack(std::chrono::milliseconds a_Dt)
|
||||
{
|
||||
UNUSED(a_Dt);
|
||||
@@ -384,6 +388,8 @@ void cWolf::TickFollowPlayer()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cWolf::InStateIdle(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
if (!IsTame())
|
||||
|
||||
Reference in New Issue
Block a user