Comments (8)
seems related to monolith indeed, one more example:
don't have save file, unfortunately
from vcmi.
found an easy way to reproduce and not related to monoliths: just start RoE - Long Live the Queen campaign.
with 2 creatures also reproducible:
when a single creature is left, cursor becomes correct:
from vcmi.
one more way to reproduce: start AB campaign.
from vcmi.
seems the bug is here:
vcmi/client/windows/CAdvmapInterface.cpp
Line 1715 in e423e41
pnode->action
is wrong for creature tiles.
from vcmi.
seems I found where it got broken: 49c872e
the following simple patch fixes the issue, but I'm not sure about its consequences:
diff --git a/lib/CPathfinder.cpp b/lib/CPathfinder.cpp
index 6ae919db0..33f90bb39 100644
--- a/lib/CPathfinder.cpp
+++ b/lib/CPathfinder.cpp
@@ -862,7 +862,7 @@ void DestinationActionRule::process(
else
action = CGPathNode::BLOCKING_VISIT;
}
- else if(destination.isGuardianTile)
+ else if(destination.guarded)
action = CGPathNode::BATTLE;
else if(destination.nodeObject->blockVisit && !(pathfinderConfig->options.useCastleGate && destination.nodeObject->ID == Obj::TOWN))
action = CGPathNode::BLOCKING_VISIT;
@nullkiller could you double-check since that's your commit?
branch with the change: https://github.com/kambala-decapitator/vcmi/tree/fix-cursor-attack
from vcmi.
it seems that the right fix is actually:
diff --git a/lib/CPathfinder.cpp b/lib/CPathfinder.cpp
index 6ae919db0..ceab0c5e4 100644
--- a/lib/CPathfinder.cpp
+++ b/lib/CPathfinder.cpp
@@ -392,7 +392,7 @@ void CPathfinder::calculatePaths()
destination.movementLeft = movement;
destination.cost = cost;
destination.updateInfo(hlp, gs);
- destination.isGuardianTile = destination.guarded && isDestinationGuardian();
+ destination.isGuardianTile = destination.guarded || isDestinationGuardian();
for(auto rule : config->rules)
{
from vcmi.
the latter is actually wrong: such stuff becomes possible which differs from the original (although battle begins as well when you try to acquire the sawmill)
with the former change original behavior is preserved:
from vcmi.
unguarded resources can still be captured with the former change:
from vcmi.
Related Issues (20)
- Simultaneous turns multiplayer game: UI not properly locking when first player presses end turn button
- VCMI first install: read default H3 install path from registry on Windows HOT 4
- How are other languages handled? I may be interested on doing a Greek Translation HOT 5
- Improvements suggestions for error handling HOT 1
- New bonus type proposal HOT 2
- Softlock when one player get eliminated in alliance mode HOT 1
- RMG: Add more obstacles to empty area HOT 1
- [wog][crash] checking commander info at battlefield crashes vcmi HOT 6
- [wog] some commander extra stills are broken HOT 4
- Same event message shown before and after battle
- Campaign screen showing checkmark just after first scenario is compleated HOT 1
- Show unit movement when unit is selected from turn order queue and info on right / longpress
- Campaign intro video keeps pixelating upon repeat in Armagedons Balde campaigns HOT 2
- Starting bonus shows incorrect resource bonus(always the same) on left click menu
- Saving chess timers
- Assert triggered: Statusbar HOT 3
- Duplicated hero in RoE campaign
- Fix Reduce Damage icon HOT 3
- Multi Mod Selection & Disabling/Enabling
- Build fails with ENABLE_ERM=ON HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcmi.