diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-08 17:56:16 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-08 17:56:16 +0200 |
commit | 50e24fb75fec614bb195e5a322e2ceff9cdd2b1a (patch) | |
tree | 7b27adb5db66607df2beb623dbcca11490518786 | |
parent | Initial boat support (diff) | |
download | cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.tar cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.tar.gz cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.tar.bz2 cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.tar.lz cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.tar.xz cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.tar.zst cuberite-50e24fb75fec614bb195e5a322e2ceff9cdd2b1a.zip |
-rw-r--r-- | source/Entities/Boat.cpp | 6 | ||||
-rw-r--r-- | source/Entities/Boat.h | 2 | ||||
-rw-r--r-- | source/Entities/Entity.h | 2 | ||||
-rw-r--r-- | source/WorldStorage/WSSAnvil.h | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/source/Entities/Boat.cpp b/source/Entities/Boat.cpp index f29766fc1..eebd3a373 100644 --- a/source/Entities/Boat.cpp +++ b/source/Entities/Boat.cpp @@ -1,8 +1,8 @@ -// Minecart.cpp +// Boat.cpp -// Implements the cMinecart class representing a minecart in the world -// Indiana Jones! +// Implements the cBoat class representing a boat in the world +// Pirates of the Carribean! #include "Globals.h" #include "Boat.h" diff --git a/source/Entities/Boat.h b/source/Entities/Boat.h index 439b73a09..e7a67958d 100644 --- a/source/Entities/Boat.h +++ b/source/Entities/Boat.h @@ -1,7 +1,7 @@ // Boat.h -// Declares the cBoat class representing a minecart in the world +// Declares the cBoat class representing a boat in the world diff --git a/source/Entities/Entity.h b/source/Entities/Entity.h index b4777d249..156f737a3 100644 --- a/source/Entities/Entity.h +++ b/source/Entities/Entity.h @@ -92,6 +92,7 @@ public: etMonster, etFallingBlock, etMinecart, + etBoat, etTNT, etProjectile, @@ -119,6 +120,7 @@ public: bool IsPickup (void) const { return (m_EntityType == etPickup); } bool IsMob (void) const { return (m_EntityType == etMob); } bool IsMinecart(void) const { return (m_EntityType == etMinecart); } + bool IsBoat (void) const { return (m_EntityType == etBoat); } bool IsTNT (void) const { return (m_EntityType == etTNT); } /// Returns true if the entity is of the specified class or a subclass (cPawn's IsA("cEntity") returns true) diff --git a/source/WorldStorage/WSSAnvil.h b/source/WorldStorage/WSSAnvil.h index b364e18fa..9236b3582 100644 --- a/source/WorldStorage/WSSAnvil.h +++ b/source/WorldStorage/WSSAnvil.h @@ -138,7 +138,7 @@ protected: void LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_EntityTagIdx, const char * a_IDTag, int a_IDTagLength); - void LoadBoatFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIndx); + void LoadBoatFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIndx); void LoadFallingBlockFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx); void LoadMinecartRFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx); void LoadMinecartCFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx); |