diff options
Diffstat (limited to '')
60 files changed, 132 insertions, 128 deletions
diff --git a/src/Mobs/Blaze.h b/src/Mobs/Blaze.h index 6698026e9..65645bce9 100644 --- a/src/Mobs/Blaze.h +++ b/src/Mobs/Blaze.h @@ -17,5 +17,5 @@ public: CLASS_PROTODEF(cBlaze) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/CaveSpider.h b/src/Mobs/CaveSpider.h index 25adcf3e0..0dab0d798 100644 --- a/src/Mobs/CaveSpider.h +++ b/src/Mobs/CaveSpider.h @@ -16,8 +16,8 @@ public: CLASS_PROTODEF(cCaveSpider) - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Chicken.h b/src/Mobs/Chicken.h index a1e6f5ecf..7e52d6d83 100644 --- a/src/Mobs/Chicken.h +++ b/src/Mobs/Chicken.h @@ -16,8 +16,8 @@ public: CLASS_PROTODEF(cChicken) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; private: diff --git a/src/Mobs/Components/AIAggressiveComponent.h b/src/Mobs/Components/AIAggressiveComponent.h index 2cea452c5..98854aeab 100644 --- a/src/Mobs/Components/AIAggressiveComponent.h +++ b/src/Mobs/Components/AIAggressiveComponent.h @@ -6,7 +6,11 @@ class cEntity; class cAIAggressiveComponent : public cAIComponent { typedef cAIComponent super; protected: + enum MState{ATTACKING, IDLE, CHASING, ESCAPING} m_EMState; + cEntity * m_Target; public: cAIAggressiveComponent(cMonster * a_Monster); - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + }; diff --git a/src/Mobs/Cow.h b/src/Mobs/Cow.h index ab86dafb4..09f68fe13 100644 --- a/src/Mobs/Cow.h +++ b/src/Mobs/Cow.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cCow) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp index 354910bf7..9b7fc52c1 100644 --- a/src/Mobs/Creeper.cpp +++ b/src/Mobs/Creeper.cpp @@ -48,7 +48,7 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer) { } - virtual bool Item(cEntity * a_Entity) /*override*/ + virtual bool Item(cEntity * a_Entity) override { if (a_Entity->IsMob() && ((cMonster *)a_Entity)->GetMobType() == mtSkeleton) { diff --git a/src/Mobs/Creeper.h b/src/Mobs/Creeper.h index 10ff3d249..9824608b5 100644 --- a/src/Mobs/Creeper.h +++ b/src/Mobs/Creeper.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cCreeper) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsBlowing(void) const {return m_bIsBlowing; } bool IsCharged(void) const {return m_bIsCharged; } diff --git a/src/Mobs/EnderDragon.h b/src/Mobs/EnderDragon.h index b75bdb5a5..2876c3b99 100644 --- a/src/Mobs/EnderDragon.h +++ b/src/Mobs/EnderDragon.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cEnderDragon) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Enderman.h b/src/Mobs/Enderman.h index b7a547c67..47d92e686 100644 --- a/src/Mobs/Enderman.h +++ b/src/Mobs/Enderman.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cEnderman) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsScreaming(void) const {return m_bIsScreaming; } BLOCKTYPE GetCarriedBlock(void) const {return CarriedBlock; } diff --git a/src/Mobs/Ghast.h b/src/Mobs/Ghast.h index a7579e9aa..26f8845a9 100644 --- a/src/Mobs/Ghast.h +++ b/src/Mobs/Ghast.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cGhast) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsCharging(void) const {return false; } } ; diff --git a/src/Mobs/Giant.h b/src/Mobs/Giant.h index bf291d647..e9bda920d 100644 --- a/src/Mobs/Giant.h +++ b/src/Mobs/Giant.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cGiant) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Horse.h b/src/Mobs/Horse.h index e1023f3f2..f34283a80 100644 --- a/src/Mobs/Horse.h +++ b/src/Mobs/Horse.h @@ -17,8 +17,8 @@ public: CLASS_PROTODEF(cHorse) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; bool IsSaddled (void) const {return m_bIsSaddled; } bool IsChested (void) const {return m_bHasChest; } diff --git a/src/Mobs/IronGolem.h b/src/Mobs/IronGolem.h index 381bfff4d..5a024cfbc 100644 --- a/src/Mobs/IronGolem.h +++ b/src/Mobs/IronGolem.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cIronGolem) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/MagmaCube.h b/src/Mobs/MagmaCube.h index 28be7e77f..d27bba4d3 100644 --- a/src/Mobs/MagmaCube.h +++ b/src/Mobs/MagmaCube.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cMagmaCube) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; int GetSize(void) const { return m_Size; } protected: diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h index bfaceece2..b410a77e0 100644 --- a/src/Mobs/Monster.h +++ b/src/Mobs/Monster.h @@ -77,7 +77,7 @@ protected: public: cMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height); ~cMonster() { delete m_AI; delete m_Attack; delete m_Environment; delete m_Movement;} - virtual void SpawnOn(cClientHandle & a_ClientHandle) /*override*/; + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; virtual void Tick(float a_Dt, cChunk & a_Chunk); @@ -101,10 +101,10 @@ public: float GetDropChanceChestplate() { return m_DropChanceChestplate; } float GetDropChanceLeggings() { return m_DropChanceLeggings; } float GetDropChanceWeapon() { return m_DropChanceWeapon; } - + eType GetMobType() const { return m_MobType; } eFamily GetMobFamily() { return mfPassive; } - + // Set Functions - Temporary void SetDropChanceBoots(float a_Chance) { m_DropChanceBoots = a_Chance; } diff --git a/src/Mobs/Mooshroom.h b/src/Mobs/Mooshroom.h index 40ba41155..6630c57ec 100644 --- a/src/Mobs/Mooshroom.h +++ b/src/Mobs/Mooshroom.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cMooshroom) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Old Mobs/AggressiveMonster.h b/src/Mobs/Old Mobs/AggressiveMonster.h index 2c6f6b253..d70ff04a3 100644 --- a/src/Mobs/Old Mobs/AggressiveMonster.h +++ b/src/Mobs/Old Mobs/AggressiveMonster.h @@ -16,10 +16,10 @@ public: cAggressiveMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height); - virtual void Tick (float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void InStateChasing(float a_Dt) /*override*/; + virtual void Tick (float a_Dt, cChunk & a_Chunk) override; + virtual void InStateChasing(float a_Dt) override; - virtual void EventSeePlayer(cEntity *) /*override*/; + virtual void EventSeePlayer(cEntity *) override; virtual void Attack(float a_Dt); protected: diff --git a/src/Mobs/Old Mobs/Blaze.h b/src/Mobs/Old Mobs/Blaze.h index 66540e2f2..f283b1070 100644 --- a/src/Mobs/Old Mobs/Blaze.h +++ b/src/Mobs/Old Mobs/Blaze.h @@ -17,6 +17,6 @@ public: CLASS_PROTODEF(cBlaze) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Attack(float a_Dt) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Attack(float a_Dt) override; } ; diff --git a/src/Mobs/Old Mobs/CaveSpider.h b/src/Mobs/Old Mobs/CaveSpider.h index 355577d22..f9ed10e1b 100644 --- a/src/Mobs/Old Mobs/CaveSpider.h +++ b/src/Mobs/Old Mobs/CaveSpider.h @@ -16,9 +16,9 @@ public: CLASS_PROTODEF(cCaveSpider) - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void Attack(float a_Dt) /*override*/; - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void Attack(float a_Dt) override; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Old Mobs/Chicken.h b/src/Mobs/Old Mobs/Chicken.h index 2a6c4fdb5..b1a50b61c 100644 --- a/src/Mobs/Old Mobs/Chicken.h +++ b/src/Mobs/Old Mobs/Chicken.h @@ -16,10 +16,10 @@ public: CLASS_PROTODEF(cChicken) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; - virtual const cItem GetFollowedItem(void) const /*override*/ { return cItem(E_ITEM_SEEDS); } + virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_SEEDS); } private: diff --git a/src/Mobs/Old Mobs/Cow.h b/src/Mobs/Old Mobs/Cow.h index 52f468982..8814b7e09 100644 --- a/src/Mobs/Old Mobs/Cow.h +++ b/src/Mobs/Old Mobs/Cow.h @@ -17,10 +17,10 @@ public: CLASS_PROTODEF(cCow) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void OnRightClicked(cPlayer & a_Player) override; - virtual const cItem GetFollowedItem(void) const /*override*/ { return cItem(E_ITEM_WHEAT); } + virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_WHEAT); } } ; diff --git a/src/Mobs/Old Mobs/Creeper.cpp b/src/Mobs/Old Mobs/Creeper.cpp index 399710723..02718edf8 100644 --- a/src/Mobs/Old Mobs/Creeper.cpp +++ b/src/Mobs/Old Mobs/Creeper.cpp @@ -76,7 +76,7 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer) { } - virtual bool Item(cEntity * a_Entity) /*override*/ + virtual bool Item(cEntity * a_Entity) override { if (a_Entity->IsMob() && ((cMonster *)a_Entity)->GetMobType() == mtSkeleton) { diff --git a/src/Mobs/Old Mobs/Creeper.h b/src/Mobs/Old Mobs/Creeper.h index fcf0d40df..747daca09 100644 --- a/src/Mobs/Old Mobs/Creeper.h +++ b/src/Mobs/Old Mobs/Creeper.h @@ -17,11 +17,11 @@ public: CLASS_PROTODEF(cCreeper) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; - virtual void Attack(float a_Dt) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; + virtual void Attack(float a_Dt) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void OnRightClicked(cPlayer & a_Player) override; bool IsBlowing(void) const {return m_bIsBlowing; } bool IsCharged(void) const {return m_bIsCharged; } diff --git a/src/Mobs/Old Mobs/EnderDragon.h b/src/Mobs/Old Mobs/EnderDragon.h index b26456868..1d4cd657c 100644 --- a/src/Mobs/Old Mobs/EnderDragon.h +++ b/src/Mobs/Old Mobs/EnderDragon.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cEnderDragon) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Old Mobs/Enderman.cpp b/src/Mobs/Old Mobs/Enderman.cpp index 29f8d434c..51255beb3 100644 --- a/src/Mobs/Old Mobs/Enderman.cpp +++ b/src/Mobs/Old Mobs/Enderman.cpp @@ -21,7 +21,7 @@ public: { } - virtual bool Item(cPlayer * a_Player) /*override*/ + virtual bool Item(cPlayer * a_Player) override { // Don't check players who are in creative gamemode if (a_Player->IsGameModeCreative()) diff --git a/src/Mobs/Old Mobs/Enderman.h b/src/Mobs/Old Mobs/Enderman.h index 5e61f9ac0..4583746e7 100644 --- a/src/Mobs/Old Mobs/Enderman.h +++ b/src/Mobs/Old Mobs/Enderman.h @@ -17,10 +17,10 @@ public: CLASS_PROTODEF(cEnderman) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void CheckEventSeePlayer(void) /*override*/; - virtual void CheckEventLostPlayer(void) /*override*/; - virtual void EventLosePlayer(void) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void CheckEventSeePlayer(void) override; + virtual void CheckEventLostPlayer(void) override; + virtual void EventLosePlayer(void) override; bool IsScreaming(void) const {return m_bIsScreaming; } BLOCKTYPE GetCarriedBlock(void) const {return CarriedBlock; } diff --git a/src/Mobs/Old Mobs/Ghast.h b/src/Mobs/Old Mobs/Ghast.h index 86e9ad9ba..1d4e6b94a 100644 --- a/src/Mobs/Old Mobs/Ghast.h +++ b/src/Mobs/Old Mobs/Ghast.h @@ -17,8 +17,8 @@ public: CLASS_PROTODEF(cGhast) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Attack(float a_Dt) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Attack(float a_Dt) override; bool IsCharging(void) const {return false; } } ; diff --git a/src/Mobs/Old Mobs/Giant.h b/src/Mobs/Old Mobs/Giant.h index ee2d4f795..7c04c9b4f 100644 --- a/src/Mobs/Old Mobs/Giant.h +++ b/src/Mobs/Old Mobs/Giant.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cGiant) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Old Mobs/Horse.h b/src/Mobs/Old Mobs/Horse.h index 935e7c614..47189b3b0 100644 --- a/src/Mobs/Old Mobs/Horse.h +++ b/src/Mobs/Old Mobs/Horse.h @@ -17,9 +17,9 @@ public: CLASS_PROTODEF(cHorse) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void OnRightClicked(cPlayer & a_Player) override; bool IsSaddled (void) const {return m_bIsSaddled; } bool IsChested (void) const {return m_bHasChest; } diff --git a/src/Mobs/Old Mobs/IronGolem.h b/src/Mobs/Old Mobs/IronGolem.h index c526e1ba9..c5341ed76 100644 --- a/src/Mobs/Old Mobs/IronGolem.h +++ b/src/Mobs/Old Mobs/IronGolem.h @@ -17,11 +17,11 @@ public: CLASS_PROTODEF(cIronGolem) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; // Iron golems do not drown nor float - virtual void HandleAir(void) /*override*/ {} - virtual void SetSwimState(cChunk & a_Chunk) /*override*/ {} + virtual void HandleAir(void) override {} + virtual void SetSwimState(cChunk & a_Chunk) override {} } ; diff --git a/src/Mobs/Old Mobs/MagmaCube.h b/src/Mobs/Old Mobs/MagmaCube.h index 695f72ed2..bfe63fa2e 100644 --- a/src/Mobs/Old Mobs/MagmaCube.h +++ b/src/Mobs/Old Mobs/MagmaCube.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cMagmaCube) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; int GetSize(void) const { return m_Size; } protected: diff --git a/src/Mobs/Old Mobs/Monster.h b/src/Mobs/Old Mobs/Monster.h index f0ecc7a93..cdbd26c09 100644 --- a/src/Mobs/Old Mobs/Monster.h +++ b/src/Mobs/Old Mobs/Monster.h @@ -84,13 +84,13 @@ public: CLASS_PROTODEF(cMonster) - virtual void SpawnOn(cClientHandle & a_ClientHandle) /*override*/; + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; - virtual void KilledBy(TakeDamageInfo & a_TDI) /*override*/; + virtual void KilledBy(TakeDamageInfo & a_TDI) override; virtual void MoveToPosition(const Vector3d & a_Position); // tolua_export virtual bool ReachedDestination(void); diff --git a/src/Mobs/Old Mobs/Mooshroom.h b/src/Mobs/Old Mobs/Mooshroom.h index 55b6ff0d9..fb002c2bf 100644 --- a/src/Mobs/Old Mobs/Mooshroom.h +++ b/src/Mobs/Old Mobs/Mooshroom.h @@ -17,10 +17,10 @@ public: CLASS_PROTODEF(cMooshroom) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void OnRightClicked(cPlayer & a_Player) override; - virtual const cItem GetFollowedItem(void) const /*override*/ { return cItem(E_ITEM_WHEAT); } + virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_WHEAT); } } ; diff --git a/src/Mobs/Old Mobs/PassiveAggressiveMonster.h b/src/Mobs/Old Mobs/PassiveAggressiveMonster.h index 0fa5af34f..a0da50e8e 100644 --- a/src/Mobs/Old Mobs/PassiveAggressiveMonster.h +++ b/src/Mobs/Old Mobs/PassiveAggressiveMonster.h @@ -15,7 +15,7 @@ class cPassiveAggressiveMonster : public: cPassiveAggressiveMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height); - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; } ; diff --git a/src/Mobs/Old Mobs/PassiveMonster.h b/src/Mobs/Old Mobs/PassiveMonster.h index 70033fe09..70574585a 100644 --- a/src/Mobs/Old Mobs/PassiveMonster.h +++ b/src/Mobs/Old Mobs/PassiveMonster.h @@ -15,10 +15,10 @@ class cPassiveMonster : public: cPassiveMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height); - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; /// When hit by someone, run away - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; /** Returns the item that the animal of this class follows when a player holds it in hand Return an empty item not to follow (default). */ virtual const cItem GetFollowedItem(void) const { return cItem(); } diff --git a/src/Mobs/Old Mobs/Pig.h b/src/Mobs/Old Mobs/Pig.h index abd2d2299..534a0ca6f 100644 --- a/src/Mobs/Old Mobs/Pig.h +++ b/src/Mobs/Old Mobs/Pig.h @@ -17,11 +17,11 @@ public: CLASS_PROTODEF(cPig) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void OnRightClicked(cPlayer & a_Player) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; - virtual const cItem GetFollowedItem(void) const /*override*/ { return cItem(E_ITEM_CARROT); } + virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_CARROT); } bool IsSaddled(void) const { return m_bIsSaddled; } diff --git a/src/Mobs/Old Mobs/Sheep.h b/src/Mobs/Old Mobs/Sheep.h index b19fca244..28e1c7254 100644 --- a/src/Mobs/Old Mobs/Sheep.h +++ b/src/Mobs/Old Mobs/Sheep.h @@ -22,11 +22,11 @@ public: CLASS_PROTODEF(cSheep) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void OnRightClicked(cPlayer & a_Player) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; - virtual const cItem GetFollowedItem(void) const /*override*/ { return cItem(E_ITEM_WHEAT); } + virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_WHEAT); } /** Generates a random color for the sheep like the vanilla server. The percent's where used are from the wiki: http://minecraft.gamepedia.com/Sheep#Breeding */ diff --git a/src/Mobs/Old Mobs/Skeleton.h b/src/Mobs/Old Mobs/Skeleton.h index 2206a5203..577588b32 100644 --- a/src/Mobs/Old Mobs/Skeleton.h +++ b/src/Mobs/Old Mobs/Skeleton.h @@ -17,12 +17,12 @@ public: CLASS_PROTODEF(cSkeleton) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void MoveToPosition(const Vector3d & a_Position) /*override*/; - virtual void Attack(float a_Dt) /*override*/; - virtual void SpawnOn(cClientHandle & a_ClientHandle) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void MoveToPosition(const Vector3d & a_Position) override; + virtual void Attack(float a_Dt) override; + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; - virtual bool IsUndead(void) /*override*/ { return true; } + virtual bool IsUndead(void) override { return true; } bool IsWither(void) const { return m_bIsWither; } diff --git a/src/Mobs/Old Mobs/Slime.h b/src/Mobs/Old Mobs/Slime.h index 433660c22..f0b800f94 100644 --- a/src/Mobs/Old Mobs/Slime.h +++ b/src/Mobs/Old Mobs/Slime.h @@ -18,10 +18,10 @@ public: CLASS_PROTODEF(cSlime) - // cAggressiveMonster /*override*/s: - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void Attack(float a_Dt) /*override*/; - virtual void KilledBy(TakeDamageInfo & a_TDI) /*override*/; + // cAggressiveMonster overrides: + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void Attack(float a_Dt) override; + virtual void KilledBy(TakeDamageInfo & a_TDI) override; int GetSize(void) const { return m_Size; } diff --git a/src/Mobs/Old Mobs/SnowGolem.h b/src/Mobs/Old Mobs/SnowGolem.h index 9ab665bc7..aba89e52d 100644 --- a/src/Mobs/Old Mobs/SnowGolem.h +++ b/src/Mobs/Old Mobs/SnowGolem.h @@ -17,8 +17,8 @@ public: CLASS_PROTODEF(cSnowGolem) - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Old Mobs/Spider.h b/src/Mobs/Old Mobs/Spider.h index 2cf3ac0e3..813d2e266 100644 --- a/src/Mobs/Old Mobs/Spider.h +++ b/src/Mobs/Old Mobs/Spider.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cSpider) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Old Mobs/Squid.h b/src/Mobs/Old Mobs/Squid.h index 884a80de3..b57340427 100644 --- a/src/Mobs/Old Mobs/Squid.h +++ b/src/Mobs/Old Mobs/Squid.h @@ -15,15 +15,15 @@ class cSquid : public: cSquid(); - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; CLASS_PROTODEF(cSquid) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; // Squids do not drown (or float) - virtual void HandleAir(void) /*override*/ {} - virtual void SetSwimState(cChunk & a_Chunk) /*override*/ {} + virtual void HandleAir(void) override {} + virtual void SetSwimState(cChunk & a_Chunk) override {} } ; diff --git a/src/Mobs/Old Mobs/Villager.h b/src/Mobs/Old Mobs/Villager.h index 0ee24eb50..aa81f0790 100644 --- a/src/Mobs/Old Mobs/Villager.h +++ b/src/Mobs/Old Mobs/Villager.h @@ -29,9 +29,9 @@ public: CLASS_PROTODEF(cVillager) - // cEntity /*override*/s - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; - virtual void Tick (float a_Dt, cChunk & a_Chunk) /*override*/; + // cEntity overrides + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; + virtual void Tick (float a_Dt, cChunk & a_Chunk) override; // cVillager functions /** return true if the given blocktype are: crops, potatoes or carrots.*/ diff --git a/src/Mobs/Old Mobs/Witch.h b/src/Mobs/Old Mobs/Witch.h index 18a99d053..bd059f61d 100644 --- a/src/Mobs/Old Mobs/Witch.h +++ b/src/Mobs/Old Mobs/Witch.h @@ -18,7 +18,7 @@ public: CLASS_PROTODEF(cWitch) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsAngry(void) const {return ((m_EMState == ATTACKING) || (m_EMState == CHASING)); } } ; diff --git a/src/Mobs/Old Mobs/Wither.h b/src/Mobs/Old Mobs/Wither.h index 7d307c360..2403823ed 100644 --- a/src/Mobs/Old Mobs/Wither.h +++ b/src/Mobs/Old Mobs/Wither.h @@ -24,14 +24,14 @@ public: /** Returns whether the wither is invulnerable to arrows. */ bool IsArmored(void) const; - // cEntity /*override*/s - virtual bool Initialize(cWorld & a_World) /*override*/; - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; - virtual void KilledBy(TakeDamageInfo & a_TDI) /*override*/; + // cEntity overrides + virtual bool Initialize(cWorld & a_World) override; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void KilledBy(TakeDamageInfo & a_TDI) override; - virtual bool IsUndead(void) /*override*/ { return true; } + virtual bool IsUndead(void) override { return true; } private: diff --git a/src/Mobs/Old Mobs/Wolf.cpp b/src/Mobs/Old Mobs/Wolf.cpp index 8b5f06f01..4fe1ff1d6 100644 --- a/src/Mobs/Old Mobs/Wolf.cpp +++ b/src/Mobs/Old Mobs/Wolf.cpp @@ -216,7 +216,7 @@ void cWolf::TickFollowPlayer() class cCallback : public cPlayerListCallback { - virtual bool Item(cPlayer * a_Player) /*override*/ + virtual bool Item(cPlayer * a_Player) override { OwnerPos = a_Player->GetPosition(); return false; diff --git a/src/Mobs/Old Mobs/Wolf.h b/src/Mobs/Old Mobs/Wolf.h index 0ecb9d1f4..7500854f8 100644 --- a/src/Mobs/Old Mobs/Wolf.h +++ b/src/Mobs/Old Mobs/Wolf.h @@ -18,11 +18,11 @@ public: CLASS_PROTODEF(cWolf) - virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) /*override*/; - virtual void OnRightClicked(cPlayer & a_Player) /*override*/; - virtual void Tick(float a_Dt, cChunk & a_Chunk) /*override*/; + virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; + virtual void OnRightClicked(cPlayer & a_Player) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; virtual void TickFollowPlayer(); - virtual void Attack(float a_Dt) /*override*/; + virtual void Attack(float a_Dt) override; // Get functions bool IsSitting (void) const { return m_IsSitting; } diff --git a/src/Mobs/Old Mobs/Zombie.h b/src/Mobs/Old Mobs/Zombie.h index 458945c3f..118b6e6e7 100644 --- a/src/Mobs/Old Mobs/Zombie.h +++ b/src/Mobs/Old Mobs/Zombie.h @@ -16,10 +16,10 @@ public: CLASS_PROTODEF(cZombie) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void MoveToPosition(const Vector3d & a_Position) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void MoveToPosition(const Vector3d & a_Position) override; - virtual bool IsUndead(void) /*override*/ { return true; } + virtual bool IsUndead(void) override { return true; } bool IsVillagerZombie(void) const { return m_IsVillagerZombie; } bool IsConverting (void) const { return m_IsConverting; } diff --git a/src/Mobs/Old Mobs/ZombiePigman.h b/src/Mobs/Old Mobs/ZombiePigman.h index 861d05385..bae0115eb 100644 --- a/src/Mobs/Old Mobs/ZombiePigman.h +++ b/src/Mobs/Old Mobs/ZombiePigman.h @@ -16,10 +16,10 @@ public: CLASS_PROTODEF(cZombiePigman) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; - virtual void KilledBy(TakeDamageInfo & a_TDI) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; + virtual void KilledBy(TakeDamageInfo & a_TDI) override; - virtual bool IsUndead(void) /*override*/ { return true; } + virtual bool IsUndead(void) override { return true; } } ; diff --git a/src/Mobs/Pig.h b/src/Mobs/Pig.h index 0d62b085e..480acc477 100644 --- a/src/Mobs/Pig.h +++ b/src/Mobs/Pig.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cPig) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsSaddled(void) const { return m_bIsSaddled; } diff --git a/src/Mobs/Sheep.h b/src/Mobs/Sheep.h index 4b65d2636..8bcfddab6 100644 --- a/src/Mobs/Sheep.h +++ b/src/Mobs/Sheep.h @@ -22,7 +22,7 @@ public: CLASS_PROTODEF(cSheep) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; /** Generates a random color for the sheep like the vanilla server. The percent's where used are from the wiki: http://minecraft.gamepedia.com/Sheep#Breeding */ diff --git a/src/Mobs/Skeleton.h b/src/Mobs/Skeleton.h index 1b0216ad2..683a54705 100644 --- a/src/Mobs/Skeleton.h +++ b/src/Mobs/Skeleton.h @@ -17,8 +17,8 @@ public: CLASS_PROTODEF(cSkeleton) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/;\ - virtual void SpawnOn(cClientHandle & a_ClientHandle) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;\ + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; bool IsWither(void) const { return m_bIsWither; } diff --git a/src/Mobs/Slime.h b/src/Mobs/Slime.h index 2e8266523..e093a8109 100644 --- a/src/Mobs/Slime.h +++ b/src/Mobs/Slime.h @@ -18,8 +18,8 @@ public: CLASS_PROTODEF(cSlime) - // cAggressiveMonster /*override*/s: - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + // cAggressiveMonster overrides: + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; int GetSize(void) const { return m_Size; } diff --git a/src/Mobs/SnowGolem.h b/src/Mobs/SnowGolem.h index d61c0ade5..f5665b864 100644 --- a/src/Mobs/SnowGolem.h +++ b/src/Mobs/SnowGolem.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cSnowGolem) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Spider.h b/src/Mobs/Spider.h index 1eafae764..2799bacc7 100644 --- a/src/Mobs/Spider.h +++ b/src/Mobs/Spider.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cSpider) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Squid.h b/src/Mobs/Squid.h index 30f3afe23..edae5a16c 100644 --- a/src/Mobs/Squid.h +++ b/src/Mobs/Squid.h @@ -17,7 +17,7 @@ public: CLASS_PROTODEF(cSquid) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; diff --git a/src/Mobs/Witch.h b/src/Mobs/Witch.h index 376d9b9c9..f92db79d6 100644 --- a/src/Mobs/Witch.h +++ b/src/Mobs/Witch.h @@ -18,7 +18,7 @@ public: CLASS_PROTODEF(cWitch) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsAngry(void) const {return false; } } ; diff --git a/src/Mobs/Wither.h b/src/Mobs/Wither.h index 409419efb..b0d1f4a3d 100644 --- a/src/Mobs/Wither.h +++ b/src/Mobs/Wither.h @@ -22,9 +22,9 @@ public: int GetWitherInvulnerableTicks() const { return m_WitherInvulnerableTicks; } void SetWitherInvulnerableTicks(unsigned int a_Ticks) { m_WitherInvulnerableTicks = a_Ticks; } - // cEntity /*override*/s - virtual bool Initialize(cWorld & a_World) /*override*/; - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + // cEntity overrides + virtual bool Initialize(cWorld & a_World) override; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; private: diff --git a/src/Mobs/Zombie.h b/src/Mobs/Zombie.h index 364c54a0a..e3f499c64 100644 --- a/src/Mobs/Zombie.h +++ b/src/Mobs/Zombie.h @@ -16,7 +16,7 @@ public: CLASS_PROTODEF(cZombie) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; bool IsVillagerZombie(void) const { return m_IsVillagerZombie; } bool IsConverting (void) const { return m_IsConverting; } diff --git a/src/Mobs/ZombiePigman.h b/src/Mobs/ZombiePigman.h index 39c6e23fe..0e7d77c2d 100644 --- a/src/Mobs/ZombiePigman.h +++ b/src/Mobs/ZombiePigman.h @@ -16,7 +16,7 @@ public: CLASS_PROTODEF(cZombiePigman) - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) /*override*/; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; } ; |