prboom-plus icon indicating copy to clipboard operation
prboom-plus copied to clipboard

Plasma rifle still displays refire frame when running out of ammo

Open maxmanium opened this issue 3 years ago • 8 comments

I'm assuming this is a bug because other weapons seem to work as they did in v1.9, but not the plasma rifle, which would originally just skip its refire frame if you ran out of ammo. Wastes 20 tics for no reason.

maxmanium avatar Jun 06 '21 23:06 maxmanium

Any chance to check how this behaved in pre-UM Pr+?

fabiangreffrath avatar Jun 07 '21 10:06 fabiangreffrath

Just tested it in 2.5.1.4 -- it shows the refire frame there too on complevel -1. So it's probably been there since Boom, and no-one really noticed since the bug used to also affect the SSG.

maxmanium avatar Jun 07 '21 17:06 maxmanium

Sorry, I just realized this probably has nothing to do with boom_autoswitch. I just lumped it in there since it has to do with running out of ammo. But I think it's really just that old bug that was also present with the SSG, wherein the entire animation plays as opposed to A_ReFire causing a weapon switch immediately in v1.9.

maxmanium avatar Jun 07 '21 18:06 maxmanium

hint maybe this is something that should get fixed in a new complevel @kraflab ?

fabiangreffrath avatar Jun 07 '21 19:06 fabiangreffrath

Is it a bug? Or is it an intentional fix? I always saw that animation as the innate cost of firing the plasma gun (that makes it different from the chaingun for instance). The vanilla behaviour seems like a bug that later complevels fixed. But I'm not a doom historian.

kraflab avatar Jun 07 '21 19:06 kraflab

I wouldn't know where to look in the original code, but I don't think there's any reason to think it was a bug if it doesn't look like one code-wise. You can apply a 20-tic duration to the chaingun with a dehacked patch and the same thing happens: on complevel 2 it just switches, and on complevel -1 it waits the full duration. So obviously it's not a special case or whatever.

I just know that Boom inadvertently introduced a few bugs that TeamTNT never got to iron out, which is why it's still "frozen" like that on complevels 9 and 11. But I think it makes more sense to assume that id's initial implementation is correct if it's not obvious how or why it could have originally been a bug. Occam's razor and whatnot.

maxmanium avatar Jun 07 '21 22:06 maxmanium

Basically you're describing to me an error (skipping frames) in vanilla that was fixed in boom - this is my interpretation. The simplest path is to do nothing.

kraflab avatar Jun 07 '21 22:06 kraflab

That could very well be the case, I have no idea. But it doesn't seem obvious in either way to me.

Edit: I'll also say that GZDoom uses vanilla behavior here, surprisingly. Not that it changes much.

maxmanium avatar Jun 07 '21 22:06 maxmanium