diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ClientHandle.cpp | 9 | ||||
-rw-r--r-- | src/CraftingRecipes.cpp | 4 | ||||
-rw-r--r-- | src/HTTPServer/HTTPConnection.cpp | 4 | ||||
-rw-r--r-- | src/HTTPServer/HTTPConnection.h | 3 | ||||
-rw-r--r-- | src/Mobs/IronGolem.cpp | 2 |
5 files changed, 16 insertions, 6 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 29ed55bd6..60a2f8873 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1341,7 +1341,14 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e { AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); World->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player); - World->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player); // 2 block high things + if (a_BlockY < cChunkDef::Height - 1) + { + World->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player); // 2 block high things + } + if (a_BlockY > 1) + { + World->SendBlockTo(a_BlockX, a_BlockY - 1, a_BlockZ, m_Player); // 2 block high things + } m_Player->GetInventory().SendEquippedSlot(); } } diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index cf8982afb..472044fa3 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -673,10 +673,10 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti if ( (itrS->x >= a_GridWidth) || (itrS->y >= a_GridHeight) || - (Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type? + (Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type? (Item.m_ItemCount > a_CraftingGrid[GridID].m_ItemCount) || // not enough items ( - (Item.m_ItemDamage > 0) && // should compare damage values? + (Item.m_ItemDamage >= 0) && // should compare damage values? (Item.m_ItemDamage != a_CraftingGrid[GridID].m_ItemDamage) ) ) diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPConnection.cpp index de12b36ce..a5c6afd18 100644 --- a/src/HTTPServer/HTTPConnection.cpp +++ b/src/HTTPServer/HTTPConnection.cpp @@ -38,7 +38,9 @@ cHTTPConnection::~cHTTPConnection() void cHTTPConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Response) { - SendData(Printf("%d %s\r\nContent-Length: 0\r\n\r\n", a_StatusCode, a_Response.c_str())); + SendData(Printf("HTTP/1.1 %d %s\r\n", a_StatusCode, a_Response.c_str())); + SendData(Printf("Content-Length: %u\r\n\r\n", static_cast<unsigned>(a_Response.size()))); + SendData(a_Response.data(), a_Response.size()); m_State = wcsRecvHeaders; } diff --git a/src/HTTPServer/HTTPConnection.h b/src/HTTPServer/HTTPConnection.h index 8ecc4a4d4..e1ebeb9ee 100644 --- a/src/HTTPServer/HTTPConnection.h +++ b/src/HTTPServer/HTTPConnection.h @@ -41,7 +41,8 @@ public: cHTTPConnection(cHTTPServer & a_HTTPServer); virtual ~cHTTPConnection(); - /** Sends HTTP status code together with a_Reason (used for HTTP errors) */ + /** Sends HTTP status code together with a_Reason (used for HTTP errors). + Sends the a_Reason as the body as well, so that browsers display it. */ void SendStatusAndReason(int a_StatusCode, const AString & a_Reason); /** Sends the "401 unauthorized" reply together with instructions on authorizing, using the specified realm */ diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp index dae4615e4..b0e76daca 100644 --- a/src/Mobs/IronGolem.cpp +++ b/src/Mobs/IronGolem.cpp @@ -8,7 +8,7 @@ cIronGolem::cIronGolem(void) : - super("IronGolem", mtIronGolem, "mob.IronGolem.hit", "mob.IronGolem.death", 1.4, 2.9) + super("IronGolem", mtIronGolem, "mob.irongolem.hit", "mob.irongolem.death", 1.4, 2.9) { } |