* Add PigModel and PigRenderer

This commit is contained in:
iProgramInCpp
2023-12-05 20:07:20 +02:00
parent 166bcf708e
commit ca295740dd
48 changed files with 156 additions and 15 deletions

View File

@@ -1068,6 +1068,13 @@ void Entity::lavaHurt()
}
}
int Entity::queryEntityRenderer()
{
// If field_C8 is equal to RENDER_DYNAMIC, EntityRenderDispatcher
// calls here. Used for sheared sheep.
return 0;
}
int Entity::hashCode()
{
return m_EntityID;

View File

@@ -22,10 +22,20 @@ class ItemInstance;
enum eEntityRenderType
{
RENDER_NONE,
RENDER_DYNAMIC,
RENDER_TNT,
RENDER_HUMANOID,
RENDER_ITEM,
RENDER_CAMERA,
RENDER_CHICKEN,
RENDER_COW,
RENDER_PIG,
RENDER_SHEEP,
RENDER_SHEEP_FUR,
RENDER_ZOMBIE,
RENDER_SKELETON,
RENDER_SPIDER,
RENDER_CREEPER,
// custom
RENDER_FALLING_TILE = 50,
@@ -139,6 +149,7 @@ public:
virtual void markHurt();
virtual void burn(int);
virtual void lavaHurt();
virtual int queryEntityRenderer();
virtual bool isLocalPlayer();

View File

@@ -57,7 +57,7 @@ Mob::Mob(Level* pLevel) : Entity(pLevel)
field_B84 = 0;
m_pEntLookedAt = nullptr;
m_texture = "/mob/char.png";
m_texture = "/mob/pig.png";
m_class = "";
field_34 = 1;
@@ -744,6 +744,11 @@ int Mob::getMaxSpawnClusterSize()
return 4;
}
bool Mob::isBaby()
{
return false;
}
void Mob::actuallyHurt(int damage)
{
#ifdef TEST_SURVIVAL_MODE

View File

@@ -62,6 +62,7 @@ public:
virtual Vec3 getLookAngle(float f);
virtual Vec3 getViewVector(float f);
virtual int getMaxSpawnClusterSize();
virtual bool isBaby();
virtual void actuallyHurt(int damage);
virtual bool removeWhenFarAway();
virtual int getDeathLoot();

View File

@@ -22,7 +22,7 @@ Player::Player(Level* pLevel) : Mob(pLevel)
field_BC4 = 0;
m_bHaveRespawnPos = false;
field_C8 = 2;
field_C8 = RENDER_HUMANOID;
m_pInventory = new Inventory(this);