restore flagpole bonus, add missing overlay check
This commit is contained in:
parent
9fb98d3fe0
commit
cbb094adc9
2 changed files with 7 additions and 3 deletions
4
main.lua
4
main.lua
|
@ -666,12 +666,14 @@ local function doit(dummy)
|
||||||
|
|
||||||
if cfg.decrement_reward and reward_delta == 0 then reward_delta = reward_delta - 1 end
|
if cfg.decrement_reward and reward_delta == 0 then reward_delta = reward_delta - 1 end
|
||||||
|
|
||||||
if not ingame_paused and controllable and game.get_state() ~= 'win_walking' then
|
if not ingame_paused and game.get_state() ~= 'win_walking' then
|
||||||
-- note that we exclude points gained walking into the castle.
|
-- note that we exclude points gained walking into the castle.
|
||||||
-- this way, we avoid adding the timer-based fireworks to our reward,
|
-- this way, we avoid adding the timer-based fireworks to our reward,
|
||||||
-- which are basically unwanted noise due to the way they trigger.
|
-- which are basically unwanted noise due to the way they trigger.
|
||||||
|
if flagpole_bonus > 0 or controllable then
|
||||||
reward = reward + reward_delta
|
reward = reward + reward_delta
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--gui.text(72, 12, ("%+4i"):format(reward_delta), '#FFFFFF', '#0000003F')
|
--gui.text(72, 12, ("%+4i"):format(reward_delta), '#FFFFFF', '#0000003F')
|
||||||
gui.text(89, 16, ("%+5i"):format(reward), '#FFFFFF', '#0000003F')
|
gui.text(89, 16, ("%+5i"):format(reward), '#FFFFFF', '#0000003F')
|
||||||
|
|
2
smb.lua
2
smb.lua
|
@ -212,7 +212,9 @@ local function handle_enemies()
|
||||||
-- this is a mess... gotta find out its rotation and then project.
|
-- this is a mess... gotta find out its rotation and then project.
|
||||||
-- TODO: handle long fire bars too
|
-- TODO: handle long fire bars too
|
||||||
local rot = R(0xA0 + i) --* 0x100 + R(0x58 + i)
|
local rot = R(0xA0 + i) --* 0x100 + R(0x58 + i)
|
||||||
|
if overlay then
|
||||||
gui.text(x-13, y-3+9, ("%04X"):format(rot), '#FFFFFF', '#0000003F')
|
gui.text(x-13, y-3+9, ("%04X"):format(rot), '#FFFFFF', '#0000003F')
|
||||||
|
end
|
||||||
local x_off, y_off = rotation_offsets[rot*2+1], rotation_offsets[rot*2+2]
|
local x_off, y_off = rotation_offsets[rot*2+1], rotation_offsets[rot*2+2]
|
||||||
x, y = x + x_off, y + y_off
|
x, y = x + x_off, y + y_off
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue