Added avoid for Cross shaped avoid. #8
Open
nt153133 wants to merge 2 commits intozzi-zzi-zzi:masterfrom
nt153133:master
Open
Added avoid for Cross shaped avoid. #8nt153133 wants to merge 2 commits intozzi-zzi-zzi:masterfrom nt153133:master
nt153133 wants to merge 2 commits intozzi-zzi-zzi:masterfrom
nt153133:master
Conversation
…e aoe effect is plus shaped so a rectangle (taken from lazergeneric) is applied at the 4 rotational spots that correspond to cardinal directions.
Collaborator
|
Sorry for the slow reply, wasn't subscribed to this repo. |
Author
|
I based it off a 2 way line avoid that zzi made for dungeon master and
added the other 2 directions. It seems to work and logically it makes
sense. I don't have a way to visually check the avoid with the overlay so I
can't be 100% certain. That would make it a lot easier to add new omens if
in the overlay it could have an option to draw any avoids in the avoidance
manager, though it could be I missed it somewhere.
…On Sat, Nov 2, 2019, 10:35 PM mastahg ***@***.***> wrote:
Sorry for the slow reply, wasn't subscribed to this repo.
I've been working on a local version of sidestep and was looking to add
something for 188 as there are some mobs in the world that use it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AMQAJVMSYRIQXHQLMQ7UN2DQRY2HVA5CNFSM4JFPLPA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5JOLQ#issuecomment-549099310>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMQAJVOIBAYL3CVTZU5FVKTQRY2HVANCNFSM4JFPLPAQ>
.
|
Collaborator
|
You'll need something to convert a polygon into triangles. I don't have one that I could include. private static void Overlay3DOnDrawing(object sender, DrawingEventArgs drawingEventArgs)
{
foreach (var avoid in Avoids)
{
if (avoid is AvoidPolygon<BattleCharacter> avoid)
{
var converted = converthere(avoid.Points);
for (int i = 0; i < converted .Count / 3; i++)
{
var index0 = i * 3;
var height = cpl.Y + 0.2f;
dd.DrawTriangles(new Vector3[]
{
new Vector3(converted [index0].X, height, converted [index0].Y),
new Vector3(converted [index0 + 1].X, height, converted [index0 + 1].Y),
new Vector3(converted [index0 + 2].X, height, converted [index0 + 2].Y),
}, Color.FromArgb(24, 192, 255, 64));
}
}
if (avoid is AvoidCircle<BattleCharacter> ddz)
{
var loc = ddz.Location;
loc.Y = loc.Y + .25f;
dd.DrawCircleOutline(loc,ddz.Radius, Color.FromArgb(255, 192, 255, 64));
}
}if you find a nice clean, fast algorithm ill consider adding it as it would be useful to possibly expose, maybe just have it #if def'd out for non devs |
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.
Seems to work well on HoH mob, The aoe effect is plus shaped so a rectangle (taken from lazergeneric) is applied at the 4 rotational spots that correspond to cardinal directions and a small circle directly under the mob to keep from standing right under him. It's linked to omen 188 so should not interfere with other avoids and as of the current version (before this) sidestep complains a lot about not having an avoid setup for this cast.