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

[fixed] "on fire" state wasn't copied when changing class (new) #2235

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Dec 13, 2024

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

Fixes #1300

This is the same as #1905 except for some minor changes.

  • A test print was left in, commented out, in IsFlammable.as
  • removed or added some empty lines etc.

I redid this PR because solving a file conflict in the old PR with StandardRespawnCommand.as caused some confusing file change diffs.

Tested in offline and online, works.

@Vam-Jam Vam-Jam added change A change to an existing feature or mechanic discussion An controversial/debatable issue requiring discussion by the community before implementation labels Dec 13, 2024
@mugg91
Copy link
Contributor Author

mugg91 commented Dec 13, 2024

The string burn_hitter doesn't really serve any purpose. If we remove it, we could save two instances of #include "Hitters.as" - in StandardRespawnCommand.as and FireCommon.as, cutting down on loading time.

In IsFlammable.as, this line
blob.server_Hit(this, pos, Vec2f(0, 0), 0.25, this.get_u8(burn_hitter), true); could change to blob.server_Hit(this, pos, Vec2f(0, 0), 0.25, Hitters::burn, true);

@mugg91
Copy link
Contributor Author

mugg91 commented Dec 16, 2024

Made a commit that does the following changes:

  • The change I explained in my previous post - removed tag "burn_hitter", allowing me to remove #include "Hitters.as" in two files.
  • Moved function isIgniteHitter() from FireCommon.as to Hitters.as. This allowed me to remove #include "FireCommon.as" from Fireplace.as.

No more changes planned. Ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change A change to an existing feature or mechanic discussion An controversial/debatable issue requiring discussion by the community before implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing class should copy "on fire" state
2 participants