Fixed GridTickable bug.

This commit is contained in:
AlgorithmX2 2013-12-29 23:57:23 -06:00
parent f532e37986
commit e44bd923fc
1 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,8 @@ public class TickTracker implements Comparable<TickTracker>
@Override
public int compareTo(TickTracker t)
{
return (int) ((host.getCurrentTick() - lastTick) + current_rate);
int nextTick = (int) ((lastTick - host.getCurrentTick()) + current_rate);
int ts_nextTick = (int) ((t.lastTick - host.getCurrentTick()) + t.current_rate);
return nextTick - ts_nextTick;
}
};