Skip to content

Commit

Permalink
Tweaking elevator time scale, making tiles non solid if they have wal…
Browse files Browse the repository at this point in the history
…kable space after moving
  • Loading branch information
Interrupt committed Jan 10, 2019
1 parent 428b152 commit afba03a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void tick(Level level, float delta) {
state = ElevatorState.NONE;
}
} else if (state == ElevatorState.WAITING) {
waitTime += delta * 0.01f;
waitTime += delta;

if(returnType == ReturnType.AUTO) {
if (waitTime > endWaitTime) {
Expand Down Expand Up @@ -115,6 +115,9 @@ public void tick(Level level, float delta) {
t.ceilHeight -= moving;
}

// Make this tile totally solid when fully closed
t.blockMotion = t.getMinOpenHeight() <= 0.0f;

markWorldAsDirty(tileX, tileY);
markWorldAsDirty(tileX + 1, tileY);
markWorldAsDirty(tileX - 1, tileY);
Expand Down

0 comments on commit afba03a

Please sign in to comment.