summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-16 23:22:42 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-16 23:22:42 +0200
commit4b99a5bd49f2756f927e173f9c41c48cb4cb553a (patch)
tree7e9ce8ee6bf8f6eca7f2f4aec2c3abc0dc906a5e /src/Mobs
parentMerge pull request #2360 from bibo38/waterfix (diff)
parentSpawn baby mobs (diff)
downloadcuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar
cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.gz
cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.bz2
cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.lz
cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.xz
cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.zst
cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Monster.h2
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Pig.cpp2
-rw-r--r--src/Mobs/Villager.cpp2
4 files changed, 5 insertions, 3 deletions
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 2832a1570..d5de3b19e 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -115,9 +115,11 @@ public:
virtual bool IsTame (void) const { return false; }
virtual bool IsSitting (void) const { return false; }
+ // tolua_begin
bool IsBaby (void) const { return m_Age < 0; }
char GetAge (void) const { return m_Age; }
void SetAge(char a_Age) { m_Age = a_Age; }
+ // tolua_end
// tolua_begin
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 3b2fbad57..08cabe143 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -67,7 +67,7 @@ void cMooshroom::OnRightClicked(cPlayer & a_Player)
cItems Drops;
Drops.push_back(cItem(E_BLOCK_RED_MUSHROOM, 5, 0));
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
- m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtCow);
+ m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtCow, false);
Destroy();
} break;
}
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index efa779ac2..21c8e923a 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -108,7 +108,7 @@ bool cPig::DoTakeDamage(TakeDamageInfo & a_TDI)
if (a_TDI.DamageType == dtLightning)
{
Destroy();
- m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtZombiePigman);
+ m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtZombiePigman, false);
return true;
}
return true;
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index e4953d546..9239575d0 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -41,7 +41,7 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
if (a_TDI.DamageType == dtLightning)
{
Destroy();
- m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtWitch);
+ m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtWitch, false);
return true;
}
return true;