make marching ants trailer effect optional
This makes trcolor = bgcolor work even when bgcolor is nil. trcolor=nil always works to produce this behavior.
This commit is contained in:
parent
f4f629d1cd
commit
d4a67acc9b
@ -378,7 +378,7 @@ ants = {
|
|||||||
-- bgcolor=0, --nil: transparent
|
-- bgcolor=0, --nil: transparent
|
||||||
ldcolor=7,
|
ldcolor=7,
|
||||||
fgcolor=6,
|
fgcolor=6,
|
||||||
trcolor=5,
|
-- trcolor=5, --nil: no trailer
|
||||||
|
|
||||||
speed=2/60,
|
speed=2/60,
|
||||||
offset=0,
|
offset=0,
|
||||||
@ -412,8 +412,8 @@ function ants:draw()
|
|||||||
rectfill(x,0,x,h,c)
|
rectfill(x,0,x,h,c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if p < 1 then
|
local c = self.trcolor
|
||||||
local c = self.trcolor
|
if p < 1 and c then
|
||||||
for x = x0-1+s,w,s do
|
for x = x0-1+s,w,s do
|
||||||
rectfill(x,0,x,h,c)
|
rectfill(x,0,x,h,c)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user