- bullet = Bullet(self.owner.x, self.owner.y, direction, speed,
- self.owner.target, actions, self)
+ x, y = owner.x, owner.y
+ if offset:
+ off_x, off_y = offset(self.params, rank)
+ if offset.type == "relative":
+ sin = math.sin(direction)
+ cos = math.cos(direction)
+ x += cos * off_x + sin * off_y
+ y += sin * off_x - cos * off_y
+ else:
+ x += off_x
+ y += off_y
+
+ bullet = Bullet(
+ x, y, direction, speed, owner.target, actions, self, rank)