Skip to content
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
wants to merge 117 commits into from
Closed

Conversation

ArseniyShestakov
Copy link
Owner

No description provided.

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.
There is no reason for that function to return int.
@ArseniyShestakov
Copy link
Owner Author

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.
@ArseniyShestakov
Copy link
Owner Author

So I finish testing of my code during quite long AI game and I think it's works well enough.
Now I'm going to close this one as I'm already working on getting proper pull request ready.

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
Labels
None yet
Projects
None yet
4 participants