Charpurrr / SuperMarioSolarEngine

An open source fanmade 2D Mario engine that implements elements from all the mainline 3D titles
https://docs.google.com/document/d/1hzFKpgm-1IukFWBig9A5ZsCQQEqVqJFVrNOAVmHSHJI/edit
MIT License
14 stars 7 forks source link

Broken initial state (Airborne) #9

Closed Charpurrr closed 7 months ago

Charpurrr commented 7 months ago

If Mario's initial state is set to Airborne instead of Grounded through the state manager, and he is placed above the ground in the level scene, Mario will remain stationary in the air. This is due to Airborne's tell_switch() returning an empty StringName.

Changing the default behaviour of Airborne's tell_switch() can have unintended consequences - and should be advised against.

Charpurrr commented 7 months ago

Fixed by using tell_defer() (im stupid i forgot thats literally what it's designedf for)