1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00
Toney Sui dca5d86e7a
Fix bug: LandMine is not exploding to enemies. (#630)
* The reason is,

the mine has attribute hidden=true;
when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true;
then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred.

Resolution:
1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true;
2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true".
2020-02-12 20:12:12 +03:00
..
2019-03-31 09:43:14 +03:00
2019-01-19 13:52:02 +03:00
2020-01-31 00:48:01 +02:00
2019-03-31 09:43:14 +03:00
2020-01-25 01:21:26 -08:00
2019-02-12 19:47:19 +01:00
2019-01-19 13:52:02 +03:00
2019-01-19 13:52:02 +03:00
2019-03-28 16:56:51 +03:00
2019-03-31 09:43:14 +03:00
2019-01-19 13:52:02 +03:00
2020-01-19 04:12:59 +00:00
2020-01-19 04:12:59 +00:00
2019-01-19 13:52:02 +03:00
2019-01-19 13:52:02 +03:00
2018-02-18 19:27:24 +13:00
2019-01-17 10:50:56 +03:00
2018-07-26 12:14:29 +02:00
2018-07-26 12:14:29 +02:00
2019-01-19 13:52:02 +03:00