Skip to content

Commit 6df44bd

Browse files
committed
Apparently I didn't fix them the first time
1 parent 6d7b84b commit 6df44bd

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)
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)
733+
if (this.trackRotation)
739734
{
740-
this.fireFrom.centerOn(rotatedPoint.x, rotatedPoint.y);
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)
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+
}
741747
}
742748
else
743749
{
744-
this.fireFrom.x = rotatedPoint.x;
745-
this.fireFrom.y = rotatedPoint.y;
746-
}
747-
}
748-
else
749-
{
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);
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+
}
753759
}
754-
else
760+
761+
if (this.bulletInheritSpriteSpeed)
755762
{
756-
this.fireFrom.x = this.trackedSprite.world.x + this.trackOffset.x;
757-
this.fireFrom.y = this.trackedSprite.world.y + this.trackOffset.y;
763+
speed += this.trackedSprite.body.speed;
758764
}
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)