def __call__(self, owner, action, params, rank, created):
direction, speed, tags, appearance, actions = self.bullet(
owner, action, params, rank, created)
- if self.direction:
+ if self.direction is not None:
direction = self.direction(params, rank)
- if self.speed:
+ if self.speed is not None:
speed = self.speed(params, rank)
tags = tags.union(self.tags)
- if self.appearance:
+ if self.appearance is not None:
appearance = self.appearance
- if direction:
+ if direction is not None:
direction, type = direction
if type == "aim" or type is None:
direction += owner.aim
direction = owner.aim
action.previous_fire_direction = direction
- if speed:
+ if speed is not None:
speed, type = speed
if type == "sequence":
speed += action.previous_fire_speed
speed = 1
action.previous_fire_speed = speed
- x, y = owner.x, owner.y
- if self.offset:
+ x = owner.x
+ y = owner.y
+ if self.offset is not None:
off_x, off_y = self.offset(params, rank)
if self.offset.type == "relative":
s = sin(direction)