Skip to content

Fix leafshot getting killed instantly after being dispensed on macOS#3576

Merged
weluvgoatz merged 1 commit intoSuperTux:masterfrom
Brockengespenst:fix_leafshot_again
Feb 12, 2026
Merged

Fix leafshot getting killed instantly after being dispensed on macOS#3576
weluvgoatz merged 1 commit intoSuperTux:masterfrom
Brockengespenst:fix_leafshot_again

Conversation

@Brockengespenst
Copy link
Contributor

Another attempt to fix #3463 as it has been reintroduced with acb76ca.

Another attempt to fix SuperTux#3463 as it has been reintroduced with
acb76ca.
@Brockengespenst
Copy link
Contributor Author

I have not tested the LeafShot on Linux, but I guess it would have been noticed already if #3463 was present there as well. This is another attempt to fix it as set_action resets the hitbox to the proper size and it works as expected, also with corrupted version of LeafShot.
Maybe this is somehow compiler related, macOS uses clang and Linux builds seem to use g++.

@provigz
Copy link
Member

provigz commented Jan 17, 2026

Oops, sorry about that! I should have checked why it was in KamikazeSnowball constructor to begin with, as it did seem unusual.

@Brockengespenst
Copy link
Contributor Author

No worries, seems like I did not test the corrupted version of LeafShot when making the change back then.

I just did a test on Debian using clang and it is also working there. Really strange why the problem only happens on macOS (throughout different versions and processor architectures).

Copy link
Member

@tobbi tobbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-line fix, easy to review.

@MatusGuy MatusGuy linked an issue Feb 11, 2026 that may be closed by this pull request
6 tasks
Copy link
Member

@weluvgoatz weluvgoatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This at least seems to fix the issue on Android!

Copy link
Member

@swagtoy swagtoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only approving because we are cutting close anyway.

But this logic in general (that appears to have been here before) just seems kind of smelly here to me... like a hack? (also the style is technically wrong but i can fix that anyway)

@weluvgoatz
Copy link
Member

3 approves = merging

@weluvgoatz weluvgoatz merged commit b2e95b7 into SuperTux:master Feb 12, 2026
21 of 23 checks passed
swagtoy added a commit that referenced this pull request Mar 15, 2026
This is the 0.7.0 release of SuperTux which contains a revamped story mode, new
music, more content, multiplayer, and much more.

A shortlog of changes since the last beta:

Daniel Ward (16):
      Fix unattainable coins in Mario's
      Floral blossom: remove spikes in pit
      Striking wood: Fix path
      Bonus1: Propagate light status properly
      Story: add target times where missing
      Item pocket: make timer gravity-deterministic
      Story: Change tux's sprite when changing WM
      through the dark: Add workaround to crusher bug
      Crumbel cavern: Workaround for crusher bug
      World2: Address worldmap not changing action
      Story: Unlocking secret also unlocks normal
      Striking Wood: visual cue
      Player: Prevent non-egg growup floating
      welcome_forest.stl: tiling error
      Merge branch 'master' of https://github.com/SuperTux/supertux
      deep_dive_chill: remove coins in dangerous currents

Frostwithasideofsalt (4):
      add nightly tiles converter back
      yes i did thits in 2 commits im lazy
      Chrima snowball is more ready then before
      fix misc level issues

Jiří Paleček (13):
      Fix percentage counter overflow when downloading add-ons (#3657)
      Fix sprite change (#3673)
      Fix various minor issues (#3681)
      worldmap_sector: call init script after loading music (#3682)
      world1, world2, bonus1: tiling fixes [ci skip] (#3683)
      root_sapling: fix compiler warning (#3655)
      yeti_stalactite: fix object type not updating sprite (#3660)
      ancient_ruin: fix door decal (#3693)
      entangled_roots: tiling fix [ci skip] (#3695)
      world2: move larry to flooded chambers [ci skip] (#3707)
      world2: worldmap fixes [ci skip] (#3718)
      mr_tree, stumpy: consistent coin drops from glinting enemies
      hollow_earth: fix tiling, rain [ci skip]

MatusGuy (17):
      badguy: fix infinite jump with frozen badguy
      root_sapling: spawn a bit below when spawning in slopes
      Tiny android patches (#3556)
      game_manager: fix title screen level from worldmap
      player: fix item pocket dupe bug in worldmap
      game_session: restore initial pocket when restarting or aborting
      goldbomb: fix ledge detection ignoring fleeing sprite
      dive_mine: ignore wind
      rock: fix weird interactions when grabbing
      world2: remove gravity from dispensers in shocking.stl
      player: position grabbed object correctly when flipping
      android: detect when building app bundle
      android: fix unknown "bundle" variable in gradle
      android: remove Donate option in main menu
      ci: ignore stuff for doxygen scripting reference
      stumpy: bounce when buttjumped while invincible
      music_object: reset star theme when star is picked up

Philip (1):
      Fix leafshot getting killed instantly after being dispensed on macOS (#3576)

SuperTux Bot (1):
      Update translations

Swagtoy (24):
      flatpak: Switch to libepoxy
      flatpak: Fix icon not working for release tags
      flatpak: Always prefer wayland, actually work now
      flatpak: Hide "Open in editor" option
      control: Option to hide touch controls visibility
      menu: Bonus Levels -> Contrib Levels
      player: Stop tux from sliding while stoned
      player: does not want buttjump when stoned on slope
      Cleanup credits with (blank N) to skip multiple lines
      world1: Improve journey begins quirky jump section
      Revert "Ctrl+Alt+g to toggle ghost mode"
      Savegame versions
      android: Bumpusguy version{Code,Name}
      worldmap: Make sure initial state is passed through
      worldXXX: Set save-version to 2
      screen_manager: Don't parse menu events if console open
      screen_manager: console scroll <2.26.0 compat
      flatpak: Release and debug builds
      savegame: Clear state table on new saves
      screen_manager: Don't save GameSession on exit anymore
      credits: Add Jiří's nickname
      input: make sure contrllers are bound when switching from joystick<->gamecontroller
      ci: Fix workflow uploads
      ci: Don't trigger on tags

Tobias Markus (1):
      Translator credits update (#3732)

xornamed (1):
      `ice_music`: Apply low pass at ~8kHz
swagtoy added a commit that referenced this pull request Mar 15, 2026
This is the 0.7.0 release of SuperTux which contains a revamped story mode, new
music, more content, multiplayer, and much more.

A shortlog of changes since the last beta:

Daniel Ward (16):
      Fix unattainable coins in Mario's
      Floral blossom: remove spikes in pit
      Striking wood: Fix path
      Bonus1: Propagate light status properly
      Story: add target times where missing
      Item pocket: make timer gravity-deterministic
      Story: Change tux's sprite when changing WM
      through the dark: Add workaround to crusher bug
      Crumbel cavern: Workaround for crusher bug
      World2: Address worldmap not changing action
      Story: Unlocking secret also unlocks normal
      Striking Wood: visual cue
      Player: Prevent non-egg growup floating
      welcome_forest.stl: tiling error
      Merge branch 'master' of https://github.com/SuperTux/supertux
      deep_dive_chill: remove coins in dangerous currents

Frostwithasideofsalt (4):
      add nightly tiles converter back
      yes i did thits in 2 commits im lazy
      Chrima snowball is more ready then before
      fix misc level issues

Jiří Paleček (13):
      Fix percentage counter overflow when downloading add-ons (#3657)
      Fix sprite change (#3673)
      Fix various minor issues (#3681)
      worldmap_sector: call init script after loading music (#3682)
      world1, world2, bonus1: tiling fixes [ci skip] (#3683)
      root_sapling: fix compiler warning (#3655)
      yeti_stalactite: fix object type not updating sprite (#3660)
      ancient_ruin: fix door decal (#3693)
      entangled_roots: tiling fix [ci skip] (#3695)
      world2: move larry to flooded chambers [ci skip] (#3707)
      world2: worldmap fixes [ci skip] (#3718)
      mr_tree, stumpy: consistent coin drops from glinting enemies
      hollow_earth: fix tiling, rain [ci skip]

MatusGuy (17):
      badguy: fix infinite jump with frozen badguy
      root_sapling: spawn a bit below when spawning in slopes
      Tiny android patches (#3556)
      game_manager: fix title screen level from worldmap
      player: fix item pocket dupe bug in worldmap
      game_session: restore initial pocket when restarting or aborting
      goldbomb: fix ledge detection ignoring fleeing sprite
      dive_mine: ignore wind
      rock: fix weird interactions when grabbing
      world2: remove gravity from dispensers in shocking.stl
      player: position grabbed object correctly when flipping
      android: detect when building app bundle
      android: fix unknown "bundle" variable in gradle
      android: remove Donate option in main menu
      ci: ignore stuff for doxygen scripting reference
      stumpy: bounce when buttjumped while invincible
      music_object: reset star theme when star is picked up

Philip (1):
      Fix leafshot getting killed instantly after being dispensed on macOS (#3576)

SuperTux Bot (1):
      Update translations

Swagtoy (24):
      flatpak: Switch to libepoxy
      flatpak: Fix icon not working for release tags
      flatpak: Always prefer wayland, actually work now
      flatpak: Hide "Open in editor" option
      control: Option to hide touch controls visibility
      menu: Bonus Levels -> Contrib Levels
      player: Stop tux from sliding while stoned
      player: does not want buttjump when stoned on slope
      Cleanup credits with (blank N) to skip multiple lines
      world1: Improve journey begins quirky jump section
      Revert "Ctrl+Alt+g to toggle ghost mode"
      Savegame versions
      android: Bumpusguy version{Code,Name}
      worldmap: Make sure initial state is passed through
      worldXXX: Set save-version to 2
      screen_manager: Don't parse menu events if console open
      screen_manager: console scroll <2.26.0 compat
      flatpak: Release and debug builds
      savegame: Clear state table on new saves
      screen_manager: Don't save GameSession on exit anymore
      credits: Add Jiří's nickname
      input: make sure contrllers are bound when switching from joystick<->gamecontroller
      ci: Fix workflow uploads
      ci: Don't trigger on tags

Tobias Markus (1):
      Translator credits update (#3732)

xornamed (1):
      `ice_music`: Apply low pass at ~8kHz
swagtoy added a commit that referenced this pull request Mar 15, 2026
This is the 0.7.0 release of SuperTux which contains a revamped story mode, new
music, more content, multiplayer, and much more.

A shortlog of changes since the last beta:

Daniel Ward (16):
      Fix unattainable coins in Mario's
      Floral blossom: remove spikes in pit
      Striking wood: Fix path
      Bonus1: Propagate light status properly
      Story: add target times where missing
      Item pocket: make timer gravity-deterministic
      Story: Change tux's sprite when changing WM
      through the dark: Add workaround to crusher bug
      Crumbel cavern: Workaround for crusher bug
      World2: Address worldmap not changing action
      Story: Unlocking secret also unlocks normal
      Striking Wood: visual cue
      Player: Prevent non-egg growup floating
      welcome_forest.stl: tiling error
      Merge branch 'master' of https://github.com/SuperTux/supertux
      deep_dive_chill: remove coins in dangerous currents

Frostwithasideofsalt (4):
      add nightly tiles converter back
      yes i did thits in 2 commits im lazy
      Chrima snowball is more ready then before
      fix misc level issues

Jiří Paleček (13):
      Fix percentage counter overflow when downloading add-ons (#3657)
      Fix sprite change (#3673)
      Fix various minor issues (#3681)
      worldmap_sector: call init script after loading music (#3682)
      world1, world2, bonus1: tiling fixes  (#3683)
      root_sapling: fix compiler warning (#3655)
      yeti_stalactite: fix object type not updating sprite (#3660)
      ancient_ruin: fix door decal (#3693)
      entangled_roots: tiling fix  (#3695)
      world2: move larry to flooded chambers  (#3707)
      world2: worldmap fixes  (#3718)
      mr_tree, stumpy: consistent coin drops from glinting enemies
      hollow_earth: fix tiling, rain

MatusGuy (17):
      badguy: fix infinite jump with frozen badguy
      root_sapling: spawn a bit below when spawning in slopes
      Tiny android patches (#3556)
      game_manager: fix title screen level from worldmap
      player: fix item pocket dupe bug in worldmap
      game_session: restore initial pocket when restarting or aborting
      goldbomb: fix ledge detection ignoring fleeing sprite
      dive_mine: ignore wind
      rock: fix weird interactions when grabbing
      world2: remove gravity from dispensers in shocking.stl
      player: position grabbed object correctly when flipping
      android: detect when building app bundle
      android: fix unknown "bundle" variable in gradle
      android: remove Donate option in main menu
      ci: ignore stuff for doxygen scripting reference
      stumpy: bounce when buttjumped while invincible
      music_object: reset star theme when star is picked up

Philip (1):
      Fix leafshot getting killed instantly after being dispensed on macOS (#3576)

SuperTux Bot (1):
      Update translations

Swagtoy (24):
      flatpak: Switch to libepoxy
      flatpak: Fix icon not working for release tags
      flatpak: Always prefer wayland, actually work now
      flatpak: Hide "Open in editor" option
      control: Option to hide touch controls visibility
      menu: Bonus Levels -> Contrib Levels
      player: Stop tux from sliding while stoned
      player: does not want buttjump when stoned on slope
      Cleanup credits with (blank N) to skip multiple lines
      world1: Improve journey begins quirky jump section
      Revert "Ctrl+Alt+g to toggle ghost mode"
      Savegame versions
      android: Bumpusguy version{Code,Name}
      worldmap: Make sure initial state is passed through
      worldXXX: Set save-version to 2
      screen_manager: Don't parse menu events if console open
      screen_manager: console scroll <2.26.0 compat
      flatpak: Release and debug builds
      savegame: Clear state table on new saves
      screen_manager: Don't save GameSession on exit anymore
      credits: Add Jiří's nickname
      input: make sure contrllers are bound when switching from joystick<->gamecontroller
      ci: Fix workflow uploads
      ci: Don't trigger on tags

Tobias Markus (1):
      Translator credits update (#3732)

xornamed (1):
      `ice_music`: Apply low pass at ~8kHz
swagtoy added a commit that referenced this pull request Mar 15, 2026
This is the 0.7.0 release of SuperTux which contains a revamped story mode, new
music, more content, multiplayer, and much more.

A shortlog of changes since the last beta:

Daniel Ward (16):
	  Fix unattainable coins in Mario's
	  Floral blossom: remove spikes in pit
	  Striking wood: Fix path
	  Bonus1: Propagate light status properly
	  Story: add target times where missing
	  Item pocket: make timer gravity-deterministic
	  Story: Change tux's sprite when changing WM
	  through the dark: Add workaround to crusher bug
	  Crumbel cavern: Workaround for crusher bug
	  World2: Address worldmap not changing action
	  Story: Unlocking secret also unlocks normal
	  Striking Wood: visual cue
	  Player: Prevent non-egg growup floating
	  welcome_forest.stl: tiling error
	  Merge branch 'master' of https://github.com/SuperTux/supertux
	  deep_dive_chill: remove coins in dangerous currents

Frostwithasideofsalt (4):
	  add nightly tiles converter back
	  yes i did thits in 2 commits im lazy
	  Chrima snowball is more ready then before
	  fix misc level issues

Jiří Paleček (13):
	  Fix percentage counter overflow when downloading add-ons (#3657)
	  Fix sprite change (#3673)
	  Fix various minor issues (#3681)
	  worldmap_sector: call init script after loading music (#3682)
	  world1, world2, bonus1: tiling fixes  (#3683)
	  root_sapling: fix compiler warning (#3655)
	  yeti_stalactite: fix object type not updating sprite (#3660)
	  ancient_ruin: fix door decal (#3693)
	  entangled_roots: tiling fix  (#3695)
	  world2: move larry to flooded chambers  (#3707)
	  world2: worldmap fixes  (#3718)
	  mr_tree, stumpy: consistent coin drops from glinting enemies
	  hollow_earth: fix tiling, rain

MatusGuy (17):
	  badguy: fix infinite jump with frozen badguy
	  root_sapling: spawn a bit below when spawning in slopes
	  Tiny android patches (#3556)
	  game_manager: fix title screen level from worldmap
	  player: fix item pocket dupe bug in worldmap
	  game_session: restore initial pocket when restarting or aborting
	  goldbomb: fix ledge detection ignoring fleeing sprite
	  dive_mine: ignore wind
	  rock: fix weird interactions when grabbing
	  world2: remove gravity from dispensers in shocking.stl
	  player: position grabbed object correctly when flipping
	  android: detect when building app bundle
	  android: fix unknown "bundle" variable in gradle
	  android: remove Donate option in main menu
	  ci: ignore stuff for doxygen scripting reference
	  stumpy: bounce when buttjumped while invincible
	  music_object: reset star theme when star is picked up

Philip (1):
	  Fix leafshot getting killed instantly after being dispensed on macOS (#3576)

SuperTux Bot (1):
	  Update translations

Swagtoy (24):
	  flatpak: Switch to libepoxy
	  flatpak: Fix icon not working for release tags
	  flatpak: Always prefer wayland, actually work now
	  flatpak: Hide "Open in editor" option
	  control: Option to hide touch controls visibility
	  menu: Bonus Levels -> Contrib Levels
	  player: Stop tux from sliding while stoned
	  player: does not want buttjump when stoned on slope
	  Cleanup credits with (blank N) to skip multiple lines
	  world1: Improve journey begins quirky jump section
	  Revert "Ctrl+Alt+g to toggle ghost mode"
	  Savegame versions
	  android: Bumpusguy version{Code,Name}
	  worldmap: Make sure initial state is passed through
	  worldXXX: Set save-version to 2
	  screen_manager: Don't parse menu events if console open
	  screen_manager: console scroll <2.26.0 compat
	  flatpak: Release and debug builds
	  savegame: Clear state table on new saves
	  screen_manager: Don't save GameSession on exit anymore
	  credits: Add Jiří's nickname
	  input: make sure contrllers are bound when switching from joystick<->gamecontroller
	  ci: Fix workflow uploads
	  ci: Don't trigger on tags

Tobias Markus (1):
	  Translator credits update (#3732)

xornamed (1):
	  `ice_music`: Apply low pass at ~8kHz

Signed-off-by: Swagtoy <me@ow.swag.toys>
swagtoy added a commit that referenced this pull request Mar 15, 2026
This is the 0.7.0 release of SuperTux which contains a revamped story mode, new
music, more content, multiplayer, and much more.

A shortlog of changes since the last beta:

Daniel Ward (16):
	  Fix unattainable coins in Mario's
	  Floral blossom: remove spikes in pit
	  Striking wood: Fix path
	  Bonus1: Propagate light status properly
	  Story: add target times where missing
	  Item pocket: make timer gravity-deterministic
	  Story: Change tux's sprite when changing WM
	  through the dark: Add workaround to crusher bug
	  Crumbel cavern: Workaround for crusher bug
	  World2: Address worldmap not changing action
	  Story: Unlocking secret also unlocks normal
	  Striking Wood: visual cue
	  Player: Prevent non-egg growup floating
	  welcome_forest.stl: tiling error
	  Merge branch 'master' of https://github.com/SuperTux/supertux
	  deep_dive_chill: remove coins in dangerous currents

Frostwithasideofsalt (4):
	  add nightly tiles converter back
	  yes i did thits in 2 commits im lazy
	  Chrima snowball is more ready then before
	  fix misc level issues

Jiří Paleček (13):
	  Fix percentage counter overflow when downloading add-ons (#3657)
	  Fix sprite change (#3673)
	  Fix various minor issues (#3681)
	  worldmap_sector: call init script after loading music (#3682)
	  world1, world2, bonus1: tiling fixes  (#3683)
	  root_sapling: fix compiler warning (#3655)
	  yeti_stalactite: fix object type not updating sprite (#3660)
	  ancient_ruin: fix door decal (#3693)
	  entangled_roots: tiling fix  (#3695)
	  world2: move larry to flooded chambers  (#3707)
	  world2: worldmap fixes  (#3718)
	  mr_tree, stumpy: consistent coin drops from glinting enemies
	  hollow_earth: fix tiling, rain

MatusGuy (17):
	  badguy: fix infinite jump with frozen badguy
	  root_sapling: spawn a bit below when spawning in slopes
	  Tiny android patches (#3556)
	  game_manager: fix title screen level from worldmap
	  player: fix item pocket dupe bug in worldmap
	  game_session: restore initial pocket when restarting or aborting
	  goldbomb: fix ledge detection ignoring fleeing sprite
	  dive_mine: ignore wind
	  rock: fix weird interactions when grabbing
	  world2: remove gravity from dispensers in shocking.stl
	  player: position grabbed object correctly when flipping
	  android: detect when building app bundle
	  android: fix unknown "bundle" variable in gradle
	  android: remove Donate option in main menu
	  ci: ignore stuff for doxygen scripting reference
	  stumpy: bounce when buttjumped while invincible
	  music_object: reset star theme when star is picked up

Philip (1):
	  Fix leafshot getting killed instantly after being dispensed on macOS (#3576)

SuperTux Bot (1):
	  Update translations

Swagtoy (24):
	  flatpak: Switch to libepoxy
	  flatpak: Fix icon not working for release tags
	  flatpak: Always prefer wayland, actually work now
	  flatpak: Hide "Open in editor" option
	  control: Option to hide touch controls visibility
	  menu: Bonus Levels -> Contrib Levels
	  player: Stop tux from sliding while stoned
	  player: does not want buttjump when stoned on slope
	  Cleanup credits with (blank N) to skip multiple lines
	  world1: Improve journey begins quirky jump section
	  Revert "Ctrl+Alt+g to toggle ghost mode"
	  Savegame versions
	  android: Bumpusguy version{Code,Name}
	  worldmap: Make sure initial state is passed through
	  worldXXX: Set save-version to 2
	  screen_manager: Don't parse menu events if console open
	  screen_manager: console scroll <2.26.0 compat
	  flatpak: Release and debug builds
	  savegame: Clear state table on new saves
	  screen_manager: Don't save GameSession on exit anymore
	  credits: Add Jiří's nickname
	  input: make sure contrllers are bound when switching from joystick<->gamecontroller
	  ci: Fix workflow uploads
	  ci: Don't trigger on tags

Tobias Markus (1):
	  Translator credits update (#3732)

xornamed (1):
	  `ice_music`: Apply low pass at ~8kHz

Signed-off-by: Swagtoy <me@ow.swag.toys>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ivy cannon not working correctly [Bug]: Leafshot in "Bye, bye, Forest" gets squished despite there not being any obstacles present

5 participants