forked from vcmi/vcmi
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal only test merge #2
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change is needed for the future pathfinding improvements, but for now just split functionality we currently have into several classes. Though in future CGSubterraneanGate won't have own onHeroVisit as it's may be represented as two-way monolith. Other target of this refactoring is make it possible to have subtype of Monolith that include both unidirectional and bidirectional objects.
At this point everything that worked before works with new code.
Hero movements via one-way monoliths would be handled anyway. In same time there nearly no chances that this check was ever used.
At this point even building broken for obvious reason.
It's not yet work properly, but...
There is no reason for that function to return int.
And yeah I'm need a sleep already. :-)
Also may be it's worth to get rid of "cid" completely and instead have pointer to channel of certain teleport. And then SChannel may have id inside it... not sure what is the better solution. |
I'm still need to find out what to do with blocked tiles to avoid hero step into monolith when it's not needed.
Though this code is still hacky and I'm still need to somehow avoid interaction with one-tile teleporters on hero path.
Though I'll have to find out why it's not working.
This is finally work, but I find out that something with Z coord is messed up, but it's not likely related to that code.
Though it's shouldn't really happen and this need to be rewritten.
This is first step to get rid of static class members as they're evil.
This is needed because we want to always add any new teleport channels to knownTeleportChannels before object is used for any purpose. In past there was crash in Explore::getAllPossibleSubgoals because teleport was used before it's channel added to known list. This should help to avoid crash in Explore::getAllPossibleSubgoals
During channel exploration we only check teleports that not visible so one of them may be busy with enemy.
As far as I get answer for our teleport dialog may be 0 so check is useless here.
Though this code now always used in case teleportation needed.
This is needed for filtering them in VCAI without copying.
So I finish testing of my code during quite long AI game and I think it's works well enough. |
ArseniyShestakov
pushed a commit
that referenced
this pull request
Mar 2, 2016
ArseniyShestakov
pushed a commit
that referenced
this pull request
Jun 12, 2017
ArseniyShestakov
pushed a commit
that referenced
this pull request
Jul 12, 2017
ArseniyShestakov
added a commit
that referenced
this pull request
Jul 12, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.