You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Missiles can be fired (spawned) when the game is paused.
Instead of seeing a swarm of missiles flying toward the target, there is very high risk of blowing up the player's own ship.
My version of Pioneer:
pioneer-20240710-win
This probably is just an unhappy behavior, rather than a legit bug.
However, I recommend adding pause check like this, in \data\libs\Ship.lua
function Ship:FireMissileAt(which_missile, target)
local missile_object = false
local game_paused = (Game.GetTimeAcceleration() == "paused") and true or false
if type(which_missile) == "number" and (not game_paused) then
local missile_equip = self:GetEquip("missile", which_missile)
if missile_equip then
missile_object = self:SpawnMissile(missile_equip.missile_type)
if missile_object ~= nil then
self:SetEquip("missile", which_missile)
end
end
elseif (not game_paused) then
for i,m in pairs(self:GetEquip("missile")) do
if which_missile == "any" then
missile_object = self:SpawnMissile(m.missile_type)
if missile_object ~= nil then
self:SetEquip("missile", i)
break
end
end
end
end
...
end
The text was updated successfully, but these errors were encountered:
A better solution would be to fix this in the UI code which implements the missile button. Simply checking for game paused before calling Ship:FireMissileAt() would be fine.
Given that Ship:FireMissileAt() is mid-refactor in #5734 any changes to that function directly are going to cause merge conflicts one way or another.
Observed behaviour
Missiles can be fired (spawned) when the game is paused.
Instead of seeing a swarm of missiles flying toward the target, there is very high risk of blowing up the player's own ship.
My version of Pioneer:
pioneer-20240710-win
This probably is just an unhappy behavior, rather than a legit bug.
However, I recommend adding pause check like this, in \data\libs\Ship.lua
The text was updated successfully, but these errors were encountered: