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