diff --git a/lib/game/weapons/grenade-launcher.js b/lib/game/weapons/grenade-launcher.js index a29aae0..f2299a0 100644 --- a/lib/game/weapons/grenade-launcher.js +++ b/lib/game/weapons/grenade-launcher.js @@ -87,7 +87,7 @@ EntityGrenade = tpf.Entity.extend({ }, reset: function( x, y, settings ) { - this.parent(x,y,settings); + this.parent( x-this.size.x/2, y-this.size.y/2, settings ); // center on spawn pos this.vel.x = -Math.sin(this.angle) * this.speed; this.vel.y = -Math.cos(this.angle) * this.speed; this.vel.z = 1.2; @@ -210,4 +210,4 @@ EntityGrenadeExplosion = tpf.Entity.extend({ ig.EntityPool.enableFor(EntityGrenadeExplosion); -}); \ No newline at end of file +});