Skip to content

Commit 6d7b84b

Browse files
committed
Fixed jshint errors
1 parent 383f14c commit 6d7b84b

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

src/plugins/weapon/WeaponPlugin.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -730,38 +730,38 @@ Phaser.Weapon.prototype.fire = function (from, x, y) {
730730
}
731731
else if (this.trackedSprite)
732732
{
733-
if (this.trackRotation)
733+
if (this.trackRotation)
734+
{
735+
var rotatedPoint = new Phaser.Point(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
736+
rotatedPoint.rotate(this.trackedSprite.world.x, this.trackedSprite.world.y, this.trackedSprite.rotation);
737+
738+
if (this.fireFrom.width > 1)
734739
{
735-
rotatedPoint = new Phaser.Point(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
736-
rotatedPoint.rotate(this.trackedSprite.world.x, this.trackedSprite.world.y, this.trackedSprite.rotation);
737-
738-
if (this.fireFrom.width > 1)
739-
{
740-
this.fireFrom.centerOn(rotatedPoint.x, rotatedPoint.y);
741-
}
742-
else
743-
{
744-
this.fireFrom.x = rotatedPoint.x;
745-
this.fireFrom.y = rotatedPoint.y;
746-
}
740+
this.fireFrom.centerOn(rotatedPoint.x, rotatedPoint.y);
747741
}
748742
else
749743
{
750-
if (this.fireFrom.width > 1)
751-
{
752-
this.fireFrom.centerOn(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
753-
}
754-
else
755-
{
756-
this.fireFrom.x = this.trackedSprite.world.x + this.trackOffset.x;
757-
this.fireFrom.y = this.trackedSprite.world.y + this.trackOffset.y;
758-
}
744+
this.fireFrom.x = rotatedPoint.x;
745+
this.fireFrom.y = rotatedPoint.y;
759746
}
760-
761-
if (this.bulletInheritSpriteSpeed)
747+
}
748+
else
749+
{
750+
if (this.fireFrom.width > 1)
762751
{
763-
speed += this.trackedSprite.body.speed;
752+
this.fireFrom.centerOn(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
764753
}
754+
else
755+
{
756+
this.fireFrom.x = this.trackedSprite.world.x + this.trackOffset.x;
757+
this.fireFrom.y = this.trackedSprite.world.y + this.trackOffset.y;
758+
}
759+
}
760+
761+
if (this.bulletInheritSpriteSpeed)
762+
{
763+
speed += this.trackedSprite.body.speed;
764+
}
765765
}
766766
else if (this.trackedPointer)
767767
{

0 commit comments

Comments
 (0)