diff --git a/lib/impact/collision-map.js b/lib/impact/collision-map.js index 23f5dde..c05440c 100644 --- a/lib/impact/collision-map.js +++ b/lib/impact/collision-map.js @@ -41,7 +41,7 @@ ig.CollisionMap = ig.Map.extend({ var sy = vy / steps; for( var i = 0; i < steps && (sx || sy); i++ ) { - this._traceStep( res, x, y, sx, sy, objectWidth, objectHeight, vx, vy, i ); + this._traceStep( res, x, y, sx, sy, objectWidth, objectHeight, i ); x = res.pos.x; y = res.pos.y; @@ -53,14 +53,14 @@ ig.CollisionMap = ig.Map.extend({ // Just one step else { - this._traceStep( res, x, y, vx, vy, objectWidth, objectHeight, vx, vy, 0 ); + this._traceStep( res, x, y, vx, vy, objectWidth, objectHeight, 0 ); } return res; }, - _traceStep: function( res, x, y, vx, vy, width, height, rvx, rvy, step ) { + _traceStep: function( res, x, y, vx, vy, width, height, step ) { res.pos.x += vx; res.pos.y += vy; @@ -92,7 +92,7 @@ ig.CollisionMap = ig.Map.extend({ t = this.data[tileY][prevTileX]; if( t > 1 && t <= this.lastSlope && - this._checkTileDef(res, t, x, y, rvx, rvy, width, height, prevTileX, tileY) + this._checkTileDef(res, t, x, y, vx, vy, width, height, prevTileX, tileY) ) { break; } @@ -101,7 +101,7 @@ ig.CollisionMap = ig.Map.extend({ t = this.data[tileY][tileX]; if( t == 1 || t > this.lastSlope || // fully solid tile? - (t > 1 && this._checkTileDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)) // slope? + (t > 1 && this._checkTileDef(res, t, x, y, vx, vy, width, height, tileX, tileY)) // slope? ) { if( t > 1 && t <= this.lastSlope && res.collision.slope ) { break; @@ -139,7 +139,7 @@ ig.CollisionMap = ig.Map.extend({ t = this.data[prevTileY][tileX]; if( t > 1 && t <= this.lastSlope && - this._checkTileDef(res, t, x, y, rvx, rvy, width, height, tileX, prevTileY) ) { + this._checkTileDef(res, t, x, y, vx, vy, width, height, tileX, prevTileY) ) { break; } } @@ -147,7 +147,7 @@ ig.CollisionMap = ig.Map.extend({ t = this.data[tileY][tileX]; if( t == 1 || t > this.lastSlope || // fully solid tile? - (t > 1 && this._checkTileDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)) // slope? + (t > 1 && this._checkTileDef(res, t, x, y, vx, vy, width, height, tileX, tileY)) // slope? ) { if( t > 1 && t <= this.lastSlope && res.collision.slope ) { break; @@ -274,4 +274,4 @@ ig.CollisionMap.staticNoCollision = { trace: function( x, y, vx, vy ) { }; }}; -}); \ No newline at end of file +});