fix skirmisher sparks
This commit is contained in:
		| @@ -605,7 +605,7 @@ function ship_m:move() | ||||
|  self:maybe_shoot(self.main_gun) | ||||
|  if (shoot_spec1 and self.special_guns) self:maybe_shoot(self.special_guns[1]) | ||||
|  if (shoot_spec2 and self.special_guns) self:maybe_shoot(self.special_guns[2]) | ||||
|  if (dx ~= 0 or dy ~= 0) spark(self.sparks, self.x + 4*self.size, self.y + 4*self.size, dx*2.5, dy*2.5, self.sparkodds) | ||||
|  spark(self.sparks, self.x + 4*self.size, self.y + 4*self.size, dx*2.5, dy*2.5, self.sparkodds) | ||||
|  self.xmomentum = self:calc_velocity(self.xmomentum, dx) | ||||
|  self.ymomentum = self:calc_velocity(self.ymomentum, dy) | ||||
|  | ||||
| @@ -1392,8 +1392,8 @@ ship_turret = mknew(ship_f.new{ | ||||
| ship_skirmisher = mknew(ship_f.new{ | ||||
|  sprite=107, | ||||
|  xp = 0x0.0004, | ||||
|  spark = smokespark, | ||||
|  sparkodds = 4, | ||||
|  sparks = smokespark, | ||||
|  sparkodds = 3, | ||||
| }) | ||||
|  | ||||
| function rnd_spawn_loc() | ||||
| @@ -1695,15 +1695,15 @@ function spark_particle:draw() | ||||
| end | ||||
|  | ||||
| function spark(sprs, x, y, dx, dy, odds, fg) | ||||
|  if (sprs==nil or flr(rnd(odds)) ~= 0) return | ||||
|  if (sprs==nil or flr(rnd(odds) or (abs(dx) < 0.5 and abs(dy))) ~= 0) return | ||||
|  local target = fg and intangibles_fg or intangibles_bg | ||||
|  target:push_back(spark_particle.new{ | ||||
|   x = x + rnd(4) - 2, | ||||
|   y = y + rnd(4) - 2, | ||||
|   sprs = sprs, | ||||
|   sidx = 1, | ||||
|   dx = dx + rnd(2) - 1, | ||||
|   dy = dy + rnd(2) - 1, | ||||
|   dx = dx * rnd(2), | ||||
|   dy = dy * rnd(2), | ||||
|  }) | ||||
| end | ||||
| -->8 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user