Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/collision/GridBroadphase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ class GridBroadphase {
for (i in xStart...xEnd) {
for (j in yStart...yEnd) {
for (surfIdx in cells[16 * i + j]) {
var surf = objects[surfIdx].object;
// remove() nulls the slot but keeps the index; build() skips these too.
var proxy = objects[surfIdx];
if (proxy == null)
continue;
var surf = proxy.object;
if (surf.key == searchKey)
continue;
surf.key = searchKey;
Expand Down
3 changes: 2 additions & 1 deletion src/gui/PlayGui.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,8 @@ class PlayGui {
gemCountNumbers[4].anim.visible = false;
gemCountNumbers[5].anim.visible = false;

var off = playerList[0].us ? 10 : 0;
// playerList is multiplayer-only, so it is empty in single player.
var off = (playerList.length > 0 && playerList[0].us) ? 10 : 0;

gemCountNumbers[0].anim.currentFrame = off + collectedHundredths;
gemCountNumbers[1].anim.currentFrame = off + collectedTenths;
Expand Down