summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Wolf.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-11-10 21:24:36 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-11-10 21:24:36 +0100
commit2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80 (patch)
treef6d7d930000ea7a719590b07074958937cd71b36 /source/Mobs/Wolf.cpp
parentUsing DoWithPlayer instead of FindAndDoWithPlayer for callbacks. (diff)
downloadcuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.tar
cuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.tar.gz
cuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.tar.bz2
cuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.tar.lz
cuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.tar.xz
cuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.tar.zst
cuberite-2ccf9b2b32cbc2b9df7bd89b5dd4077c7bc20b80.zip
Diffstat (limited to 'source/Mobs/Wolf.cpp')
-rw-r--r--source/Mobs/Wolf.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/Mobs/Wolf.cpp b/source/Mobs/Wolf.cpp
index 9880a3442..ac094e870 100644
--- a/source/Mobs/Wolf.cpp
+++ b/source/Mobs/Wolf.cpp
@@ -12,12 +12,12 @@
cWolf::cWolf(void) :
super("Wolf", mtWolf, "mob.wolf.hurt", "mob.wolf.death", 0.6, 0.8),
- m_bIsAngry(false),
- m_bIsTame(false),
- m_bIsSitting(false),
- m_bIsBegging(false),
- m_bOwner(""),
- m_bCollar(14)
+ m_IsAngry(false),
+ m_IsTame(false),
+ m_IsSitting(false),
+ m_IsBegging(false),
+ m_Owner(""),
+ m_Collar(14)
{
}
@@ -28,9 +28,9 @@ cWolf::cWolf(void) :
void cWolf::DoTakeDamage(TakeDamageInfo & a_TDI)
{
super::DoTakeDamage(a_TDI);
- if (!m_bIsTame)
+ if (!m_IsTame)
{
- m_bIsAngry = true;
+ m_IsAngry = true;
}
m_World->BroadcastEntityMetadata(*this); // Broadcast health and possibly angry face
}
@@ -65,11 +65,11 @@ void cWolf::OnRightClicked(cPlayer & a_Player)
}
else if (IsTame())
{
- if (a_Player.GetName() == m_bOwner) // Is the player the owner of the dog?
+ if (a_Player.GetName() == m_Owner) // Is the player the owner of the dog?
{
if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_DYE)
{
- m_bCollar = 15 - a_Player.GetEquippedItem().m_ItemDamage;
+ m_Collar = 15 - a_Player.GetEquippedItem().m_ItemDamage;
if (!a_Player.IsGameModeCreative())
{
a_Player.GetInventory().RemoveOneEquippedItem();
@@ -153,12 +153,12 @@ void cWolf::Tick(float a_Dt, cChunk & a_Chunk)
Vector3f OwnerCoords;
} ;
cCallback Callback;
- m_World->DoWithPlayer(m_bOwner, Callback);
+ m_World->DoWithPlayer(m_Owner, Callback);
Vector3f OwnerCoords = Callback.OwnerCoords;
if (IsTame())
{
- if (m_bOwner != "")
+ if (m_Owner != "")
{
double Distance = (OwnerCoords - GetPosition()).Length();
if (Distance < 3)