1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
vcmi/server
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
..
CGameHandler.cpp Fix bug: LandMine is not exploding to enemies. (#630) 2020-02-12 20:12:12 +03:00
CGameHandler.h CGameHandler: rename CPackForClient argument and add network logging 2018-04-04 14:24:32 +07:00
CMakeLists.txt CMake more transitive 2019-03-28 16:56:51 +03:00
CQuery.cpp macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
CQuery.h Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks 2018-03-17 13:24:12 +08:00
CVCMIServer.cpp Fix build with Boost versioni >= 1.70 (#615) 2020-01-21 11:55:28 +03:00
CVCMIServer.h Fix various memory errors related to server and connections. 2018-05-01 00:04:20 +03:00
NetPacksLobbyServer.cpp Fix various memory errors related to server and connections. 2018-05-01 00:04:20 +03:00
NetPacksServer.cpp Allow learning secondary skills in ally towns 2019-03-25 02:21:32 +03:00
StdInc.cpp Rename radious -> radius 2016-01-31 18:01:58 +03:00
StdInc.h macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
VCMI_server.cbp [C::B] Switched to boost shared linkage 2019-05-30 20:55:40 +03:00
VCMI_server.vcxproj Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00