Of course it breaks

This commit is contained in:
DemiPixel 2015-10-09 17:33:29 -07:00
parent 7a028e7193
commit 7fd8e56d3e

View file

@ -11,7 +11,7 @@ function inject(serv, settings) {
function setTickInterval(ticksPerSecond) {
var serv = this;
stopTickInterval();
serv.stopTickInterval();
serv.tickInterval = setInterval(function() {
serv.tickCount++;
@ -20,6 +20,6 @@ function setTickInterval(ticksPerSecond) {
}
function stopTickInterval() {
if (serv.tickInterval) clearInterval(serv.tickInterval);
serv.tickInterval = null;
if (this.tickInterval) clearInterval(serv.tickInterval);
this.tickInterval = null;
}