Aye, i confirmed that Volcano projectiles originate from the player. This occurs because the function "projectile(...)" is a function for actors, and so needs an actor to call it (in this case the actor that created the volcano, which hopefully still exists when the Volcano tries to do its thing

). Unlike "project(...)", "projectile(...)" can't currently overwrite the location of origination with data from "typ" (i.e., tg, target_type, or Target:getType). Attached is a patch that does just that. I confirmed that it works for Volcano (as long as the source actor exists), although I can't promise it won't break something else
Code: Select all
diff --git a/game/engines/default/engine/Projectile.lua b/game/engines/default/engine/Projectile.lua
index 2a9a822..aba5c85 100644
--- a/game/engines/default/engine/Projectile.lua
+++ b/game/engines/default/engine/Projectile.lua
@@ -258,7 +258,7 @@ function _M:makeProject(src, display, def, do_move, do_act, do_stop)
travel_particle_args = display.particle_args,
trail_particle = display.trail,
src = src,
- src_x = src.x, src_y = src.y,
+ src_x = def.start_x or src.x, src_y = def.start_y or src.y,
project = {def=def},
energy = {mod=speed},
tmp_proj = {},
diff --git a/game/engines/default/engine/interface/ActorProject.lua b/game/engines/default/engine/interface/ActorProject.lua
index 73c02a9..90c0bac 100644
--- a/game/engines/default/engine/interface/ActorProject.lua
+++ b/game/engines/default/engine/interface/ActorProject.lua
@@ -270,12 +270,12 @@ function _M:projectile(t, x, y, damtype, dam, particles)
-- if type(dam) == "number" and dam < 0 then return end
local typ = Target:getType(t)
typ.source_actor = self
- typ.start_x = self.x
- typ.start_y = self.y
+ typ.start_x = t.x or self.x
+ typ.start_y = t.y or self.y
if self.lineFOV then
- typ.line_function = self:lineFOV(x, y)
+ typ.line_function = self:lineFOV(x, y, nil, nil, t.x, t.y)
else
- typ.line_function = core.fov.line(self.x, self.y, x, y)
+ typ.line_function = core.fov.line(t.x or self.x, t.y or self.y, x, y)
end
local block_corner = typ.block_path and function(_, bx, by) local b, h, hr = typ:block_path(bx, by, true) ; return b and h and not hr end
or function(_, bx, by) return false end