From 7401fc000dca2a3ff3ce61776f84e5c2d8eb1868 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 8 Oct 2013 22:21:55 +0100 Subject: Initial round of fixes * Fixed intentional misspelling of baby! :D * Better chested horse bool name * Fixed some weird continuity issues with my recent changes not being pushed up initially * Fixed derpy hexadecimal values --- source/Entities/Entity.h | 44 +++++++++++++++++++++++++---------------- source/Mobs/Horse.cpp | 2 +- source/Mobs/Horse.h | 6 +++--- source/Protocol/Protocol125.cpp | 8 ++++---- 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/source/Entities/Entity.h b/source/Entities/Entity.h index 764c5a64b..fdc047cf9 100644 --- a/source/Entities/Entity.h +++ b/source/Entities/Entity.h @@ -343,7 +343,7 @@ public: virtual bool IsInvisible(void) const {return false; } // Ageables + Tameables - virtual bool IsBabby (void) const {return false; } + virtual bool IsBaby (void) const {return false; } virtual bool IsSitting (void) const {return false; } virtual bool IsTame (void) const {return false; } @@ -356,46 +356,56 @@ public: virtual bool IsFueled (void) const {return false; } // Bat - virtual bool IsHanging (void) const {return false; } + virtual bool IsHanging (void) const {return false; } // Pig - virtual bool IsSaddled (void) const {return false; } + virtual bool IsSaddled (void) const {return false; } // TESTIFICATE - virtual int GetVilType(void) const {return 0; } + virtual int GetVilType (void) const {return 0; } // Zombie - virtual bool IsVillager(void) const {return false; } - virtual bool IsConvert (void) const {return false; } + virtual bool IsVillZomb (void) const {return false; } + virtual bool IsConvert (void) const {return false; } // Ghast - virtual bool IsCharging(void) const {return false; } + virtual bool IsCharging (void) const {return false; } // Arrow - virtual bool IsCritical(void) const {return false; } + virtual bool IsCritical (void) const {return false; } // Wolf - virtual bool IsAngry (void) const {return false; } - virtual bool IsBegging (void) const {return false; } - virtual int GetCollar (void) const {return 0; } + virtual bool IsAngry (void) const {return false; } + virtual bool IsBegging (void) const {return false; } + virtual int GetCollar (void) const {return 0; } // Sheep - virtual int GetFurColor(void) const {return 0; } - virtual bool IsSheared (void) const {return false; } + virtual int GetFurColor (void) const {return 0; } + virtual bool IsSheared (void) const {return false; } // Enderman virtual BLOCKTYPE CarriedBlock (void) const {return E_BLOCK_AIR; } virtual NIBBLETYPE CarriedMeta (void) const {return 0; } - virtual bool IsScream (void) const {return false; } + virtual bool IsScream (void) const {return false; } // Skeleton || Wither Skeleton - virtual bool IsWither (void) const {return false; } + virtual bool IsWither (void) const {return false; } // Witch - virtual bool IsNosey (void) const {return false; } + virtual bool IsNosey (void) const {return false; } // Slimes and Magma cubes - virtual int GetSize (void) const {return 1; } + virtual int GetSize (void) const {return 1; } + + // Horsheys + virtual bool IsChested (void) const {return false; } + virtual bool IsEating (void) const {return false; } + virtual bool IsRearing (void) const {return false; } + virtual bool IsMthOpen (void) const {return false; } + virtual int GetHType (void) const {return 0; } + virtual int GetHColor (void) const {return 0; } + virtual int GetHStyle (void) const {return 0; } + virtual int GetHArmour (void) const {return 0; } // tolua_end diff --git a/source/Mobs/Horse.cpp b/source/Mobs/Horse.cpp index 50eab33cc..ec6154d26 100644 --- a/source/Mobs/Horse.cpp +++ b/source/Mobs/Horse.cpp @@ -11,7 +11,7 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : super("Horse", 100, "mob.horse.hit", "mob.horse.death", 1.4, 1.6), - m_bIsChested(false), + m_bHasChest(false), m_bIsEating(false), m_bIsRearing(false), m_bIsMouthOpen(false), diff --git a/source/Mobs/Horse.h b/source/Mobs/Horse.h index d950ff1bf..bca2e5327 100644 --- a/source/Mobs/Horse.h +++ b/source/Mobs/Horse.h @@ -1,7 +1,7 @@ #pragma once -#include "AggressiveMonster.h" +#include "PassiveMonster.h" @@ -20,7 +20,7 @@ public: 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 IsChested (void) const {return m_bIsChested; } + bool IsChested (void) const {return m_bHasChest; } bool IsEating (void) const {return m_bIsEating; } bool IsRearing (void) const {return m_bIsRearing; } bool IsMthOpen (void) const {return m_bIsMouthOpen; } @@ -32,7 +32,7 @@ public: private: - bool m_bIsChested, m_bIsEating, m_bIsRearing, m_bIsMouthOpen, m_bIsTame; + bool m_bHasChest, m_bIsEating, m_bIsRearing, m_bIsMouthOpen, m_bIsTame; int m_Type, m_Color, m_Style, m_Armour, m_TimesToTame, m_TameAttemptTimes; } ; diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 89b2c15ec..e2309c295 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -1638,11 +1638,11 @@ void cProtocol125::WriteMetadata(const cEntity & a_Entity) } if (a_Entity.IsRclking()) { - CommonMetadata |= 0x16; + CommonMetadata |= 0x10; } if (a_Entity.IsInvisible()) { - CommonMetadata |= 0x32; + CommonMetadata |= 0x20; } WriteByte(0x0); @@ -1691,7 +1691,7 @@ void cProtocol125::WriteMetadata(const cEntity & a_Entity) else if (a_Entity.IsA("cZombie")) { WriteByte(0xC); - WriteByte(a_Entity.IsBabby() ? 1 : 0); // Babby zombie? + WriteByte(a_Entity.IsBaby() ? 1 : 0); // Babby zombie? WriteByte(0xD); WriteByte(a_Entity.IsVillZomb() ? 1 : 0); // Converted zombie? WriteByte(0xE); @@ -1784,7 +1784,7 @@ void cProtocol125::WriteMetadata(const cEntity & a_Entity) { Flags |= 0x8; } - if (a_Entity.IsBabby()) + if (a_Entity.IsBaby()) { Flags |= 0x10; // IsBred flag, according to wiki.vg - don't think it does anything in multiplayer } -- cgit v1.2.3