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

fix: process_relic exits early if not carried by a character. #6111

Merged
merged 1 commit into from
Feb 23, 2025

Conversation

KheirFerrum
Copy link
Collaborator

@KheirFerrum KheirFerrum commented Feb 23, 2025

Purpose of change (The Why)

Describe the solution (The How)

  • Adds an escape clause early to the function where if guy is a nullptr it returns false.

Describe alternatives you've considered

Testing

Additional context

Checklist

Mandatory

Don't check is_active if the carrier is a nullptr it can't buff/debuff anyway.
@github-actions github-actions bot added the src changes related to source code. label Feb 23, 2025
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

how can const reference even be null aaaaaaaaaaa

@chaosvolt chaosvolt merged commit fcce931 into cataclysmbnteam:main Feb 23, 2025
16 checks passed
@chaosvolt
Copy link
Member

Nice. Side note: eventually it'd be nice if some relic recharge types can function when not in a player's inventory, useful mainly for time and solar recharging items so they can better work for faking mundane items (solar-powered electronics for example), but obviously it'd need to not crash.

@KheirFerrum
Copy link
Collaborator Author

Nice. Side note: eventually it'd be nice if some relic recharge types can function when not in a player's inventory, useful mainly for time and solar recharging items so they can better work for faking mundane items (solar-powered electronics for example), but obviously it'd need to not crash.

They should work, this only affects active enchantments.

@chaosvolt
Copy link
Member

chaosvolt commented Feb 23, 2025

Another item on the todo list. XD

EDIT: While testing the follow-up PR I found the cube was actually recharging just fine while dropped, so guessing this ability is already available? Nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading relic crashes game in some conditions
3 participants