Raider target finding fix#2
Open
Krutchen wants to merge 4 commits into
Open
Conversation
Fixes raiders being unable to fire at colonists who are "inside", ie behind embrasures inside of a building. Do note, this is an initial fix, more work is going to be put into it. Before, ranged attacks had to be able to get a path to the target, now they do not, because of my changes within Detour_AttackTargetFinder
Fixes raiders being unable to fire at colonists who are "inside", ie behind embrasures inside of a building. Do note, this is an initial fix, more work is going to be put into it. It can be hit and miss at the moment, but it does enable raiders to fight back. Before, ranged attacks had to be able to get a path to the target, now they do not, because of my changes within Detour_AttackTargetFinder
messed something up with attacktargetfinder, now they should fire at you even if you're in an enclosed box.
messed something up with attacktargetfinder, now raiders should fire at you even if you're in an enclosed box.
Author
|
Had a quick fix to do really quick, raiders were having some problems firing through embrasures still because I was not calling in the edited event, fixed that and removed else statement. |
This file contains hidden or 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
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.
Pull req to here, because NoImage says you're going to be maintaining CR and we should use this repo instead.
Fixes raiders being unable to fire at colonists who are "inside", ie behind embrasures inside of a building.
Do note, this is an initial fix, more work is going to be put into it. It can be hit and miss at the moment, but it does enable raiders to fight back.
Before, ranged attacks had to be able to get a path to the target, now they do not, because of my changes within Detour_AttackTargetFinder
Might need to clean it up a little bit in the future, but this is getting the job done so far.
I would like to speak to you regarding further ways to expand this, though, I think that playing with how the GenSight.LineOfSight function works could expand target acquisition further. We could take range into account for raiders "seeing" defenders through embrasures, as at the moment, , and possibly implement a opacity float to allow for "see through" objects, so that mods that add in windows could actually have enemies firing through them, because at the moment, if something isn't "full" in FillPercent, target acquisition happens at the same rate, at the same range, etc.
Expanding upon this could make it so different fill percentages can block sight easier, so the larger the cover is, or more opaque it is, the closer an enemy has to be to see "through" it.