Skip to content

Conversation

@nt153133
Copy link

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.

…e aoe effect is plus shaped so a rectangle (taken from lazergeneric) is applied at the 4 rotational spots that correspond to cardinal directions.
@mastahg
Copy link
Collaborator

mastahg commented Nov 3, 2019

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.

@nt153133
Copy link
Author

nt153133 commented Nov 3, 2019 via email

@mastahg
Copy link
Collaborator

mastahg commented Nov 3, 2019

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

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.

2 participants