RoomVisual.poly() failing silently and blocking all subsequent draws on that room if empty array is passed
-
This one has stumped me for quite some time until I finally figured it out.
- Which shard is affected?
All
- What happened?
When drawing a RoomVisual.poly() using filtered result from PathFinder result an empty array as first parameter failed quietly and blocked all subsequent visuals from getting drawn in the room.
- What should have happened?
All poly lines except for the empty one should have been drawn.
- How can we reproduce this?
var roomName = "E29N3"; var rv = new RoomVisual(roomName); rv.poly([new RoomPosition(20, 21, roomName), new RoomPosition(21, 22, roomName), new RoomPosition(22, 21, roomName)]); rv.poly(new Array()); rv.poly([new RoomPosition(20, 23, roomName), new RoomPosition(21, 22, roomName), new RoomPosition(22, 23, roomName)]);
Normally this should draw an "x" centered on (21,22). But line #4 causes the code to bug out and draw only the top v of the visual. Also, all subsequent draws on that room will fail as well. Comment it out, and code will work just fine.
-
Thanks for your report, we'll take a look
-
@orlet Should be fixed atm.