This is workaround for windows style path confusing scons if they appear
in CPPATH etc. Paths without prefix still happen to be valid and they
start with "/", not "c:".
(cherry-picked from commit b347bc70b163a572751b7ac72f23e472c3ac9238)
the error could happen a soon as you advance to the next scenario if you reload a campaign save from another player.
(cherry-picked from commit 575e104ca58066315b2540cda1a6ae241937e885)
I had only added it originally in case someone didn't know the symbols offhand,
but sevu is right that they can get a bit annoying.
(cherry-picked from commit 3d8d38983d1c5a6bfe542ee756b6ce3ac3471bd3)
Added the elemental trait to the Jinn. Added the undead_variation key to the Jinn, Wyvern Rider, and Wild Wyvern.
(cherry-picked from commit d913aafc534ccaeb239cc910bd963893e313fdcf)
Also removed the two implementation function overloads that did not take a textdomain.
(cherry-picked from commit aad64d72cf27123a45655fd23eacebec37fe4ab6)
Didn't use this in the window widget since that doesn't specify front_child as
the queue position. I need to evaluate whether draw callbacks need to be in that
position anyway. AFAIR I only started adding them there since I noticed the one
in the debug clock dialog used that.
(cherry-picked from commit 569d86277a0ee90385e7303dea80fd2d0da367d5)
This was a problem as of 52db950e94a5e09bdfb3ccc7056db3da90d70483 since the loading
screen could access the image cache while the worker thread cleared it.
(cherry-picked from commit 6d0b7c84243aba8444f5e722cd855feed3501f12)
One_strike_fight() assumed that if HP distribution hadn't been calculated,
the unit is alive. It would normally be a valid assumption, but the Wesnoth
engine allows units with negative HP (although things aren't guaranteed to
work correctly in the presence of such units).
The assumption, together with a completely wrong calculation for the
probability that the opponent will counterattack, resulted in badly
incorrect results. That, in turn, caused the calculated probability that
the opponent to kill us to become negative (I observed -75 % when
debugging), making the calculated probability to be poisoned/slowed to
exceed 100 %, and that finally caused an assert if the AI simulated another
fight for the same unit.
I have now fixed those issues. I also noticed that rounding error allowed
the probability to be killed to still become slightly negative, and thus
changed std::min() to utils::clamp() to limit the value to the allowed
range.
(cherry-picked from commit 472b0cbbfbcdde4e32f26a1cb5afaa5ffd6c7a88)
This reverts commit ef60deaa2b0d14006a6747c61fdd4fd33562b6f0.
@ln-zookeeper pointed out that units with negative HP are documented in
the wiki, and thus disallowing them is an API
change.
(cherry-picked from commit 0200487aad71816b843a8c542b3b0c394c5c87d8)
Accidentally removed the third parameter for `increase_movement` instead of `increase_accuracy`. Whoops!
(cherry-picked from commit d03829dfd097848efaa8a6be3359b481524ebf97)