restore flagpole bonus, add missing overlay check

This commit is contained in:
Connor Olding 2018-06-09 04:35:09 +02:00
parent 9fb98d3fe0
commit cbb094adc9
2 changed files with 7 additions and 3 deletions

View file

@ -666,11 +666,13 @@ 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.
reward = reward + reward_delta if flagpole_bonus > 0 or controllable then
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')

View file

@ -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)
gui.text(x-13, y-3+9, ("%04X"):format(rot), '#FFFFFF', '#0000003F') if overlay then
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