trig zap gun; fixes

use the trig gun for the zap gun
This commit is contained in:
Kistaro Windrider 2025-06-01 17:00:28 -07:00
parent 2fdb8d1a05
commit b18b4f885d
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -876,7 +876,7 @@ end
trig_gun = mknew(gun_base.new{ trig_gun = mknew(gun_base.new{
veloc = 1, veloc = 1,
aim = 0.25, --use 0.75 for a player gun aim = 0.75, -- down; 0.25 is up
shot_idx = 0, shot_idx = 0,
-- shots: list<list<[3]num>> -- shots: list<list<[3]num>>
-- describing a cycling -- describing a cycling
@ -917,7 +917,7 @@ function trig_gun:actually_shoot(x, y)
-- multiple collision checks -- multiple collision checks
m.dy = sin(a) * veloc m.dy = sin(a) * veloc
m.dx = cos(a) * veloc m.dx = cos(a) * veloc
m.spawn_at(x+(xo or 0), y) m:spawn_at(x+(xo or 0), y)
end end
end end
@ -940,8 +940,6 @@ zap_e = mknew(bullet_base.new{
y_off = 8, y_off = 8,
damage = 1, damage = 1,
dx = 0, -- px/frame
dy = 4,
hitship = const_fxn(true), hitship = const_fxn(true),
@ -950,19 +948,21 @@ zap_e = mknew(bullet_base.new{
zap_p = mknew(zap_e.new{ zap_p = mknew(zap_e.new{
sprite = 8, sprite = 8,
dy = -8,
y_off = 0, y_off = 0,
category = player_blt_cat, category = player_blt_cat,
}) })
zap_gun_e = mknew(gun_base.new{ zap_gun_e = mknew(trig_gun.new{
cooldown = 0x0.0020, -- frames between shots cooldown = 0x0.0020, -- frames between shots
veloc = 4,
munition = zap_e, munition = zap_e,
}) })
zap_gun_p = mknew(zap_gun_e.new{ zap_gun_p = mknew(zap_gun_e.new{
icon = 19, icon = 19,
munition = zap_p, munition = zap_p,
veloc = 8,
aim = 0.25,
hdr = "mAIN gUN", hdr = "mAIN gUN",
}) })