From 0a651b9fd83f078a73429f02603144e80a05148d Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 6 Sep 2014 18:59:17 +0200 Subject: Added Y-wise asserts to signs. This should help detect #1313's second case. --- src/BlockEntities/SignEntity.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/BlockEntities/SignEntity.cpp') diff --git a/src/BlockEntities/SignEntity.cpp b/src/BlockEntities/SignEntity.cpp index 97fed0f04..23d9ef926 100644 --- a/src/BlockEntities/SignEntity.cpp +++ b/src/BlockEntities/SignEntity.cpp @@ -15,6 +15,7 @@ cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, int a_X, int a_Y, int a_Z, cWorld * a_World) : super(a_BlockType, a_X, a_Y, a_Z, a_World) { + ASSERT((a_Y >= 0) && (a_Y < cChunkDef::Height)); } -- cgit v1.2.3 From a3f940f47c8981146feed66225c1dd8066bac0e2 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 26 Sep 2014 18:13:19 +0100 Subject: Removed more unessicary includes --- src/BlockEntities/SignEntity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/BlockEntities/SignEntity.cpp') diff --git a/src/BlockEntities/SignEntity.cpp b/src/BlockEntities/SignEntity.cpp index 23d9ef926..423d254d2 100644 --- a/src/BlockEntities/SignEntity.cpp +++ b/src/BlockEntities/SignEntity.cpp @@ -4,9 +4,9 @@ // Implements the cSignEntity class representing a single sign in the world #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules -#include "json/json.h" +#include "json/value.h" #include "SignEntity.h" -#include "../Entities/Player.h" +#include "../ClientHandle.h" -- cgit v1.2.3 From 9e4a5f824ae88e3a19de6a14db91b43c1759e29e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 30 Sep 2014 22:20:21 +0100 Subject: Removed WSSCompact --- src/BlockEntities/SignEntity.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'src/BlockEntities/SignEntity.cpp') diff --git a/src/BlockEntities/SignEntity.cpp b/src/BlockEntities/SignEntity.cpp index 423d254d2..d048d0218 100644 --- a/src/BlockEntities/SignEntity.cpp +++ b/src/BlockEntities/SignEntity.cpp @@ -22,7 +22,6 @@ cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, int a_X, int a_Y, int a_Z, cWorl -// It don't do anything when 'used' void cSignEntity::UsedBy(cPlayer * a_Player) { UNUSED(a_Player); @@ -80,37 +79,3 @@ void cSignEntity::SendTo(cClientHandle & a_Client) - -bool cSignEntity::LoadFromJson(const Json::Value & a_Value) -{ - m_PosX = a_Value.get("x", 0).asInt(); - m_PosY = a_Value.get("y", 0).asInt(); - m_PosZ = a_Value.get("z", 0).asInt(); - - m_Line[0] = a_Value.get("Line1", "").asString(); - m_Line[1] = a_Value.get("Line2", "").asString(); - m_Line[2] = a_Value.get("Line3", "").asString(); - m_Line[3] = a_Value.get("Line4", "").asString(); - - return true; -} - - - - - -void cSignEntity::SaveToJson(Json::Value & a_Value) -{ - a_Value["x"] = m_PosX; - a_Value["y"] = m_PosY; - a_Value["z"] = m_PosZ; - - a_Value["Line1"] = m_Line[0]; - a_Value["Line2"] = m_Line[1]; - a_Value["Line3"] = m_Line[2]; - a_Value["Line4"] = m_Line[3]; -} - - - - -- cgit v1.2.3