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
6
main.lua
6
main.lua
|
@ -666,11 +666,13 @@ local function doit(dummy)
|
|||
|
||||
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.
|
||||
-- this way, we avoid adding the timer-based fireworks to our reward,
|
||||
-- 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
|
||||
|
||||
--gui.text(72, 12, ("%+4i"):format(reward_delta), '#FFFFFF', '#0000003F')
|
||||
|
|
4
smb.lua
4
smb.lua
|
@ -212,7 +212,9 @@ local function handle_enemies()
|
|||
-- this is a mess... gotta find out its rotation and then project.
|
||||
-- TODO: handle long fire bars too
|
||||
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]
|
||||
x, y = x + x_off, y + y_off
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue