diff --git a/README.md b/README.md index a58a3c3cc..2b3600e08 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You can clone repoistory and use github action build-on-request workload. ### Windows -You need visual studio 2019 and vcpkg with commit `3b3bd424827a1f7f4813216f6b32b6c61e386b2e` ([download](https://github.com/microsoft/vcpkg/archive/3b3bd424827a1f7f4813216f6b32b6c61e386b2e.zip)). +You need visual studio 2022 and vcpkg with commit `3b3bd424827a1f7f4813216f6b32b6c61e386b2e` ([download](https://github.com/microsoft/vcpkg/archive/3b3bd424827a1f7f4813216f6b32b6c61e386b2e.zip)). Then you install vcpkg dependencies: ```bash diff --git a/src/client/container.cpp b/src/client/container.cpp index 69155a182..82b020381 100644 --- a/src/client/container.cpp +++ b/src/client/container.cpp @@ -68,7 +68,7 @@ void Container::onAddItem(const ItemPtr& item, int slot) if(slot == 0) m_items.push_front(item); - else + else if (slot > 0 && m_items.size() <= m_capacity - 1) m_items.push_back(item); updateItemsPositions(); diff --git a/src/client/outfit.cpp b/src/client/outfit.cpp index 72f63f55e..2f085e333 100644 --- a/src/client/outfit.cpp +++ b/src/client/outfit.cpp @@ -153,7 +153,21 @@ void Outfit::draw(Point dest, Otc::Direction direction, uint walkAnimationPhase, } dest -= mountType->getDisplacement() * g_sprites.getOffsetFactor(); - mountType->draw(dest, 0, direction, 0, 0, mountAnimationPhase, Color::white, lightView); + if (type->hasBones() && mountType->hasBones()) { + auto mountDest = dest; + auto outfitBones = type->getBones(direction); + auto outfitWidth = type->getWidth(); + auto mountWidth = mountType->getWidth(); + int bonusOffset = std::abs(mountWidth - outfitWidth) * 32; + auto mountBones = mountType->getBones(direction); + auto boneOffset = Point((outfitBones.x - mountBones.x) + bonusOffset, (outfitBones.y - mountBones.y) + bonusOffset); + + mountDest = dest + boneOffset * g_sprites.getOffsetFactor(); + mountType->draw(mountDest, 0, direction, 0, 0, mountAnimationPhase, Color::white, lightView); + } + else { + mountType->draw(dest, 0, direction, 0, 0, mountAnimationPhase, Color::white, lightView); + } dest += type->getDisplacement() * g_sprites.getOffsetFactor(); } }; diff --git a/src/framework/graphics/drawqueue.cpp b/src/framework/graphics/drawqueue.cpp index 0198753ae..e2a842912 100644 --- a/src/framework/graphics/drawqueue.cpp +++ b/src/framework/graphics/drawqueue.cpp @@ -253,6 +253,7 @@ void DrawQueue::correctOutfit(const Rect& dest, int fromPos, bool oldScaling) if (texture->m_doCenter) { centerX = std::max(centerX, texture->m_dest.center().x); + centerY = std::max(centerY, texture->m_dest.center().y); } } else if (DrawQueueItemTexturedRect* texture = dynamic_cast(m_queue[i])) { diff --git a/src/framework/net/connection.cpp b/src/framework/net/connection.cpp index 7849c1a28..0d257929a 100644 --- a/src/framework/net/connection.cpp +++ b/src/framework/net/connection.cpp @@ -162,7 +162,7 @@ void Connection::read(uint32 bytes, const RecvCallback& callback) m_recvCallback = callback; asio::async_read(m_socket, - asio::buffer(m_inputStream.prepare(bytes)), + asio::mutable_buffer(m_inputStream.prepare(bytes)), std::bind(&Connection::onRecv, asConnection(), std::placeholders::_1, std::placeholders::_2)); m_readTimer.cancel(); @@ -194,7 +194,7 @@ void Connection::read_some(const RecvCallback& callback) m_recvCallback = callback; - m_socket.async_read_some(asio::buffer(m_inputStream.prepare(RECV_BUFFER_SIZE)), + m_socket.async_read_some(asio::mutable_buffer(m_inputStream.prepare(RECV_BUFFER_SIZE)), std::bind(&Connection::onRecv, asConnection(), std::placeholders::_1, std::placeholders::_2)); m_readTimer.cancel(); diff --git a/vc16/otclient.vcxproj b/vc16/otclient.vcxproj index 270a1ad40..0cdc098e3 100644 --- a/vc16/otclient.vcxproj +++ b/vc16/otclient.vcxproj @@ -31,7 +31,7 @@ Application false - v142 + v143 false PGOptimize MultiByte @@ -39,7 +39,7 @@ Application false - v142 + v143 false PGOptimize MultiByte @@ -47,7 +47,7 @@ StaticLibrary false - v142 + v143 false false MultiByte @@ -55,7 +55,7 @@ Application false - v142 + v143 false false MultiByte