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

Changing class should copy "on fire" state #1300

Open
mugg91 opened this issue Jun 28, 2022 · 0 comments · May be fixed by #2235
Open

Changing class should copy "on fire" state #1300

mugg91 opened this issue Jun 28, 2022 · 0 comments · May be fixed by #2235
Labels
change A change to an existing feature or mechanic

Comments

@mugg91
Copy link
Contributor

mugg91 commented Jun 28, 2022

Description

When changing class while on fire, you will no longer be on fire.
Since even stun is copied to the new Blob, I think fire should be copied, too.
I was unable to implement this, so I have to open this issue.

Adding this code to StandardRespawnCommand.as makes the new Blob to be on fire forever without losing health:

#include "FireCommon.as";
#include "Hitters.as";

// ...

//copy fire
if (caller.hasTag(burning_tag))
{
	newBlob.getShape().getConsts().isFlammable = true;
	newBlob.Tag(burning_tag);
	newBlob.set_s16(burn_duration, caller.get_s16(burn_duration));
	newBlob.set_s16(burn_timer, caller.get_s16(burn_timer));
	newBlob.set_u8(burn_hitter, Hitters::burn);
}

Adding a line server_setFireOn(newBlob); will cause a null pointer access exception error.

Reproduction

Go to Sandbox, spawn a Tent or TDM_spawn, be Archer and shoot a fire arrow into the grass.
When on fire, try to change class near the Tent/Spawn.

@eps0003 eps0003 added the change A change to an existing feature or mechanic label Jun 28, 2022
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
Projects
None yet
2 participants