Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

determine_interaction return value doesn't feel right when bouncing on enemies #135

Closed
Fripouney opened this issue May 13, 2024 · 2 comments

Comments

@Fripouney
Copy link

Fripouney commented May 13, 2024

Description :

When creating my mod I needed to detect when a player attacks an enemy. The determine_interaction function returns 0 when Mario doesn't do any action when interacting with the enemy.
However, the function also returns 0 when Mario bounces on the enemy to kill it, which feels weird and makes it harder to detect this type of interaction.

Expected behaviour :

determine_interaction maybe shouldn't return 0 when bouncing on an enemy

EDIT : After more testing, the correct return value for this function when bouncing on an enemy should probably be 64.
This would allow bitwise operations like determine_interaction() & INT_HIT_FROM_ABOVE, or determine_interaction & INT_ANY_ATTACK to work properly and return the values they should in this case.

@Hex4dec
Copy link

Hex4dec commented May 16, 2024

Yes, this is a known bug, use my patch at #126 (adds a seperate hook for player vs object)

@AgentXLP
Copy link
Contributor

I guess this should be resolved now then.

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

No branches or pull requests

3 participants