mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-08 22:26:51 +02:00
Merge pull request #5413 from IvanSavenko/bugfixing
[1.6.6] Minor fixes
This commit is contained in:
@@ -890,7 +890,7 @@ BattleResultResources BattleResultWindow::getResources(const BattleResult & br)
|
||||
if (ourHero)
|
||||
{
|
||||
resources.resultText.appendTextID("core.genrltxt.305");
|
||||
resources.resultText.replaceTextID(ourHero->getNameTranslated());
|
||||
resources.resultText.replaceTextID(ourHero->getNameTextID());
|
||||
resources.resultText.replaceNumber(br.exp[weAreAttacker ? BattleSide::ATTACKER : BattleSide::DEFENDER]);
|
||||
}
|
||||
}
|
||||
|
@@ -200,9 +200,16 @@ CreatureAnimation::CreatureAnimation(const AnimationPath & name_, TSpeedControll
|
||||
speedController(controller),
|
||||
once(false)
|
||||
{
|
||||
|
||||
forward = GH.renderHandler().loadAnimation(name_, EImageBlitMode::WITH_SHADOW_AND_SELECTION);
|
||||
reverse = GH.renderHandler().loadAnimation(name_, EImageBlitMode::WITH_SHADOW_AND_SELECTION);
|
||||
|
||||
if (forward->size(size_t(ECreatureAnimType::DEATH)) == 0)
|
||||
throw std::runtime_error("Animation '" + name_.getOriginalName() + "' has empty death animation!");
|
||||
|
||||
if (forward->size(size_t(ECreatureAnimType::HOLDING)) == 0)
|
||||
throw std::runtime_error("Animation '" + name_.getOriginalName() + "' has empty holding animation!");
|
||||
|
||||
// if necessary, add one frame into vcmi-only group DEAD
|
||||
if(forward->size(size_t(ECreatureAnimType::DEAD)) == 0)
|
||||
{
|
||||
|
@@ -211,7 +211,7 @@ AssetGenerator::CanvasPtr AssetGenerator::createCampaignBackground()
|
||||
auto locator = ImageLocator(ImagePath::builtin("CAMPBACK"), EImageBlitMode::OPAQUE);
|
||||
|
||||
std::shared_ptr<IImage> img = GH.renderHandler().loadImage(locator);
|
||||
auto image = GH.renderHandler().createImage(Point(200, 116), CanvasScalingPolicy::IGNORE);
|
||||
auto image = GH.renderHandler().createImage(Point(800, 600), CanvasScalingPolicy::IGNORE);
|
||||
Canvas canvas = image->getCanvas();
|
||||
|
||||
canvas.draw(img, Point(0, 0), Rect(0, 0, 800, 600));
|
||||
@@ -251,7 +251,7 @@ AssetGenerator::CanvasPtr AssetGenerator::createChroniclesCampaignImages(int chr
|
||||
auto locator = ImageLocator(imgPathBg, EImageBlitMode::OPAQUE);
|
||||
|
||||
std::shared_ptr<IImage> img = GH.renderHandler().loadImage(locator);
|
||||
auto image = GH.renderHandler().createImage(Point(800, 600), CanvasScalingPolicy::IGNORE);
|
||||
auto image = GH.renderHandler().createImage(Point(200, 116), CanvasScalingPolicy::IGNORE);
|
||||
Canvas canvas = image->getCanvas();
|
||||
|
||||
std::array sourceRect = {
|
||||
|
@@ -82,6 +82,7 @@
|
||||
|
||||
"DARKNESS":
|
||||
{
|
||||
"hidden": true
|
||||
},
|
||||
|
||||
"DEATH_STARE":
|
||||
|
@@ -216,7 +216,7 @@ InternalConnection::InternalConnection(INetworkConnectionListener & listener, co
|
||||
|
||||
void InternalConnection::receivePacket(const std::vector<std::byte> & message)
|
||||
{
|
||||
io->post([self = std::static_pointer_cast<InternalConnection>(shared_from_this()), message](){
|
||||
boost::asio::post(*io, [self = std::static_pointer_cast<InternalConnection>(shared_from_this()), message](){
|
||||
if (self->connectionActive)
|
||||
self->listener.onPacketReceived(self, message);
|
||||
});
|
||||
@@ -224,7 +224,7 @@ void InternalConnection::receivePacket(const std::vector<std::byte> & message)
|
||||
|
||||
void InternalConnection::disconnect()
|
||||
{
|
||||
io->post([self = std::static_pointer_cast<InternalConnection>(shared_from_this())](){
|
||||
boost::asio::post(*io, [self = std::static_pointer_cast<InternalConnection>(shared_from_this())](){
|
||||
self->listener.onDisconnected(self, "Internal connection has been terminated");
|
||||
self->otherSideWeak.reset();
|
||||
self->connectionActive = false;
|
||||
|
@@ -79,7 +79,7 @@ void NetworkHandler::createInternalConnection(INetworkClientListener & listener,
|
||||
|
||||
server.receiveInternalConnection(localConnection);
|
||||
|
||||
io->post([&listener, localConnection](){
|
||||
boost::asio::post(*io, [&listener, localConnection](){
|
||||
listener.onConnectionEstablished(localConnection);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user