Skip to content

Raider target finding fix#2

Open
Krutchen wants to merge 4 commits into
Skullywag:masterfrom
Krutchen:master
Open

Raider target finding fix#2
Krutchen wants to merge 4 commits into
Skullywag:masterfrom
Krutchen:master

Conversation

@Krutchen
Copy link
Copy Markdown

@Krutchen Krutchen commented May 17, 2016

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.

Krutchen added 4 commits May 13, 2016 04:24
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.
@Krutchen Krutchen closed this May 17, 2016
@Krutchen
Copy link
Copy Markdown
Author

Had a quick fix to do really quick, raiders were having some problems firing through embrasures still because I was not calling

Thing result = GenClosest.ClosestThing_Global(searcher.Position, Detour_AttackTargetFinder.tmpTargets, maxTargDist, predicate);
Detour_AttackTargetFinder.tmpTargets.Clear();
return result;

in the edited event, fixed that and removed else statement.

@Krutchen Krutchen reopened this May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant