[DECORATE] PowerSpeed does not work with morphs?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Evil Operative
Posts: 61
Joined: Sat Mar 21, 2015 10:44 pm

[DECORATE] PowerSpeed does not work with morphs?

Post by Evil Operative »

I morphed a class using the following parameters:

Code: Select all

MorphActor(0, "[classname]", "", 0x7FFFFFFF, MRF_FULLHEALTH|MRF_NEWTIDBEHAVIOUR|MRF_WHENINVULNERABLE|MRF_LOSEACTUALWEAPON, "[morphflashname]", "[unmorphflashname]");
any powerup using the base of PowerSpeed doesn't seem to take effect?
User avatar
MartinHowe
Posts: 2089
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: [DECORATE] PowerSpeed does not work with morphs?

Post by MartinHowe »

For some reason, the code in player.zs explicitly disables powerup speed factors when morphed:

Code: Select all

if (!player.morphTics)
		{
			double factor = 1.;
			for(let it = Inv; it != null; it = it.Inv)
			{
				factor *= it.GetSpeedFactor ();
			}
...
You're better off asking the devs why this is as I have no idea.
Post Reply

Return to “Scripting”