0 users browsing Bug Reports. | 1 guest  
Main » Bug Reports » Pathing bug inside MoveTo » New reply
Alert
You are about to bump an old thread. This is usually a very bad idea. Please think about what you are about to do before you press the Post button.
New reply
Post help

Presentation

[b]…[/b] — bold type
[i]…[/i] — italic
[u]…[/u] — underlined
[s]…[/s] — strikethrough
[code]…[/code] — code block
[spoiler]…[/spoiler] — spoiler block
[spoiler=…]…[/spoiler]
[source]…[/source] — colorcoded block, assuming C#
[source=…]…[/source] — colorcoded block, specific language[which?]

Links

[img]http://…[/img] — insert image
[url]http://…[/url]
[url=http://…]…[/url]
>>… — link to post by ID
[user=##] — link to user's profile by ID

Quotations

[quote]…[/quote] — untitled quote
[quote=…]…[/quote] — "Posted by …"
[quote="…" id="…"]…[/quote] — ""Post by …" with link by post ID

Embeds


Most plain HTML also allowed.
Thread review
PillowShout Jesus, this took me forever to figure out!

I finally discovered why some of the Boardchars kept trying to run into walls whenever MoveTo was called by the scheduler.

ScriptPathTarget = new Dijkstra(); <- It was this bastard!
ScriptPathTarget.Hotspots.Add(new Point(x, y));
ScriptPathTarget.Update();
ScriptPathID = target;
ScriptPathTargetX = x;
ScriptPathTargetY = y;
ScriptPathing = true;


When the constructor was being called without a board being passed, it caused UpdateWalls to try and update using some empty board. This meant that the as far as the mapper was concerned, the entity was in an open field, and hence why it couldn't see the wall in front of its face.

The fix is of course maddeningly simple:
ScriptPathTarget = new Dijkstra(this.ParentBoard);

And so now, entities that are told to move by MoveTo, can now actually go where they need to be. Now if you'll excuse me, I need to go to bed. x_x
Main » Bug Reports » Pathing bug inside MoveTo » New reply