Skip to content

Commit 7e09977

Browse files
committed
debug draw pathfinding network
1 parent d917870 commit 7e09977

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

objects/obj_game/Draw_0.gml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ Particles.Render();
3535

3636
obj_player.DrawSpellSymbol();
3737

38+
if (DEBUG) {
39+
with (obj_npc) {
40+
if (self.pathfinding != undefined) {
41+
var previous = new Vector3(self.x, self.y, self.z);
42+
for (var i = 0; i < array_length(self.pathfinding); i++) {
43+
var next = self.pathfinding[i].data;
44+
d3d_draw_line(previous.x, previous.y, previous.z, next.x, next.y, next.z, 4, c_red, 1, c_red, 1, false);
45+
previous = next;
46+
}
47+
}
48+
}
49+
}
50+
3851
gpu_set_ztestenable(false);
3952
gpu_set_zwriteenable(false);
4053
gpu_set_cullmode(cull_noculling);

0 commit comments

Comments
 (0)