Update SetCollisionBetween.js

This commit is contained in:
Richard Davey 2020-10-15 11:08:18 +01:00
parent 8d2e7b08c5
commit b4fed98aa2

View file

@ -31,15 +31,18 @@ var SetCollisionBetween = function (start, stop, collides, recalculateFaces, lay
if (recalculateFaces === undefined) { recalculateFaces = true; }
if (updateLayer === undefined) { updateLayer = true; }
if (start > stop) { return; }
if (start > stop)
{
return;
}
// Update the array of colliding indexes
// Update the array of colliding indexes
for (var index = start; index <= stop; index++)
{
SetLayerCollisionIndex(index, collides, layer);
}
// Update the tiles
// Update the tiles
if (updateLayer)
{
for (var ty = 0; ty < layer.height; ty++)