Skip to content

Commit

Permalink
Merge pull request #655 from greatbritdan/patch-2
Browse files Browse the repository at this point in the history
Fixed setting "quadno" directly
  • Loading branch information
alesan99 authored Dec 10, 2024
2 parents 9033857 + ea5ac56 commit 23d97e4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions enemy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ function enemy:init(x, y, t, a, properties)
end
end

-- update qaud if quadno is changed, better than running the same check 10 times
local oldqaudno = (self.quadno or 1)

--right click menu
if self.rightclickmenu and self.a[3] then
local s = tostring(self.a[3])
Expand Down Expand Up @@ -221,9 +218,8 @@ function enemy:init(x, y, t, a, properties)
table.remove(self.a, 1)
end

-- if quadno is changed in either rightclick
if oldqaudno ~= self.quadno then
self.quad = self.quadgroup[self.quadno]
if type(self.quadgroup) == "table" then
self.quad = self.quadgroup[self.quadno or 1]
end

if self.customtimer then
Expand Down

0 comments on commit 23d97e4

Please sign in to comment.